On Thu, Sep 24, 2009 at 11:16:00AM -0500, Gerald Young wrote: > To use multiple screen sessions, I run a main screen session that inside > contains windows running other screen sessions. > > For example: > * main session > - window 1: misc session > - window 2: coding session > - window 3: ssh session > > And then each nested session has their own set of windows: > * misc session > - window 1: bash > - window 2: etc > * coding session > - window 1: vim file1 > - window 2: make > * ssh session > - window 1: ssh server1 > - window 2: ssh server2 > > The main session has Ctrl+S as the screen command key (instead of Ctrl+A). > That way I control either the main session or any of the other sessions by > using Ctrl+S or Ctrl+A respectively. The "Ctrl+S 1" sequence would take me to > the misc session, for example. > > I run the main session with something like: > screen -e ^Ss -S main_session > > And on the shell that pops up I run my other sessions (each on their own > window): > screen -t misc_session screen -mS misc_session > screen -t coding_session screen -mS coding_session > screen -t ssh_session screen -mS ssh_session >
Hi Gerald, thanks so much for your enlightenment. The '-m' option seems to be the key to nested sessions. Below are my configurations (snippets) that I'd love to share with you: .screenrc: escape \377\377 # disable C-a bindkey -k k6 command bind c screen screen -m -c $HOME/.screen.sub.rc screen 0 screen -m -c $HOME/.screen.sub.rc .screen.sub.rc escape \377\377 # disable C-a bindkey -k k7 command bindkey -k k8 prev bindkey -k k9 next With function keys k6, k7, k8 and k9, I'm able to switch very conveniently between sessions and windows within nested sessions. To create a new session, I press f6 and c; to create a new window, I press f7 and c; to switch to the next window within the same session, I press f9; to switch to the next session, I press f6 and n, and so on. I also considered to use Ctrl-Alt-Left/Right keys, but it seems they are not distinguished from Left/Right keys, or at least under linux console terminal. So finally, I give them up. Thanks again for your kind help, Cheng _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users