News for hackers. Stuff that matters.
Re:GNU Screen: an introduction and beginner's tutorial by indigoviolet on Wednesday February 03, 2010 @02:18PM (#1098564)
Stop using Screen. Switch to Tmux (http://tmux.sourceforge.net/). Screen is voodoo. Tmux isn't.

EDIT: Compare my tmux.conf (http://pastebin.com/m2394d7a2) and my screenrc (http://pastebin.com/d7bb649a5). It was much easier for me to set up tmux the way I wanted from reading the manpage, than it was to configure screen. My screenrc is a hotchpotch of cut-and-paste from lots of different sources, but I never really understood screen. Maybe that's just me.

Re:GNU Screen: an introduction and beginner's tutorial by silentbicycle on Wednesday February 03, 2010 @02:57PM (#1098674)
Care to clarify "screen is voodoo. tmux isn't."? That's pretty meaningless.

The overall design to tmux is quite a bit cleaner, and (having poked around in their respective sources), I know which I'd be more likely to contribute patches to. It took screen forever to get vertical splits (are they still an unofficial patch?), whereas tmux already has dwm/XMonad-style layouts.

tmux is also included in the standard OpenBSD install. Make what of that you will.

Re:GNU Screen: an introduction and beginner's tutorial by indigoviolet on Wednesday February 03, 2010 @04:01PM (#1098852)
Compare my tmux.conf (http://pastebin.com/m2394d7a2) and my screenrc (http://pastebin.com/d7bb649a5).

Granted, my screenrc is a hotchpotch of cut-and-paste and default stuff from lots of places, but that's actually the point: I could read through the tmux manpage and set up tmux the way I wanted, without cobbling a conf file together from the blog posts and mailing list emails of wiser people.

Re:GNU Screen: an introduction and beginner's tutorial by thenduks on Wednesday February 03, 2010 @04:43PM (#1098955)
Not being familiar with tmux at all I tried to simply drop in your config (changing only the default path) but all I get is syntax errors at every turn (unknown option status-justify at line 4).

    tmux 0.8 (20090604-0818)
Which is in the Ubuntu 9.10 repos. I'll take any suggestions, but I'm happy with screen :)
Re:GNU Screen: an introduction and beginner's tutorial by indigoviolet on Wednesday February 03, 2010 @04:52PM (#1098977)
my tmux is cvs. You can just comment out the options that fail, but I recommend getting a newer release. It builds really painlessly.
Re:GNU Screen: an introduction and beginner's tutorial by thenduks on Wednesday February 03, 2010 @05:04PM (#1099014)
Yea, noticed the newest is 1.1... I'd prefer to find a debian package for it rather than building it though, I often need to rebuild machines and I always regret adding steps like this (I can just stick with screen since it's everywhere for free). I'll see what I can find... Thanks.

Edit: 1.1 package: http://ftp.us.debian.org/debian/pool/main/t/tmux/tmux_1.1-1_...

Some commands are still not working (pane-active-border-bg and capture-pane, it seems) but I can take a closer look at those after playing with it for a while and getting comfortable.

Re:GNU Screen: an introduction and beginner's tutorial by pbhjpbhj on Wednesday February 03, 2010 @08:21PM (#1099478)
http://packages.debian.org/sid/tmux lists the deps and different arch's too.
Re:GNU Screen: an introduction and beginner's tutorial by indigoviolet on Wednesday February 03, 2010 @06:14PM (#1099199)
yeah, I built from cvs specifically for those commands.
Re:GNU Screen: an introduction and beginner's tutorial by zzzmarcus on Wednesday February 03, 2010 @03:31PM (#1098768)
Tmux solves a problem for me. Previously I was using a combination of Screen and dvtm (http://www.brain-dump.org/projects/dvtm/) to get the equivalent of multiple screens, each with their own splits. Screen can do splits but you can't maintain splits in one screen/tab and move to another screen with independent splits. It's hard to describe, but if you've used screen or dvtm you probably know what I mean. Tmux seems to have that built in. Awesome, thanks.
Re:GNU Screen: an introduction and beginner's tutorial by Sukotto on Wednesday February 03, 2010 @04:40PM (#1098947)
Screen has a very large chunk of the potential market share for this sort of utility app. Tmux is going to have to be 10 times better to get people to switch. ("Screen" also has a name that's easy to remember, and to spell.)

Is tmux 10 times better than screen? Cause that's what it's going to take to get people to switch at this point.

Re:GNU Screen: an introduction and beginner's tutorial by JoachimSchipper on Wednesday February 03, 2010 @05:33PM (#1099098)
Not 10 times, no. On the other hand, tmux is improving quickly; if not every day, at least every week. screen, on the other hand, seems pretty stagnant.
Re:GNU Screen: an introduction and beginner's tutorial by vidarh on Thursday February 04, 2010 @07:27AM (#1100349)
That's because screen does what most people who use it want. I haven't used "new" functionality in newer versions of screen since I first started using it years and years ago.
Re:GNU Screen: an introduction and beginner's tutorial by joe_the_user on Wednesday February 03, 2010 @05:18PM (#1099051)
Not having used either program, I'm more inclined to try tmux just because it seems to give some visual cues about what's happening. Gnu-screen seems oriented entirely towards remembering commands, something that doesn't appeal to me.

That said, I think both programs more explanation concerning what they do.

Re:GNU Screen: an introduction and beginner's tutorial by tvon on Wednesday February 03, 2010 @03:31PM (#1098766)
I wish someone would write an actual article on tmux and post it here, every time screen comes up I just here statements about the vague superiority of tmux.
Re:GNU Screen: an introduction and beginner's tutorial by silentbicycle on Wednesday February 03, 2010 @03:53PM (#1098832)
No promises, but I might get around to it this weekend. I've been meaning to write something for a while. The tmux man page is quite thorough, but there are a few things that might be confusing if you expect it to behave like screen, such as layouts.
Re:GNU Screen: an introduction and beginner's tutorial by 0wned on Wednesday February 03, 2010 @09:25PM (#1099584)
It's easy... rather than the Ctrl+A key sequence that you use in screen, use Ctrl+B in tmux. And to reattach, rather than screen -r, tmux attach does the trick. That's 90% of the usability difference.
Re:GNU Screen: an introduction and beginner's tutorial by FlemishBeeCycle on Wednesday February 03, 2010 @10:21PM (#1099661)
People usually point to the BSD license and better code-base as the main selling points. Then they point to vertical split (which you can patch screen to do).

Bottom line is, if you have a screen config you like - there's not much point in switching. If you're just getting into terminal multiplexers, it's worth a look.

Re:GNU Screen: an introduction and beginner's tutorial by philjackson on Wednesday February 03, 2010 @03:32PM (#1098770)
For emacs users Tmux is far more intuitive, what with the bindings you expect doing what you expect. Binding C-space for begin selection in screen seemed to be impossible.
Re:GNU Screen: an introduction and beginner's tutorial by jamesbritt on Wednesday February 03, 2010 @02:30PM (#1098599)
I've been using tmux, but it feels less inituitive than screen, and I haven't seen as many howto's and such for tmux as I have for screen.

tmux may be better, but it feels harder to get proficient with than screen.

Re:GNU Screen: an introduction and beginner's tutorial by silentbicycle on Wednesday February 03, 2010 @02:55PM (#1098665)
I haven't seen any HOWTOs for tmux (I've thought about writing one), but as usual, the OpenBSD man page is very good, and thorough: http://www.openbsd.org/cgi-bin/man.cgi?query=tmux
Re:GNU Screen: an introduction and beginner's tutorial by mdg on Wednesday February 03, 2010 @02:44PM (#1098635)
I tried tmux after "not getting" screen. I found tmux to just work without me having to do a lot of R-ingTFM. Speaking of RTFM, tmux is now in the base system of OpenBSD so I would not be surprised to see more how-to's online now (not sure when you tried it).
Re:GNU Screen: an introduction and beginner's tutorial by davemabe on Wednesday February 03, 2010 @02:42PM (#1098627)
Is screen really that terrible? Enough to switch to something else? Screen is largely standard at this point. Why would I want to switch to this tmux?
Re:GNU Screen: an introduction and beginner's tutorial by graywh on Wednesday February 03, 2010 @04:03PM (#1098861)
Tmux uses some non-standard escape sequences, e.g. ctrl- and ctrl-shift- arrow keys. In version 1.0 it's impossible to distinguish between ctrl-left and ctrl-shift-left.
Re:GNU Screen: an introduction and beginner's tutorial by graywh on Thursday February 04, 2010 @04:25PM (#1101647)
Turns out there's a window option "xterm-keys" that makes things better.
Re:GNU Screen: an introduction and beginner's tutorial by mattwdelong on Wednesday February 03, 2010 @02:52PM (#1098656)
The day I learned about Screen...It was pure bliss..it solved so many problems I didn't know I had.

Copy/pasting, Switching between workstations while working remotely all without losing your spot. Collaboration.

If you don't know about screen, and you find yourself using a CLI even just a little bit, you should take the time to learn it.

Re:GNU Screen: an introduction and beginner's tutorial by hypermatt on Wednesday February 03, 2010 @03:45PM (#1098813)
First thing I install on solaris, probably my favorite unix tool also ;) Can't imagine doing giant database imports without it.
Re:GNU Screen: an introduction and beginner's tutorial by mhansen on Wednesday February 03, 2010 @09:10PM (#1099563)
Screen has a hell of a learning curve.

If you're a beginner to screen, consider byobu. It's a user-friendly wrapper around screen with intelligent defaults and a discoverable menu-based configuration system. It's also very pretty :)

Screenshots: http://unixlab.blogspot.com/2009/11/enhancing-terminals-with...

Project: https://launchpad.net/byobu

Re:GNU Screen: an introduction and beginner's tutorial by dzlobin on Wednesday February 03, 2010 @08:38PM (#1099508)
Does anyone use screen and vim to pair program? Me and my co-founder tried to by ssh'ing into a common box, doing 1) screen -S pairprog 2) ctrl+a :multiuser on 3) ctrl-a :acladd username. However the second person always gets an error with something regarding multiuser
Re:GNU Screen: an introduction and beginner's tutorial by Psyonic on Wednesday February 03, 2010 @09:06PM (#1099558)
I've done it a few times with just step 1. I'm not a screen expert, but for whatever reason we didn't need 2 and 3
Re:GNU Screen: an introduction and beginner's tutorial by dzlobin on Wednesday February 03, 2010 @09:22PM (#1099581)
I'll give it a shot thanks! edit; thanks it works!
Re:GNU Screen: an introduction and beginner's tutorial by Psyonic on Thursday February 04, 2010 @11:39AM (#1100859)
I'm glad to hear it worked out. It's been quite helpful the few times I've needed it
Re:GNU Screen: an introduction and beginner's tutorial by rwmj on Wednesday February 03, 2010 @04:53PM (#1098982)
By coincidence I decided to properly configure screen yesterday, getting rid of the two stupid defaults that it comes with:

http://rwmj.wordpress.com/2010/02/01/screen/

Re:GNU Screen: an introduction and beginner's tutorial by idoh on Wednesday February 03, 2010 @03:07PM (#1098703)
While we are talking about screen - I'd really like to be able to highlight text in VIM (using the visual mode) and then be able to paste that into another screen. Does anyone know how to do this?
Re:GNU Screen: an introduction and beginner's tutorial by guns on Wednesday February 03, 2010 @04:10PM (#1098876)
ScreenShell. It leverages screen to create a viable REPL-buffer for vim, for any language that has an interactive interpreter.

http://www.vim.org/scripts/script.php?script_id=2711

Here's an article describing how to use it with lisp:

http://www.ktaylor.name/2009/11/vim-screen-lisp-programming-...

And finally, some key mappings to bind <C-c><C-c> to sending the current paragraph or selection to the interpreter, from any mode.

http://gist.github.com/278733

Re:GNU Screen: an introduction and beginner's tutorial by Diakronik on Wednesday February 10, 2010 @03:25AM (#1114482)
Found this about a week ago and am loving it. Almost all of my time is spent in Python or LaTeX, and having either ipython or bash open in a small window just a keystroke away is brilliant!
Re:GNU Screen: an introduction and beginner's tutorial by idoh on Wednesday February 03, 2010 @04:28PM (#1098921)
Thanks!
Re:GNU Screen: an introduction and beginner's tutorial by yan on Wednesday February 03, 2010 @03:20PM (#1098747)
I don't know off hand how to do it using a vim selection, but you can use screen selections. ^a, [, then navigation keys and space to select, ^a, ] to paste.
Re:GNU Screen: an introduction and beginner's tutorial by Jach on Wednesday February 03, 2010 @04:37PM (#1098944)
You could just copy into the global system buffer instead of vim's buffer. Highlight, then "+y (or d, p, etc.) (Yes you type the quotation mark and plus.) (And vim needs to be built with xterm, I think.)
Re:GNU Screen: an introduction and beginner's tutorial by doki_pen on Wednesday February 03, 2010 @11:19PM (#1099757)
dtach is a lightweight, minimalist alternative.

http://dtach.sourceforge.net/

Re:GNU Screen: an introduction and beginner's tutorial by graywh on Wednesday February 03, 2010 @11:38PM (#1099795)
Saying dtach is a minimalist alternative to screen or tmux is like saying notepad is a minimalist alternative to visual studio.
Re:GNU Screen: an introduction and beginner's tutorial by tman on Wednesday February 03, 2010 @04:21PM (#1098897)
It's worth grabbing the latest version of screen from git and installing it. That way you get vertical splits with ctrl-a ctrl-|. If you're running a new version of Ubuntu, you already have this.

Building screen isn't too hard. Run the autogen.sh script to generate the configure script.

Re:GNU Screen: an introduction and beginner's tutorial by emilind on Wednesday February 03, 2010 @08:45PM (#1099524)
I love love love screen, but ctrl-a is a terrible binding. ctrl-] works well for me.

I'm going to check out this tmux thing.