Posted: Tue Oct 21, 2008 3:43 am Post subject: Screen just the way we like it

I wrote this little hack because I was tired of managing screen sessions and doing 'screen -r' and having to figure out which screen was the one I wanted.

Essentially what it does is ensure that you only have one screen session at any given time. Any new programs are run as new windows inside your existing screen session. You can then scroll through your open screen apps with Ctrl+AN

I called this 'scn' but you could name it whatever you want. Just put it in your path and then alias all your apps you want to run in screen to 'scn command'.

For example I have this as ~/bin/scn which I added to my $PATH and I alias pork to 'scn pork' and irssi to 'scn irssi'. I also aliased sr='screen -r' for faster access.

There is also 'screenie' if I remember the name correctly, that you may find usefull, to manage your different screen sessions.

I personnally have as master screeen, with nested screens inside:
F1 -> goes the window 0 of the master screen, that's where I have one of my screens
F2 -> goes the window 1 of the master screen, that's where I have an other screen
F3 -> ...
...
F5 -> goes the window 4 of the master screen, that's where I have an other screen
F6 -> is the 'escape' of the 'master' screen.

This way, I almost never play with screen -r, I just play with F{1..6}, and some aliases to create/reattach the screen in case there are detached._________________The End of the Internet!

will start a screen session called "IRC", detach yourself from it and launch the command "irssi"

a quick: screen -list will show up a more meaningful name for screen sessions

then you can re-attach with screen -r IRC

This way I have lots-o-screens running BUT can easily tell which one is which_________________The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king