Hacker News new | past | comments | ask | show | jobs | submit login
A 'revisited' guide to GNU Screen (linuxgazette.net)
43 points by ypk on Nov 3, 2009 | hide | past | favorite | 29 comments



Oddly, it doesn't mention tmux (http://tmux.sourceforge.net/), a newer project that implements a similar terminal multiplexer. It was redesigned from the ground up to more cleanly accommodate several features that have been grafted onto the screen codebase. (It also has a BSD license, FWIW.)

After years, screen still doesn't do vertical screen splits. It turned out to be faster to just start from scratch.


Honestly, it would be odd for a tmux article to go without mentioning screen but there is nothing odd about a screen article not mentioning tmux.

Speaking of which, I would like to see an article on tmux. Every now and then a screen article pops up and a few people chime in with the vague advantages of the BSD-licensed tmux, but I haven't seen any actual articles on tmux.


I'll put it in my queue of things to write about. Honestly, if I just gathered together content from my comments, I'd already be halfway there...


I use both. The only big difference? Besides the license? Screen uses 'Ctrl+A' while tmux uses 'Ctrl+B' and screen -r (to reattach) is replaced by tmux attach. That's it, for me at least. tmux seems to have a lot more features, but I only use 10% of them.


The biggest difference as far as I'm concerned is that it has vertical screen splitting and xmonad / dwm-style automatic tiled layouts built in. I've also looked into the codebases for both, and if I were working on new features, I would far rather work on tmux's - it's much cleaner.


An easily changed option is not a big difference.

From what I can tell, screen has better handling of colors. tmux seems to mess up the <Esc>[90m; -like sequence for colors 8-15.

Also, I like the ability to highlight screen's current screen with colored parentheses.


Tmux's splitting is nice, but not quite as useful to me as screen's version. Screen will let me put any of my existing windows in a "pane" while tmux won't (or maybe it does and the docs aren't clear enough for me).

Another thing I found useful with screen was having multiple terminals attached to the same screen session, with each terminal viewing different windows. Tmux will let multiple terminals attach to a single session, but they all see the same thing (again, maybe I just haven't figured out how to do this yet).

Neither of these are deal breakers for me though. I switched from screen a couple months ago, and I've been a happy tmux user since.


Vertical splitting has been available in screen-git for over a year.


why, oh why do I learn of this jewel only just now - after years of being pissed at screen?

Please accept my heartfelt thanks for pointing me (and hopefully many other people) to this awesome piece of software.

Screen how it should have worked from the beginning.

You completely sold me the moment I pressed ^B= and then used the cursor keys(!) to scroll the window (what HORROR - intuitive scrolling).

Thank you ever so much.

You made my day.


That was a good writeup. I use screen so often, that I don't think much about it, so this article was a good refresher.

A little off topic, but: I should spend about 5% of the time I devote to exploring new programming languages to revisiting command shortcuts, etc. for tools like Emacs, Idea, Rubymine, Eclipse, etc. A few days ago, I set up Emacs for Rails development (involved learning a bunch of new keyboard shortcuts) - now depending on what aspects of a project I am working on, I use either Rubymine or Emacs (or TextMate if I have my MacBook booted to OS X)


I almost welcome the bimonthly screen article. I adore that program.


Same here , when i discovered it i couldn't understand how i had been working without it for so long , suddenly i had 1 large terminal rather than "n" different terminals.

The only thing i miss now is vertical splits , i think tmux solves that problem as well.


"The only thing i miss now is vertical splits , i think tmux solves that problem as well."

Ctrl-A+S or Ctrl-A+| ?


Just checked in ubuntu, those two commands will enable a horizontal split and a vertical split, respectively. Thats great, screen has been amazingly useful since the day I discovered it and have split windows working fully is just icing on the cake.


The screen handling of vt100 emulation is badly broken, based on my recent experience with it. A valid vt100 sequence was completely borking the terminal session.

I've unfortunately not had the time to chase the bug down, and the boxes that are generating the vt100 sequences are not where I can make them available to the screen developers, either.

For those that are looking to achieve (better) vt100 compliance, there is a reasonable test suite available at the http://vt100.net/ site.


Screen doesn't do vertical splits. That's a dealbreaker for me. Tmux does.

But tmux has another problem: very rapid scrolling in one window will make the program completely unresponsive. In the same situation, screen doesn't have this problem. I posted to the user list and the developer very quickly sent me a patch, but it didn't fix the problem for me, although it worked for the developer. Still working with the developer on this.


There is a port of screen that includes vertical splits. Its nifty, but requires the source to be patched:

http://fungi.yuggoth.org/vsp4s/


I read the README/blog post somewhere that vertical scrolling in one of the subwindows is very slow. Hence I have not tried it out. Do you have any experience with this?


Just tried out the screen from git as somebody pointed out above. Works as advertised. Pretty cool!


Screen has apparently had this in CVS since 2008:

http://savannah.gnu.org/bugs/?15442


So what you're saying is that one of the most demanded features has been in the CVS version since June of 2008, but hasn't made it into a stable release?


gnu screen is the reason i find terminal tabs obsolete.


Agreed. screen is one of the single most useful tools I use.


terminal tabs are still useful when you want to have multiple screen sessions on multiple physical machines. I run a screen session on my server with Irssi and admin stuff in one terminal tab, and another terminal session for my local machine. But honestly, Terminator [1] beats out tabs with it's useful split terminal layout. I can on-the-fly arbitrarily split, hide, maximize, or group panes, and then I can have multiple tabs worth of split terminals. It's quite fun. :)

[1] http://www.tenshu.net/terminator/



Could you explain why this is relevant, rather than just linking to it?


It's not really that relevant IMO, but maybe fans of screen want to extend the screen approach to their whole computing experience? That's basically the goal of ratpoison, which is a window manager based around the idea of tiling and complete control via the keyboard, overall much simpler than KWin, etc.


I knew why, but I've actually had much better luck with dwm (http://dwm.suckless.org/) * . The automatically-tiled / multiple desktops interface style works verrry well with a keyboard-centric usage style, but also more gracefully accommodates programs that expect a more conventional UI - ratpoison just seems to give up. (I used ratpoison exclusively for probably three or four years.)

* Other people have also had good experience with XMonad (http://xmonad.org/) or awesome (http://awesome.naquadah.org/), though the former requires Haskell (I got burned by GHC's portability issues, and requiring GHC for a window manager strikes me as a bit silly), and awesome strikes me as a bit dodgy.


On that note, I've just started using ion3 (http://www.modeemi.fi/~tuomov/ion/), which is a similarly-focused tiling, keyboard-friendly window manager. I'm still unsure about how useful it is on my laptop, but at work where I have huge monitors, it's great. I never move my windows anyway, so there's no point in spending time aligning them, or wasting the space between them. It is still awkward for certain applications, though.




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

Search: