Screen is your friend (was Re: [techtalk] Mutt functionality)

Mary Gardiner linuxchix at puzzling.org
Sat Jul 7 11:15:46 EST 2001


On Fri, Jul 06, 2001 at 11:27:53AM -0700, Akkana wrote:
> I usually just run another copy of mutt in a different shell window.
> Or if I'm not in X (running on the console or over a telnet line),
> I ctrl-Z to suspend the mutt process, use more or vi or another mutt
> or whatever is easiest to view the text I want to copy, quit that
> then fg back into mutt.  

A tailor made solution for this kind of thing is the 'screen' utility.

You have your one console or remote login, type screen, and you're presented
with a normal prompt. Type 'mutt', you're in mutt.

Now the screen magic.
Press Ctrl-a and then c, and you're presented with a new prompt. Type 'vi'
you're in vi. Press Ctrl-a and then 0 - back to mutt. Ctrl-a 1, back to vi.

Basically it creates what you can think of as consoles and hooks them all up
to your tty, and you can switch between them. This means you can switch
between processes without sending them into the background. It is especially
good for remote logins, because you can run n text-based programs with 1
login. It is also handy for consoles, because there are normally only 6 of
them, and screen doesn't make you type your password into each one.

It also has a second nifty feature of being able to grab a screen session
attached to another tty and transfer it to your current tty, so you can go
into your half-done mail reading or vi session or whatever.

If you want to log out of your remote session and detach your screen session
first, the key combination is Ctrl-a D D. Then start screen with the -r flag
next time you use it and screen will grab the old screen session and can are
presented with mutt and vi!

Now that I've said all that I have to confess to not being much of a screen
user, since I tend to use only mutt remotely and use vim's cut and paste in
visual mode to move data between files, but I have used to to combine mutt and
slrn remotely, and many people find it useful.

Mary.

-- 
Mary Gardiner
<mary at puzzling.org>
GPG Key ID: 77625870 (wwwkeys.eu.pgp.net)




More information about the Techtalk mailing list