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


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 2:37 am Post subject: Terminal Multiplexers: screen vs. tmux vs. etc. |
|
|
Which terminal multiplexer do you use, and why? _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
aidanjt Veteran


Joined: 20 Feb 2005 Posts: 1101 Location: Rep. of Ireland
|
Posted: Mon Nov 12, 2012 2:39 am Post subject: |
|
|
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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 3:32 am Post subject: |
|
|
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. _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16033 Location: Colorado
|
Posted: Mon Nov 12, 2012 5:35 am Post subject: |
|
|
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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 6:01 am Post subject: |
|
|
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'. _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
smartass Tux's lil' helper

Joined: 04 Jul 2011 Posts: 148 Location: right behind you ... (you did turn around, didn't you?)
|
Posted: Mon Nov 12, 2012 6:27 am Post subject: |
|
|
| 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. |
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 |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 16033 Location: Colorado
|
Posted: Mon Nov 12, 2012 6:31 am Post subject: |
|
|
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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 6:39 am Post subject: |
|
|
| 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. _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
eccerr0r Advocate

Joined: 01 Jul 2004 Posts: 3040 Location: USA
|
Posted: Mon Nov 12, 2012 11:06 pm Post subject: |
|
|
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. _________________ Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating? |
|
| Back to top |
|
 |
Dr.Willy Apprentice

Joined: 15 Jul 2007 Posts: 296 Location: NRW, Germany
|
Posted: Tue Nov 13, 2012 2:26 pm Post subject: |
|
|
| tmux because it's the better screen. |
|
| Back to top |
|
 |
nomilieu n00b


Joined: 22 Nov 2011 Posts: 24
|
Posted: Tue Nov 13, 2012 2:26 pm Post subject: |
|
|
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 |
|
 |
woddfellow2 n00b


Joined: 01 Dec 2009 Posts: 20 Location: United States
|
Posted: Tue Nov 13, 2012 2:28 pm Post subject: |
|
|
I still use GNU Screen. I have barely bothered with tmux. _________________ 1-Crawl 2-Cnfg 3-ATF 4-Exit ? |
|
| Back to top |
|
 |
energyman76b Advocate


Joined: 26 Mar 2003 Posts: 2022 Location: Germany
|
Posted: Tue Nov 13, 2012 5:55 pm Post subject: |
|
|
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 |
|
 |
danomac l33t


Joined: 06 Nov 2004 Posts: 810 Location: Vancouver, BC
|
Posted: Tue Nov 13, 2012 7:36 pm Post subject: |
|
|
| 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 |
|
 |
eccerr0r Advocate

Joined: 01 Jul 2004 Posts: 3040 Location: USA
|
Posted: Tue Nov 13, 2012 7:45 pm Post subject: |
|
|
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 _________________ Core-i7-2700K@4.1GHz/8GB RAM/180GB SSD/Intel HD3000 graphics
What the heck am I advocating? |
|
| Back to top |
|
 |
jonnevers Veteran


Joined: 02 Jan 2003 Posts: 1585 Location: Gentoo64 land
|
Posted: Tue Nov 13, 2012 8:18 pm Post subject: |
|
|
| eccerr0r wrote: | Anyone use USE=nethack for their app-misc/screen?
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  |
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 |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Tue Nov 13, 2012 10:11 pm Post subject: |
|
|
| eccerr0r wrote: | Anyone use USE=nethack for their app-misc/screen?  |
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]
|
_________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
|