May 5th, 2003, 22:47
Ok, so it just occured to me that perhaps one of my favourite apps, screen, has never been discussed here on SE (at least not that I recall!!).

Screen is the greatest thing for those who do a lot of remote work via ssh etc. How many times have you started that ftp download on the server from your laptop, then decide to pack up and go home only to realize you'll have to axe that download cuz it ain't finished? Or, what's worse, is when you have a process running on a remote host... hmmm like say a backup, and the connection goes down. Bye bye back up.

Well, screen allows you to detach from the shell you have open while not disturbing whatever is happening there and then you can resume the screen from another location or another computer whenever you're ready.

Awesome :lol:

Check it out, it's in the ports for *BSD!!!!

May 5th, 2003, 23:08
I gotta agree with minion here screen is one of the best console tools ever.

May 5th, 2003, 23:50
I also love screen.... Just used it the other day, when moving a huge file with scp between servers over the internet, start the scp going, de-tach the console thanks to screen, and then re-tach to it when I was at home several hours later to see how it all went.

Very usefull when doing all this using a laptop that you take everywhere with you. Don't want to have to wait around just for files to download/copy! Great when doing overnight - massive moves....

I made screen a standard install on all my bsd boxes years ago...

KrUsTy! brand seal of approval for screen!


May 5th, 2003, 23:52
Scrollback buffer is nice. You can set it to 1000 lines, 10000 lines, or whatever your mem can handle. Wanna see some messages that scrolled by a while ago? It might be in your scrollback history. This has saved me during those embarassing times that i have erroneously edited a file w/o saving a backup - when i'm lucky the essential parts are in my scrollback buffer.

Logging to file is useful too. Forget to pipe all output to a file, or to run 'script' before starting a series of commands and output you want to record? Then turn on logging real quick. I've used this to record the steps i took when working on the test server.

Having multiple shells open in the same spot is nice too. Easily slip between shells on different machines w/o moving your eyes or hands. Or, if you're on a machine w/o X, you can move between multiple shells w/o using virtual terminals (not all $ARCH's have this and you could use it with only console access too).

If you share your sysadmin responsibility with someone, and want them to see what's going on, screen's can be shared, so even if you are both at different locations you can see the same thing that's happening on a server while it's happening, in the same virtual window/shell. My coworker and i do this when working on particularly troublesome problems.

No mouse on the system in question? Use screen to copy text between shells, possibly even shells on different servers. If you get good with keyboard commands, this may even be quicker than a mouse.

And of course screen just rocks for maintaining state between workplaces, presenting me with not just the same environment but with the same state (e.g. same last commands in the same screen) across locations.

I've found it really difficult to explain to people what exactly screen does; it's as if only experimentation can teach someone. Sad b/c the usefulness of screen is right up there with the best.

Anyone else have some helpful methods to use screen?

May 6th, 2003, 13:54
I'm embarassed to say that I've known about screen for years but didn't try it out until a few months ago. I use it constantly now for almost everything on the commandline. I used to worked around needing it more or less but screen makes things so much more reliable since a lost connection to a remote machine doesn't kill things.

Several long time screen users I've talked to don't bother to give session names when they fire it up. This seems kinda silly if you use more than one screen session at a time (which I do a lot). You have to do a screen -list or find the pid to resume it. It's so much easier to give it a name. 'screen -S irc irssi' is how I fire up my irc client then I always know that screen -r irc will get it back without looking it up. I like to name my session something simple for what it is doing (scp, wget, etc.).

I've been looking through the ports a bit lately to make sure that I'm not over looking any other cool programs that could be "must haves" for me. There's a ton of good stuff out there.

I recently tried synergy2.sourceforge.net and thought it was nice. It's another remote control software that works across platforms. You use one one keyboard and mouse to control but your cursor jumps from screen to screen like having multiple monitors even though they are connected to different machines.

I want to take a look at Xmove( moving applications between displays) next because it looks like it has some potential. Anyone have some input on this?

May 6th, 2003, 14:06
I want to take a look at Xmove( moving applications between displays) next because it looks like it has some potential. Anyone have some input on this?

I don't know about Xmove, but if you're interested in interaction between X running on different machines, check out Konkhydra. It's been a couple years since i last used it, but it worked well before.