Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

screen is another tool I use a lot, specially when connecting to remote servers over ssh.


Screen is a bit like a window manager for consoles. I use it to start multiple (software) servers without daemon mode. I can then switch between their outputs with screen.

Screen also detaches the console from your ssh session. In my case this means that the servers keep running if I loose my ssh connection to the (hardware) server.

It's a very handy tool and definitely belongs in the articles list of tools.


    screen -d -m processName
is practically the easiest way to run and daemonize a process.


    nohup processName


But then the output goes into a black hole after you close your shell


You can always redirect stdout/stderr to a file, e.g. nohup someapp > someapp.log


The output goes into nohup.out automatically.


GNU screen is probably the most indispensable command-line tool I've learned since vi.


(Sort of) in the same vein, I've recently started using xmonad as my window manager and so far it's a lot more comfortable than the Ubuntu default. You may need to learn a teeny but of Haskell to get up and running, but so far I've been OK copy-pasting from sample configs and muddling through.


When I bought a new Macbook and wasn't able to run linux, XMonad was really the only thing I missed. No matter how much Apple focuses on it's interface and making it easy to use, it's still incredibly slow and unintuitive to me.


Agreed using 'screen -x' is a trick that routinely blows minds. (and is occasionally even useful)


I hate that the default escape key sequence clobbers over Ctrl-A though, so the first thing I always have to do when I log into a new server or account is this:

$ echo 'escape ^uU' > ~/.screenrc

Or I quickly start tearing my hair out and screaming profanities every time I try to do something.


I prefer ` (backtick) as my escape key sequence for both screen and tmux.

If you do this, though, be careful what you paste - if it has backticks in it, screen will interpret them as escape characters.


screen is one of those things that's been on my todo list for way too long, along with its alternatives(?), tmux and byobu. Anyone that uses/used all three and can offer a comparison?


byobu is something like a theme or packaged config for screen, so it doesn't really need to be treated separately.

The biggest difference between tmux and screen is that tmux is a lot more flexible with regard to laying out groups of sub-terminals within the main terminal. screen is mostly limited to one-at-a-time, horizontal splitting or (in very recent versions) vertical splitting, while tmux lets you go nuts: http://tmux.sourceforge.net/tmux3.png

Also, GNU screen is very old and stable, while tmux is (so far) still new and flexible. For example, tmux very quickly added support for handling Unicode characters beyond U+FFFF, a feat that (so far as I know) screen still can't manage. That's only one example, but I'm sure there'll be more as time goes on.

EDIT: One other thing that tmux does that makes it better than screen: when I start up a tmux session from within an X11 session, tmux clears the $DISPLAY variable so that processes running inside tmux don't try to connect to the original X server - which may very well have gone away at that point. It's a small thing, but incredibly annoying when it happens.


I switched from screen to tmux a while back. The key thing for me is that configuration and manipulations/operations in general are more user-friendly. Otherwise, in terms of the basic use cases, they are essentially the same.


I have used screen for many years and decided to finally give tmux a try about 2 months ago. I really enjoy it. It took some adjusting, but overall I like it better.

Things like this are largely due to personal preferences, though. All I can tell you is that I am happier with tmux than I was with screen. It is more modern, and the split screening capabilities are better.


Consider the more lightweight dtach and dvtm. Following a well-known tradition, they each do one thing only, and do it well ;-).


dtach is very tempting. Is there a nice way to keep all the scrollback history?


I switched from screen to tmux about three months ago. It's easier to configure, does vertical splits, and is under more active development (apparently).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: