comotion / cpm

Console Password Manager
http://www.harry-b.de/dokuwiki/doku.php?id=harry:cpm
52 stars 13 forks source link

copying password to X selection instead of showing it #21

Open ghost opened 12 years ago

ghost commented 12 years ago

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

ssm commented 12 years ago

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

ghost commented 12 years ago

Hey,

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

comotion commented 12 years ago

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

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

ghost commented 12 years ago

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!

7eggert commented 12 years ago

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