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.
![enter image description here](../../I/static/images/10d7025fda6b7fffd340ff2e43ef18ef80d3323379ab6bd620911e845e1134d0.png)
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/.
why do you run keepass2 under wine? - you can install and run it native (just with mono)! – DJCrashdummy – 2015-07-11T08:07:05.827
1Yeah, that's what I mean...... I just install it via my package manager.. – LEDfan – 2015-07-11T08:09:20.010