putty and screen

I’ve been using screen in Linux or Unix (Tru64) since around 1996. I left it for a number of years and didn’t start using screen regularly again until sometime in 2004. Since then I’ve been trying to learn more and more about screen’s endless feature set.

My favorite thing has more to due with a my use case for screen with putty. I’ve found it extremely useful to set my “Remote command” to “screen -U -x -R” in putty. This reconnects to a running putty session without disconnecting any other connected sessions. This setting is in putty under Connection->SSH.

Now I can ssh to a remote system using 2 or 3 putty instances and get the same screen session and have each different putty session in a different screen window. I can even split the screen windows in one session, and have them separate in another session. I’ve been using this for at least a year and it has very positively affected my productivity.

Other great putty tips include using Consolas (sorry, its only available to vista users or Visual Studio users) at 8pt for a font and using the putty -load command line to start a saved session. I type win-R putty -load myhost more than I should. Before I did the screen thing I set putty’s scrollback setting to 20000 lines. I like to minimize with the keyboard by pressing alt-space n, so I enable “System menu appears on ALT-Space”. Today I heard a complaint that putty closes the window and you don’t see what happened, but I’ve never experienced this because I always have the “warn before closing window” option.

This tip is the newest one to me, and I wish I had found it sooner. Under Window->Selection the behavior of double clicking a word is set. Double clicking URLs doesn’t normally work in putty, so you have to go change the character class of colon, question mark, and ampersand. Change the class to 2 and now when you double click a url it will be highlighted entirely!

I use port forwarding a ton, but I’m not going to explain it here. It has been explained before in many places. Use google.

1 thought on “putty and screen”

  1. Don’t you find that when using screen that was started on the host system and then taken elsewhere means that X is broken? Do you just do a new “export DISPLAY=blah” to fix X forwarding? Or do you not use X forwarding?

Comments are closed.