Dashlane / dashlane-cli

👩‍💻 Dashlane CLI - Access your secrets in your terminal, servers and CI/CD
https://cli.dashlane.com/
Apache License 2.0
189 stars 52 forks source link

on linux, the the clipboard is cleared after application exit #87

Closed jbatesy closed 1 year ago

jbatesy commented 1 year ago

For some reason the clipboard is cleared on Linux systems after closing

I know this ticket is lacking detail, I am doing some investigation. It looks like its a thing with X11... the clipboard is maintained by the process, so once its terminated the clipboard is "gone"

jbatesy commented 1 year ago

Looks like the best solution would be to add an option so dashlane-cli can sleep when using the clipboard option... working on a PR

jboillot commented 1 year ago

Hello,

This issue is related to this one: https://github.com/1Password/arboard/issues/39. This is because you are not using a clipboard manager. I suggest you install one, or you use a desktop environment that implements one by default, like GNOME with mutter.

If you tell me the window manager you are using I could try to help you. I'm afraid the pull request you offered won't be accepted because solving a niche problem.

Nevertheless, thanks for your investigations :)

jbatesy commented 1 year ago

Hi @jboillot ,

I use XFCE & clipman, although I could grab it from the clipboard history, it was annoying me. Could you suggest a better clipboard manager, one that always "owns" the clipboard and requires no interaction would be best...

I also have privacy concerns about using the menu to get the text back, because you can see the password in plaintext, which is why I made the PR :)

jboillot commented 1 year ago

After some investigation on a Xubuntu VM I have found a working setup: it uses the clipboard manager diodon (so first sudo apt purge xfce4-clipman && sudo apt install diodon). At this point, you may have to restart your system (or killall xfce4-clipman && diodon). Then you have to modify the diodon preferences so it uses the primary selection like in the following image, et voilà!

image

Please tell me if it still doesn't work!

jbatesy commented 1 year ago

@jboillot thank you for going through the trouble to investigate this for me, no worries regarding the PR, it was good practice anyway.

Your suggestion works perfectly, although there is no need for the Use primary selection option, that just puts the text you select with your cursor into the clipboard manager. Keep clipboard content is the option that does what we are looking for.

Closing this issue off now.