Mutt on the Android G1

I've talked before about SSH for mobile devices, since then I've been using my G1 a lot. I prefer to access my email via Mutt and SSH (I know, a little old-school ...): I can do this via ConnectBot, but I wanted something a bit more direct. Happily, Lauren Weinstein has written an adapted version of ConnectBot to simplify this. (Uninstall your existing version before installing Lauren's version.)

Tip of the Trade: An adapted version of ConnectBot makes it easier to access email on your mobile devices using Mutt and SSH.

First, set up the new connection in ConnectBot. Then choose 'edit host' from the long-click menu. Set up a post-login command: I use screen -x (with return at the end). This will connect to the screen session I almost always have running, but it will mirror instead of detaching if it's also attached elsewhere (e.g., on my laptop).

Next, set up public key auth via the 'manage pubkeys' menu. Using a passphrase is more secure, but it also presents more hassle as you'll have to flip the keyboard out to enter it every so often. The 'copy public key' option on the long-click menu copies the public key to the clipboard, from where you can get it to ~/.ssh/authorised_keys2 on your server.

Then set up a single-touch shortcut ('Add'->'Shortcuts' menu) direct to the server from the home screen.

Finally, Lauren's kindly made available a set of keybindings to add to your ~/.muttrc, so you can do basic operations without opening the keyboard. Send ESC with two presses of the joystick, and Ctrl with one; you can also sent Ctrl-A n (to switch screens) with the picture button. These are the bits from it that I'm using so far:

macro index   ""
macro index  "n"
macro index   ":set delete=yesn:set delete=ask-yesn"
macro index   ""

macro pager   ""
macro pager  "n"
macro pager   ":set delete=yesn:set delete=ask-yesn"
macro pager   ""

All incredibly useful! Many thanks to Lauren for the hard work on this.

Follow ServerWatch on Twitter

This article was originally published on Jul 27, 2009
Page 1 of 1

Thanks for your registration, follow us on our social networks to keep up-to-date