Skip to content

Persistent clipboard

I can copy text to my clipboard, but if I close the program that I copied from, my clipboard content is lost.

I found xorg-xclipboard in my search for a clipboard manager. If I open xclipboard and leave it running, I no longer lose the clipboard content. It is now persistent.

Is there a way to let xclipboard run in the background as a service? Or another way to obtain a persistent clipboard? I do not care about history. I just do not want to lose the content when I close the program it came from. In short, I would like it to work like it does on Windows (old habits die hard).

  • Edit:

I should say that I am using bspwm and not a fully fledged desktop environment. This is why I do not have a clipboard manager running by default.

After trying out xorg-clipboard and autocutsel, those were not what I was looking for. I then tried out clipmenu in combination with clipnotify. This works nicely! Solved.

Edited 8 Nov 2018. We only hold this version.

18 points22 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
18 · 100% up
Kind
Text
ID
9tkvsl

Author

1
posts
18
comments
0
media
View profile

24 comments

I use copyq, there are many choices but not many are as featured as this one

4 points

+1 for copyq. Very good

2 points

Yeah I've used copyq for a long time now. Been very happy with it, except that I rather would want something lighter that doesn't lay in my tray, but haven't managed to find something better.

2 points

This has never happened and to me and it sounds extremely weird but adding “xclipboard &” at the bottom of your .bashrc will likely do the job.

Edit: or better yet at the bottom of .profile so it only executes once when you log in.

3 points
unknown author4 hidden

Deleted before we saved it.

2 points

I remember Firefox was doing this. It was a "security" feature and it was driving me crazy. I don't use Firefox anymore so I don't know if it's still doing it and maybe there also other programs.

3 points

Most if not all. termite does this. So does code from visual-studio-code-bin, and Firefox and Thunderbird. I'll come back if I find a program that does not do this.

2 points
unknown author

Deleted before we saved it.

1 points

What window manager are you using?

1 points

bspwm.

It is quite possible that most desktop environments include a clipboard manager, and so users that use a DE do not notice that a clipboard manager is not necessarily included in Arch.

1 points

Hmm... according to the last paragraph of the Selections Section

It is also important to realize that according to the selection protocols, nothing is copied until it is pasted. For example, if you select some word in a terminal window, close the terminal and then want to paste it somewhere else, it will not work because the terminal is gone and the text has not been copied anywhere. If you want the word to be preserved after closing terminal window, consider installing a clipboard manager.

One thing I learned from using Awesome is to make sure and source the /etc/X11/xinit/xinitrc.d files in my .xinitrc, but I don't think that is related to this.

1 points

I don't think WM is relevant. Desktop environments should include a clipboard manager though.

1 points

I can recommend clipit. It is lightweight and does the job. I also got used to the CTRL+ALT+H shortcut to popup history wherever the mouse cursor is.

1 points

As others said, there are plenty of clipboard managers out there. I use Klipper since it came with Plasma and seems to work fine.

Barely related to the topic, KDE Connect does a great job at sharing clipboard with my phone (both ways too!), if you ever wondered if it can be easily done, check it out.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.