Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Terminal Multiplexers: screen vs. tmux vs. etc.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  

Which terminal multiplexer do you use?
I use screen, because ...
55%
 55%  [ 10 ]
I use tmux, because ...
33%
 33%  [ 6 ]
I use dtach, because ...
5%
 5%  [ 1 ]
Real men just use nohup, because ...
0%
 0%  [ 0 ]
I use vnc or other graphical application, because I am a beta male.
0%
 0%  [ 0 ]
Other (please explain)
5%
 5%  [ 1 ]
Total Votes : 18

Author Message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 2:37 am    Post subject: Terminal Multiplexers: screen vs. tmux vs. etc. Reply with quote

Which terminal multiplexer do you use, and why?
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1102
Location: Rep. of Ireland

PostPosted: Mon Nov 12, 2012 2:39 am    Post subject: Reply with quote

Screen... it was the first I learnt and I didn't bother checking out any of the others.
_________________
juniper wrote:
you experience political reality dilation when travelling at american political speeds. it's in einstein's formulas. it's not their fault.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 3:32 am    Post subject: Reply with quote

I just started trying out tmux, but had been using screen for years for the same reason.

tmux seems to be functionally very similar, but the OpenBSD guys like it because it's more auditable (it's like screen, re-engineered, and it's not spaghetti code).

I'm still dabbling with it, trying to figure out how to detach and reattach to sessions.

A couple of differences so far:

Without any patching, it allows one to split both vertically and horizontally.
It seems to redraw better, and doesn't mangle the underlying terminal window.
It has not only sessions but "windows" (a different way of grouping clients, potentially enabling some activity of higher complexity).
The configuration file and command syntax seem much easier to understand.
I haven't tested it, but it is purported to be "lighter".

As to the other alternatives, 'dtach', which I haven't used, is apparently a simpler alternative which allows one merely to detach a remote terminal session and re-attach to it later on. It doesn't allow one to create multiple terminal sessions in a single terminal window. This ability to detach and then come back later is mostly what I have used screen for, so I imagine some people might find this useful (i.e., ssh into remote machine, start some long-running job, detach, log out of remote machine, then ssh back in later, re-attach to session and check to see how long-running job is doing).

Supposely, this (or something like it) is possible with nohup, but I've never suceeded with it, other than to create zombie processes. Supposedly one can also achieve this using the BASH built-in 'disown', but I've never attempted it. Screen worked, so I just kept using it.

I usually only have one desktop linux machine, so I've never had any use for remote graphical sessions.

I'm interested in knowing whether anybody has worked extensively enough with both screen and tmux to judge one a superior alternative to the other, if anybody is using 'dtach', and if anybody successfully uses nohup or disown as a means to run remote jobs and then reconnect to them.
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16114
Location: Colorado

PostPosted: Mon Nov 12, 2012 5:35 am    Post subject: Reply with quote

screen because it was the first utility of its kind I learned, didn't know others existed (and didn't bother to look because it works pretty darn well).

And VNC for those times when it is required (if something like Cygwin doesn't work or isn't available).

BoneKracker wrote:
tmux [...]

I haven't tested it, but it is purported to be "lighter".
Cool. I'll have to check it out. One reason to continue using screen may be available support for it vs. alternatives. AIX, HP-UX, Solaris, (...?).
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 6:01 am    Post subject: Reply with quote

Screen comes from GNU (who are notably "Not Unix", per the acronym). Tmux comes from BSD-land, who are indeed UNIX. So I would expect there to be no problems using it on AIX, HP-UX, Solaris, etc.

So far, from my brief dabbling, it does seem to be superior, at least in terms of ease of use, configuration, and scriptability. Some basics:

The command prefix is control + b (where screen's in control +a), but this is configurable.

'Detach' is done the same way, <command prefix> followed by 'd'.

To re-attach, use 'tmux attach' (where screen uses screen -r).

The man page is good. You can also '<command prefix> list-keys' and '<command prefix> list-commands'.
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
smartass
Apprentice
Apprentice


Joined: 04 Jul 2011
Posts: 189
Location: right behind you ... (you did turn around, didn't you?)

PostPosted: Mon Nov 12, 2012 6:27 am    Post subject: Reply with quote

BoneKracker wrote:

Supposely, this (or something like it) is possible with nohup, but I've never succeeded with it, other than to create zombie processes.

:D that rings a bell. Some of my colleagues used to start programs for device control with nohup and these scripts would periodically check their output and kill and spawn children like crazy bunnies, trapping various SIGs to ensure all children get killed with killall (gosh) so they were like a hydra. After that I made an init script for them and showed them screen as a better alternative to nohup. They adapted their scripts and guess what: Now they periodically kill and spawn screen and screen spawns subprocesses. Robust? Oh yeah. Clean? Well...

IIRC disown and nohup just do what they are supposed to do, they make sure the process won't die after the shell terminates. Reattaching is, however, possible only through some external tool like reptyr, but definitely isn't clean and efficient IMHO as it duplicates file descriptors and other stuff.

BK, what about cpu/mem consumption? Any observations? I'd expect tmux to be more efficient as it's supposed to be cleaner code. Also, have you tried tunneling X11 through ssh with tmux?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16114
Location: Colorado

PostPosted: Mon Nov 12, 2012 6:31 am    Post subject: Reply with quote

Solaris has (or had) GNU utilities available. I don't know if screen is among them. But it could be compiled. IIRC, I think HP-UX had a community supported package of utilities, but never encountered them installed.
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 6:39 am    Post subject: Reply with quote

smartass wrote:
BK, what about cpu/mem consumption? Any observations? I'd expect tmux to be more efficient as it's supposed to be cleaner code. Also, have you tried tunneling X11 through ssh with tmux?

No, I really haven't compared them, and I haven't tried tunneling X with it.
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4007
Location: USA

PostPosted: Mon Nov 12, 2012 11:06 pm    Post subject: Reply with quote

Also an avid gnu screen user. I was surprised also at its terminal capabilities and emulation...

I was looking for alternatives at a time (ideally, a lightweight one for a router/embedded solution) but didn't really find one, plus screen worked on many platforms (sunos, solaris, ultrix, netbsd, hpux) so it became my go-to.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 346
Location: NRW, Germany

PostPosted: Tue Nov 13, 2012 2:26 pm    Post subject: Reply with quote

tmux because it's the better screen.
Back to top
View user's profile Send private message
nomilieu
n00b
n00b


Joined: 22 Nov 2011
Posts: 24

PostPosted: Tue Nov 13, 2012 2:26 pm    Post subject: Reply with quote

tmux.

I started using it based on hype (being supposedly better than screen) and have had no issues with it. Also, the name is cooler.
And to be honest, sometimes reading GNU code is just scary.

Basically, I have no good reason to use it over screen, but I have no good reason to change either.
Back to top
View user's profile Send private message
woddfellow2
n00b
n00b


Joined: 01 Dec 2009
Posts: 20
Location: United States

PostPosted: Tue Nov 13, 2012 2:28 pm    Post subject: Reply with quote

I still use GNU Screen. I have barely bothered with tmux.
_________________
1-Crawl 2-Cnfg 3-ATF 4-Exit ?
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2031
Location: Germany

PostPosted: Tue Nov 13, 2012 5:55 pm    Post subject: Reply with quote

tmux

because it is not screen
_________________
AidanJT wrote:

Libertardian denial of reality is wholly unimpressive and unconvincing, and simply serves to demonstrate what a bunch of delusional fools they all are.

Satan's got perfectly toned abs and rocks a c-cup.
Back to top
View user's profile Send private message
danomac
l33t
l33t


Joined: 06 Nov 2004
Posts: 818
Location: Vancouver, BC

PostPosted: Tue Nov 13, 2012 7:36 pm    Post subject: Reply with quote

aidanjt wrote:
Screen... it was the first I learnt and I didn't bother checking out any of the others.


Same here. If it ain't broke, don't fix it.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4007
Location: USA

PostPosted: Tue Nov 13, 2012 7:45 pm    Post subject: Reply with quote

Anyone use USE=nethack for their app-misc/screen? :D

I emerged tmux, seems to work. Interesting default to show a status bar at the bottom (where gnu-screen hides it as soon as it can).

One thing I hate about gnu-screen. Googling "screen" doesn't do much :D
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1593
Location: Gentoo64 land

PostPosted: Tue Nov 13, 2012 8:18 pm    Post subject: Reply with quote

eccerr0r wrote:
Anyone use USE=nethack for their app-misc/screen? :D

I emerged tmux, seems to work. Interesting default to show a status bar at the bottom (where gnu-screen hides it as soon as it can).

One thing I hate about gnu-screen. Googling "screen" doesn't do much :D


yeah, luckily googling for 'man head' gave me the right results first...

OT: i use screen. lots of people have recommend tmux but i haven't bothered. i use screen for remote and expected-to-be long emerge jobs and also for managing some node.js services. aka nothing super major that makes me care how i mutex the terminal for remote/detached access.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1567
Location: U.S.A.

PostPosted: Tue Nov 13, 2012 10:11 pm    Post subject: Reply with quote

eccerr0r wrote:
Anyone use USE=nethack for their app-misc/screen? :D

No, but I had USE="offensive" on sudo for a long time.
Code:
~ # euse -i offensive
global use flags (searching: offensive)
************************************************************
[-      ] offensive - Enables potentially offensive items in packages

local use flags (searching: offensive)
************************************************************
[-      ] offensive
    app-admin/sudo: Let sudo print insults when the user types the wrong
    password.
        [-  ] 1.8.5_p2 [gentoo]
        [-  ] 1.8.5_p3 [gentoo]
        [-  ] 1.8.6_p3 [gentoo]

_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum