I have three possible ideas.
The first is to put all windows into the same session, and name them
all accordingly. I would consider this messy however, and screen lacks
any way to meaningfully sort windows except by most-recently-used.
Another idea is to use a nested screen session. Use a different escape
character for the outer than with the inner otherwise you'll damage
your brain. This is only really useful if you're continually switching
between them, and especially if you are copy/pasting between them
using screen's buffer.
Thirdly, you could simply detach and reattach. You could even speed
this up with a small script, perhaps written using dialog(1) to list
available sessions, connect to the chosen session, and repeat upon
detach. Here is a script which I worked up to do this (requires
'dialog' to be installed).
# Present a menu of screen sessions, and connect or reattach to it.
# Upon detach, repeat.
# Cameron Kerr <ckerr@...>
# 19 Jan 2009
dialog --backtitle 'Screen Connection Menu' "$@"
mydialog --aspect 20 --title "$1" --msgbox "$2" 0 0
msgbox Error "$1"
mydialog --menu "$text" 0 0 0 "$@"
screen -ls \
| sed -ne 's/^\t\([^\t]*\)\t(\(Detached\|Attached\))/\1\t\2/
| tee /tmp/foo \
| while read screen_id attachment
echo -n "$screen_id $attachment "
screen -x "$screen_id"
tempfile=$(tempfile 2>/dev/null) || tempfile=/tmp/dialog$$
trap "rm -f $tempfile" 0 1 2 5 15
eval menu '"Select screen session."' $(screen_sessions) 2>
case $retval in
0) view_screen $choice ;; # Option chosen
1) exit 0 ;; # Cancel chosen
255) exit 0 ;; # ESC pressed
while true; do
On 18/01/2009, at 5:28 AM, lanas wrote:
> Le Samedi, 17 Janvier 2009 16:52:35 +0100,
> grandpas <grandpas@...> a écrit :
>> I'm not sure to understand the question. You can have only one "big"
>> screen session with all your UML's inside, each on a virtual terminal
>> (and thus switchable through Ctrl-A xx).
>> For this you can use a specific .screenrc file to start many
>> and commands at the initialisation of screen. The following link has
>> some example screenrc files:
>> Screen is very convenient for UMLs, and should fit your needs. Or
>> maybe I misunderstood your problem?
> When UMLs are started in the following way:
> screen -d -m -S UML1 <...>
> screen -d -m -S UML2 <...>
> screen -d -m -S UML3 <...>
> Then there's seemingly no way to have a main comsole and do Ctrl-A S-"
> switching between sessions. So it means several terminals, each with
> its own 'screen -r <name>' when work/tests have to be performed on
> several UMLs.
> So that was the question: how to keep the 'switch console' while
> several UMLs launched in batch mode (eventually at boot time).
> It looks like, from a cursory browse of the link above, that it is
> possible to put the sessions in a resource file and then have the
> benefit of being able to use Ctrl-A S-". So that's great. The web
> site also seems to have a lot more about using screen, so thanks for
> the link.
> I'm also looking at ClusterSSH to perform simultaneous actions on
> several UMLs.
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> User-mode-linux-user mailing list
Cameron Kerr <ckerr@...>
Teaching Fellow, Computer Science, University of Otago