6 ms·
screen is another tool I use a lot, specially when connecting to remote servers over ssh.
by flexterra 15y ago
screen is another tool I use a lot, specially when connecting to remote servers over ssh.
- trb 15y agoScreen 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.
- yuvadam 15y agoscreen -d -m processName is practically the easiest way to run and daemonize a process.
- icebraining 15y agonohup processName
- iam 15y agoBut then the output goes into a black hole after you close your shell
- eis 15y agoYou can always redirect stdout/stderr to a file, e.g. nohup someapp > someapp.log
- LiveTheDream 15y agoThe output goes into nohup.out automatically.
- reinhardt 15y agoscreen 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?
- ez77 15y agoConsider the more lightweight dtach and dvtm. Following a well-known tradition, they each do one thing only, and do it well ;-).
- qwertyboy 15y agodtach is very tempting. Is there a nice way to keep all the scrollback history?
- thristian 15y agobyobu 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 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.
- revscat 15y agoI 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.
- cosgroveb 15y agoGNU screen is probably the most indispensable command-line tool I've learned since vi.
- alinajaf 15y ago(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.
- chrishenn 15y agoWhen 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.
- pyrhho 15y agoAgreed using 'screen -x' is a trick that routinely blows minds. (and is occasionally even useful)
- jodoherty 15y agoI 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.
- pavel_lishin 15y agoI 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.