Screenshot showing two windows sharing the same screen session

Linux/Unix has so many cool utilities for the command line and very often I find new things about the tools that I am already using. I have recently upgraded to dual screens at home (19” and 22” combo) and needed a command line window to be open on each screen. I have been using screen to have multiple sessions and keep my taskbar uncluttered1, but the multiple windows put an interesting spin on my screen usage. I wanted to be able to switch to any session in either window without having to detach and then reattach in a different window. So, I started reading the screen manual and noticed the -x command line argument. Guess what it does? Attach to a session which is already attached elsewhere (multi-display mode). Exactly what I was looking for!

By the way if you are looking a hosting service, make sure to checkout WebFaction. They have excellent packages and support, and have screen installed on their servers.

1Additionally, with screen you don’t have to open multiple SSH session if you are connected remotely.

Back to blog...