Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/public/screen/lib/plugins/loglog/action.php on line 15

Strict Standards: Declaration of action_plugin_captcha::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/public/screen/lib/plugins/captcha/action.php on line 0
GNU screen [sessionnames]

This is an old revision of the document!

Strict Standards: Declaration of syntax_plugin_graphviz::handle() should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, &$handler) in /home/public/screen/lib/plugins/graphviz/syntax.php on line 20

Session Names

Each session has a name associated with it that can be used when attaching to them. Session names are displayed when listing your sessions using screen -list.

root@backup:~# screen -list
There are screens on:
        7637.dispatch   (Attached)
        7545.playing    (Detached)
        7680.irc        (Detached)
        7684.logs       (Attached)
        7693.pts-5.backup       (Attached)
4 Sockets in /var/run/screen/S-root.

The default session name is constructed from the tty and host names, which isn't vary useful as you can see from the last entry above. To give a screen a name, you specify it with the -S option.

screen -S mySessionName

It's even more useful when combined with -R, in which case the -S can be omitted. This causes screen to attach to an existing session with the given session name, or create a new one with that name. Combined with -d or -x, it's a very powerful feature. :)

screen -xR mySessionName

Changing the Session Name

Session names can be changed on an existing session using the :sessionname command.

C-a :sessionname mySessionName

Closing Notes

Session names, combined with window titles, makes life a lot easier when you have multiple sessions with multiple windows in each.

sessionnames.1161287862.txt.gz · Last modified: 2009/01/28 12:18 (external edit)
Recent changes RSS feed GNU General Public License Driven by DokuWiki