The names of the screen windows default to the name of the program bring run in them (bash most of the time). To rename a particular window you need to use Ctrl-A A
and it will let you rename the window you're currently in. This will help you to know which window is which when you use Ctrl-A "
. Also, if you have a .screenrc file in your home directory, you can configure screen windows to default to certain window numbers along with specific names. Below is the portion of my screenrc file that configures my startup windows on my linux machine:
screen -t root 0 sudo su -
screen -t shell 1
screen -t nntp 2
screen -t decode 3
screen -t IRC 4 /usr/bin/irssi
screen -t Vim 5
screen -t torrents 6 /usr/bin/rtorrent
screen -t jabber 7 /usr/bin/mcabber
select 0
The items after the -t are the names of the windows, the numbers are for the position in the window list, and what's after the number is a program to execute in that window. If a program is closed that was started with the window, that window will be closed as well. SO if I close out of irssi completely, then window 4 will be closed, and the next time I create a new window (with Ctrl-A A
) I'll get that new window as window 4.
Most of what I've learned about configuring screen has come from reading the default .screenrc file. There should be one on the mac somewhere, but I'm not sure where it is stashed.