Strange Leafpad behavior

Hello! I’ve been using Manjaro (KDE) for a few months and it’s been great so far. One of the things I searched for a lot when I switched from windows was a notepad clone. I found Leafpad, and it’s pretty much a one to one clone of it. It is however, very old and hasn’t been updated in years. I’ve noticed a couple of strange behaviors when using it, and I wanted to see if anybody else was having them or if there are any fixes available.

  1. When I open a file in leafpad and copy text out of it, it doesn’t stay copied after the file is closed. I have to keep the file open to copy anything out of it into another program. (Like copying from a text file into Fire Fox.)

  2. When clicking on the pinned task bar icon, I have to open and close the program multiple times for it to show up as open on the task bar. It’s very unpredictable how many times I’ll have to do this. It is opening, but not showing it’s open and active on the task bar.

I don’t know if these are just bugs in the program or the result of using old software on a modern os.
If anybody is curious why I’m using such an ancient text editor, I have ADHD, and a super simple editor like leafpad helps me get my thoughts and ideas out quickly without any distractions. Kate is fine, but it’s not simple enough for me, so I’m trying to get leafpad to behave correctly.

If anybody has any ideas on how to fix these issues I’d really appreciate it. Thanks!

mh… here is a perfect notepad clone:

pamac install wine
wine notepad


Yeah leafpad is old and uses GTK2, which is almost dead. Use it as long as it works.

Hm maybe focuswriter is a good app in this case:

pamac install focuswriter

It is pretty nice and distraction free in fullscreen mode.

1 Like

I’d check out mousepad. If I remember correctly it was built as and updated replacement for leafpad.

Thanks for all the suggested alternatives. I’ve tried them all, but they’re not really what I’m looking for. I feel like I might have to learn the language it’s programmed in and update it myself. It’s perfect for what I need aside from the aforementioned problems. I feel like that’s probably what I’ll have to do unless somebody else either knows how to fix the problems or wants to update it themselves. Again, thanks!

There is l3eafpad the successor from leafpad.

1 Like

This is standard Linux behavior. It’s not a bug/issue of Leafpad (or any specific application.)

In order to circumvent this, you should use an “always running” clipboard manager or daemon. KDE has one called Klipper which stays in the tray. I use it all the time. (No really. Not a day goes by where I don’t use it.)

It’s included by default when you install from the official Manjaro KDE ISO.

Also: Why aren’t you using Kate as your text editor, since you’re running KDE? (If it has too many features, then something like l3afpad will work, like @banjo shared. It uses gtk3 and has recent updates.)

Ahhh, I see. Everything I copy goes into the clipboard, but I don’t want to copy from the clipboard every time I close a file. It’s an extra step and kinda annoying. I don’t know what option I would need to set to make it possible to not do that.

I had no idea a successor already existed! I tried it and it works great! Thank you @banjo! I mentioned in the initial post why I don’t use Kate. For journals, writing or just basic coding, a leafpad application just makes more sense to my brain.

Thank you for all the replies so far, they have been very helpful!

This is due to Unix/Linux behavior. When you “copy” to the clipboard, it actually “points” to the location (in memory) of the data that is being referenced. Once you close the application, the data is released from memory, and thus what you “copied” is pointing to “nothing”.

This is why for Unix/Linux you need a daemon or “always running” clipboard manager to circumvent this behavior. The daemon or clipboard manager will actually “copy” such text (or data), rather than simply pointing to a location in memory (which will disappear upon exiting the application, anyways.)

This mimics more closely what you’re used to with Windows.

Don’t forget, Klipper is fairly customizable: configure it to your liking. I believe there’s a setting to make it behave like traditional copy-paste without having to use extra clicks or steps. (I believe the option in Klipper is “Prevent empty clipboard”.)

Thanks for this very good explanation. I didn’t know that.

I can recommend copyq as clipboard manager.

Just came in my mind that lxqt has something similar.


It’s in the manjaro repos, qt-based, plain. Might fit even better for plasma. GitHub screenshots

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.