-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =pod A while back, I started working on servers that I did not own. This meant I didn't get to pick the passwords, use my ssh keys, or set sudo to "NOPASSWD" (as I do on my own machines). Instead, I had to use cumbersome passwords (from a wiki page) each time I logged in. This was a huge pain in the ass; so C suggested I use C. That was a big help. When confronted with an unfamiliar password prompt, all I had to do was open another xterm, focus it, type "pwsafe - -p server-name", focus the window I was working in before, press Shift-Insert (middle-click, for you mouse users), press Enter, re-focus the pwsafe xterm, kill it, and finally go back to whatever I was doing before. This is nicer than opening a wiki page and cut-n-pasting the password with my mouse, but it still involved more thought than I wanted it to. By today, I was annoyed by this enough to do something about it. I knew that my terminal emulator of choice, L, could be extended with Perl. I figured it would be possible to let urxvt type my passwords for me, using the pwsafe database. I was right :) The result is on github: L Basically, like all urxvt scripts, you put the "pwsafe" script somewhere where urxvt can find it and then tell urxvt to activate it (see C). When you need a password, you can press M-w (or whatever key you configure the C key to), and you will be prompted for your pwsafe database password. If it's correct, you will be shown a list of passwords that pwsafe knows about. Type the name of one of those, and the corresponding password will be pasted in (along with a newline). This is about nine million times easier than invoking pwsafe somehwere and pasting, and infinitely better than cutting and pasting from a web page. Try it, and you'll agree. If you re-invoke pwsafe in the same session, you won't need to type your password again. The database is re-read for every activation, though, so if you add a password, it will be available. (Also, you can press escape to abort at any time, if you decide you don't really want a password.) Anyway, urxvt is almost as fun as emacs to program, so perhaps I will write some more extensions in the future. (The first thing I am going to do is to make sure I can use Moose + roles next time. Much less spaghetti that way.) One bug that I'm not sure how to fix: the password is not shared between urxvt clients; this means you have to open the database for each terminal window. It would be nice to only have to do that once per urxvtd. Patch welcome! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkowtGAACgkQ2rw+dVvzZm33KACdEGe1Q977C+xbbb5ldVIRYf8l X+QAoKB4p5qurwNc3OZ3ZRVMIoXBLzoi =krCG -----END PGP SIGNATURE-----