Welcome to thatlinuxbox.com Sunday, December 22 2024 @ 01:15 AM UTC
irssi + dtach + Droid + ConnectBot to stay connected in IRC
- Thursday, February 18 2010 @ 01:01 AM UTC
- Contributed by: Dan Stoner
- Views: 9,335
My favorite IRC client is "irssi" because it only requires a shell / terminal window to run. I can leave it running on a reliable machine and logged into the IRC network for long periods of time. Staying logged into IRC allows me to catch up on recent activity in my favorite channels whether I am at home, at work, or on my Droid.
Many people use "screen" to detach from their remote SSH login sessions and re-attach from a different computer. I found that screen has some quirks with irssi and tons of features that I do not use. A simpler alternative to "screen" is "dtach".
Here is how I use dtach:
Create a new dtach session on a stable machine:
dtach -c dtachbashirssi bash
irssi
I start a whole bash shell rather than just the irssi program so I can exit irssi as needed (to test new irssi config files, etc.) and then do not need to create a new dtach session, I just run irssi again from inside the existing dtach session.
Once irssi is running, use CTRL-backslash (^\) to detach. After the dtach session is detached, it is safe to log out of the server and log in from somewhere else. To re-attach, SSH back into that stable computer and run
dtach -a dtachbashirssi
On my Droid, I use the ConnectBot SSH client to connect to the stable computer running my detached session. The missing keys on the Droid can make dtach and irssi a little bit challenging, but not impossible.
The default detach ^\ key combination can be accomplished in ConnectBot on the Droid by using the following:
Press center DPAD (this starts the CTRL key sequence), then press ALT-Shift-forwardslash (ALT-Shift-/).
It is possible to re-map the magic detach key when starting dtach (read the dtach man page for more info), but I had a little trouble with this on re-attach.
If I'm on my Droid I just want to cycle quickly through my favorite channels to see if there are any interesting discussions going on. On a normal computer, I tend to use the ALT-numberkey combination to switch between windows... e.g. ALT-5 takes me to the fifth irssi window. I have not figured out how to do an ALT -numberkey sequence on the Droid since the Droid uses the ALT key as a local keystroke modifier to type regular numbers.
Another way to switch windows is by typing the irssi command:
/window 5
Too slow!
There is a third way to switch windows... ESC-numberkey (ESC-5) has the same affect. To switch to a particular irssi window on the Droid, I use the ESC-numberkey combination.
Press center of DPAD twice (this sends the "Escape" key), then press ALT-numberkey to switch to the numbered window.
The Droid double-tap on the DPAD to create "Escape" in ConnectBot is also crucial when editing remote files in vi or vim. Additional information about ConnectBot is available in the project wiki:
http://code.google.com/p/connectbot/w/list
Update: Another important key for working in the command-line is the "Tab" key for file/directory name auto-completion. Use the "Shift" key on the right side of the Droid keyboard to send the "Tab" sequence.
The following comments are owned by whomever posted them. This site is not responsible for what they say.