:: whot@salty:~> screen -ls
There are screens on:
The -S argument allows to specify a session name but I couldn't find a configuration to set this automatically. So I've added this little script:
$> cat $HOME/scripts/screen
/usr/bin/screen $([[ ($1 != -*) && ($# > 0) ]] && echo "-S $1") "$@"
Explanation: if called with 1 or more parameters and the first parameter does not start with a dash, replace a call in the form of screen command ... with screen -S command command ...
This results in screen sessions having useful names, allowing for more effective reattaching. And the obligatory, ahem, screenshots:
:: whot@yabbi:~> screen foo [detached from 17755.foo] :: whot@yabbi:~> screen bar [detached from 17766.bar] :: whot@yabbi:~> screen -ls There are screens on: 17766.bar (Detached) 17755.foo (Detached) 2 Sockets in /var/run/screen/S-whot.