I'd like to have few virtual session in one putty window and change between them quickly. What's the best way to do that?
screen? I know I can detach with
ctrl+ad and then reattach to a different session, but it's seems like a lot of typing.
After so much time I made a Script to work around this completely missing feature. First of all it needs a fifo:
This named pipe is useful for the communication between the detatched session and the "Main-without-screen" session.
File sc ( in $PATH ):
An Example of a "CONFIGFILE" is: ~/.screen/Monitorrc
The result is: when you want to launch screen type:
or another sessionrc you like to invent, I use the Session Work for various stuff
Now we are in the Session Monitor, when we type:
the session Monitor detaches itself and write "Work" to the namedpipe. Consequently the first sc script goes forward and attach the session "Work".
When we detach all Sessions we are in a infinite loop so we have to do Ctrl-c to exit.
What the others say is correct. I just want to mention
Just to expand on what Ansgar said in case you aren't very familiar with gnu screen, Having multiple "windows" in a single screen session will likely accomplish what you need.
ctrl+a, c will create a new "window" in your active screen session. You can switch between multiple windows (as Ansgar indicated) with ctrl+a, n for the next window, and ctrl+a,p for the previous window.
ctrl+a," will give you a list of all your open windows.
Using these easy shortcuts will let you switch between different terminals very quickly and easily, accomplishing your goal without using multiple screen sessions.
If you add the following line to ~/.screenrc it will always display your open windows and which one is selected, so you don't need to keep track of which window you're on by remembering.
This is the hardstatus line that I like to use, but it's completely customizable (see man page or search google for "gnu screen hardstatus").
There are a ton of other things you can do with it (naming the different open windows for example), so it's worth reading some tutorials.
Here are a couple I found with a quick search:
And of course the most useful of all:
Hope that helps.