I use a clipmenu, https://github.com/cdown/clipmenu a clipboard manager and also use pass, https://passwordstore.org a password manager. Pass copies the password to my clipboard for 45 seconds by default, but I am able to look at my password, in plaintext, after the passage of 45 seconds.

How do I make my clipboard manager forget my password after 45 seconds?


You basically copy nothing, or something silly. Historically, when my password manager nsapass used to use a clipboard manager (xclip in this case), it used to copy something like entry deleted by nsapass to delete it.

Alternatively, if you'd like go to really fancy and return previous copied entries in the clipboard before the password was copied, you may paste the old entry in some variable, then paste your password in the clipboard, and as the password expires copy the old entry back. But personally I don't think this is practically really useful. I think this just mostly increases the complexity without actually being useful.

So personally I'd say, if you want a clipboard style password pasting, just copy a silly string in place once you are done (e.g. timer expires).

That said, I personally don't like the idea of copying passwords into clipboards, because it is too open (accessible to any app). Which is why I leave you with another option below in case you like it:

Automatic password typing

xdotool type "some string" will type "some string" as if you typed it with your keyboard, all without getting "some string" into any clipboard.

The xdotool type ... is what I ended up doing with recent versions of my password manager, and I like it much better this way. Specially that I no longer need to worry about accidentally copying something else that may end up deleting my password that I wanted from the clipboard buffer. I also think it's more secure as clipboard are too open in my view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.