[SATLUG] GNU Screen guide
Sean Carolan
scarolan at gmail.com
Thu Sep 27 15:21:23 CDT 2007
> The primary advantage to screen, AFAICT, is that you can use it without
> a GUI. It may be a useful tool in some instances, but by bad mouthing
> other useful tools, it tends to make me discount the whole article.
I wouldn't discount the whole article based on one person's opinion of
gnome-terminal or konsole tabs. Take the good stuff from the article,
and ignore the command-line jockey machismo.
> "Instead of opening up several terminal instances on your desktop or
> using those ugly GNOME/KDE-based tabs, Screen can do it better and simpler."
>
> I haven't read the whole article, but this turns me off right away.
> What is ugly about a tab based terminal? I use konsole all the time and
> can even rename the tab titles so I can go directly to whatever terminal
> I want. I don't need to do a Ctrl-a 2 (three keystrokes) to go to a
> specific terminal. I use a single mouse click.
Screen is useful in the following scenarios:
1. You have an unreliable internet connection. With screen, you can
start a long-running process and not worry about it getting cut off
because your ssh session died.
2. You have a long-running backup or script that you want to
periodically keep an eye on. I will often start a job at work,
detatch from my screen session, and reattach from home so I can see
how it's progressing. Konsole and gnome-terminal can't do this on
their own.
3. Screen sessions can continue running on the server, even if you
shut down your workstation. Suppose I have a mail cluster that I have
to manage. I might use a .screenrc file to automatically open screen
tabs with ssh sessions to all of the servers.
4. Sharing sessions. Suppose I'm working with an intern and showing
him some commands. Now we can share a screen session so I can monitor
his work.
5. Multiple terminal windows on the same host. I know KDE can be
automatically set up to open new ssh connections to a specific host,
but screen does on the host with no extra settings. (just do CTRL-a
c)
6. The server(s) you want to access are not directly available, but
require you to go through a gateway first. Run screen on the gateway
and you can have all your subsequent connections running in screen
tabs. You might be able to do some creative port forwarding to get
around this and use KDE/Gnome terminal tabs, but screen's easier. I'm
sure there are more uses for screen that I haven't thought of.
I also agree that there was no reason for the author to bash konsole
or gnome-terminal tabs. Personally I use both GUI tabs as well as
screen, and have found that the combination works quite well. Here's
my ~/.screenrc if anyone's interested. I can't remember where I got
this from, but it only seems to work with fairly recent versions of
screen. Note that your email program may wrap the hardstatus lines,
so you'll need to re-join them if you want to use this:
shelltitle ''
vbell on
autodetach on
startup_message off
defscrollback 2048
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< %=%D %M %d %c"
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=
kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}
%d/%m %{W}%c %{g}]'
More information about the SATLUG
mailing list