cpm icon indicating copy to clipboard operation
cpm copied to clipboard

copying password to X selection instead of showing it

Open ghost opened this issue 14 years ago • 5 comments

Hello,

maybe it would be better if there would be the possibility to copy the password to the X selection instead of displaying it on the screen (somebody else could read it). Also a warning befor showing the passwords could be helpful (of course you should able to disable the message in the config to prevent from annoying).

I know it's a password manager for the console, but this function would be desirable for your tool, it exists already in pwsafe.

Thanks a lot for cpm, it's a very nice password manager!

Greetings

ghost avatar Oct 03 '11 09:10 ghost

Sounds like a good idea. I've seen it elsewhere, but can't remember where.

ssm avatar Oct 04 '11 12:10 ssm

Hey,

yeah it already exists in pwsafe: http://sourceforge.net/projects/pwsafe/

ghost avatar Oct 04 '11 16:10 ghost

This can be done, however CPM is not an Xwindows application; it is a console application. Interfacing with X requires dependencies on libs that aren't necessarily available or wanted, so we would have to either

  • build a separate package that supports copying to x selection, or
  • make some autoloading functionality that only activates when the lib is present, to avoid introducing package deps

I prefer to do the latter and I am happy to take contributions for pushing into X selection.

comotion avatar Dec 05 '11 11:12 comotion

Hello,

yeah, I tried it already to implement the feature but I failed, because I'm too less experienced in writing C code. So I'm really sorry about that. But if I can help you, let me know.

You're right it would be mad to require X depencies on a server!

ghost avatar Dec 05 '11 18:12 ghost

If you want to avoid dependencies, you can do: echo "$password" | xsel -i

You can check for xsel at startup time and offer the copy key if xsel is available

7eggert avatar Jun 08 '12 20:06 7eggert