Can't paste in gnome-terminal from Keepas2 running via mono
Solution 1:
I found the solution!
I can confirm this works on OpenSUSE and Arch Linux. I hope this works on other distro's too. I tried everything in this question How can I merge the gnome clipboard and the X selection? but nothing helped. I found this bug at launchpad which worked: https://bugs.launchpad.net/ubuntu/+source/keepass2/+bug/1010289 .
Solution: Install both xdotool
and xsel
, and restart gnome-terminal and keepass2.
I tested this on gnome-terminal
, terminator
and konsole
.
EDIT: this solution works, however not for some Java based applications. (PHPStorm and other Jetbrains software) I solved this:
- install parcellite
- start it
- right click on the tray icon and choose preferences
- make sure Use Copy (Ctrl+C)
, Use Primary
and Synchronise clipboards
are enabled.
EDIT2: There is a better solution for the Java problem (thanks @colan), a patch has been merged into xsel but this hasn't been released (see: https://github.com/kfish/xsel/pull/6), but compiling from source is very easy:
- first remove xsel using your package manager
- clone the repo:
git clone https://github.com/kfish/xsel
cd xsel
-
touch README
(looks like the autogen script needs a README file, but can't found it) ./autogen.sh
make
sudo make install
You can manually test it: echo "test" | xsel -i -b
.
This will install xsel into /usr/loca/bin/
. Note that version 1.2.0 of xsel is not the correct version, this was released 9 years ago and doesn't include the patch! On arch linux you can use xsel-git
from the AUR https://aur.archlinux.org/packages/xsel-git/.