naglfar / krunner-keepassxc

A small krunner plugin to copy keepassxc entries to clipboard using its Freedesktop.org Secret Service dbus integration.
MIT License
27 stars 3 forks source link

[Feature Request] Wayland Support #8

Open bugzy opened 2 years ago

bugzy commented 2 years ago

Currently the use of Xsel and Xclip for copy and paste makes this excellent runner work only on X11 KDE and not on Wayland sessions. Is there anyway to replace the dependency on Xsel and Xclip with the klipper dbus interface so that we can have functionality both on X11 and Wayland?

Here is an older example on github https://gist.github.com/aeris/3308963

naglfar commented 2 years ago

Didn't even know that was a thing, but sure, sounds sensible! I'll see that I get around to it, thanks for the feedback.

naglfar commented 2 years ago

Has now been implemented in v1.6.0

bugzy commented 2 years ago

Great. Thanks.

bugzy commented 2 years ago

Can we reopen this issue? I just got the chance to upgrade to v1.6.0 and I can confirm that nothing is copied to the clipboard either by click or by hitting the enter key. I will try to reproduce this result on another machine and update once I do.

bugzy commented 2 years ago

@naglfar I have now verified from another device that nothing is being written to the clipboard when using klipper

naglfar commented 2 years ago

Well, that sucks. Can you tell me which distribution and which version of kde plasma you're running? Could you use QDbusViewer and see if org.kde.klipper shows up? I added a fallback if it's missing and I'm pretty sure it works, but as it just worked out of the box on my end I didn't really get to test this. Copying username stopped working aswell?

naglfar commented 2 years ago

I just uploaded a pyz file with the 1.6.1 tag: krunner-keepassxc.pyz. Could you please try downloading that, stopping the current systemd unit (systemctl stop --user krunner-keepassxc.service), run it with python krunner-keepassxc.pyz run and then see if you get any output while trying to copy?

bugzy commented 2 years ago

Operating System: Fedora Linux 35 KDE Plasma Version: 5.24.4 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.2 Kernel Version: 5.16.20-200.fc35.x86_64 (64-bit) Graphics Platform: Wayland Graphics Processor: AMD VERDE

Following your instructions in the comment above worked. I got the GUI notices, saw the entry in the clipboard, and got copied to clipboard using klipper in the commandline

naglfar commented 2 years ago

So, this worked but it doesn't work using the version from the kde store? That's a bit weird, since I actually didn't change a whole lot besides adding the debug output. I'm currently on my work machine where I updated the plugin from the store earlier and everything is working fine as well, so I'm a bit stumped.

bugzy commented 2 years ago

I will uninstall and will install afresh and see what happens

bugzy commented 2 years ago

An uninstall and a full reinstall seems to work fine. Note: it looks like uninstall does not work as intended. When I try to uninstall from Get New Stuff menu or from discover, I get an error similar to: /usr/bin/sh: line 1: /home/username/.local/share/krunner-sources/BIgYId-krunner-keepassxc/uninstall.sh: No such file or directory I had to do remove the files from their various locations manually. I will attempt the same thing from my other machine, and if it works, I will close the issue.

naglfar commented 2 years ago

I just noticed I don't actually know what discover does when it updates a plugin. If it just reruns the install.sh that probably won't properly restart the systemd service, so chances are updating really only comes into effect after rebooting for most users. As for the uninstall.sh - it's supposed to be there, I'll look into it.

naglfar commented 2 years ago

I updated the install script so that the service gets restarted if it's already running. Still have to look into the uninstall thing, though.