Не удается вставить в gnome-терминал из Keepas2, запущенного через моно

2318
LEDfan

Я использую OpenSUSE 13.2 и использую Keepass2. Приложение работает через моно. Я хочу скопировать свой пароль из keepass в терминал, однако это не работает с помощью CTRL + SHIFT + V. Это общая проблема, но я не могу найти правильное решение.

Обратите внимание, что я не буду запускать Keepassx, так как Keepas (.net) имеет много других функций (например, KeepassHTTP).

Заранее спасибо!

7
почему вы запускаете keepass2 под вином? - Вы можете установить и запустить его родной (только с моно)! DJCrashdummy 8 лет назад 0
Да, это то, что я имею в виду ...... Я просто устанавливаю его через менеджер пакетов .. LEDfan 8 лет назад 1

1 ответ на вопрос

8
LEDfan

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

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:

  1. first remove xsel using your package manager
  2. clone the repo: git clone https://github.com/kfish/xsel
  3. cd xsel
  4. touch README (looks like the autogen script needs a README file, but can't found it)
  5. ./autogen.sh
  6. make
  7. 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/.

xdotool был установлен, но xsel тоже помог мне! Я могу подтвердить, что у меня была такая же проблема, и что это решение решило ее при тестировании Debian. amenthes 8 лет назад 0
Проблема с Java описана по адресу https://bugs.launchpad.net/ubuntu/+source/keepass2/+bug/1379877. colan 7 лет назад 1
@ Кол, вау, это круто. Компиляция xsel из исходного кода решает проблему! LEDfan 7 лет назад 2
Я сделал все ваши шаги для компиляции xsel из исходного кода, и я получил этот `echo" тест "| xsel -i -b. bash: / usr / bin / xsel: такого файла или каталога нет. Я вручную скопировал его из `/ usr / local / bin`, но моя версия все еще` xsel version 1.2.0 от Conrad Parker ` Freedo 6 лет назад 0

Похожие вопросы