[ale] Tmux, where have you been alll my life?

Dylan Northrup ale at doc-x.net
Wed Sep 14 10:42:12 EDT 2016


On Wed, Sep 14, 2016 at 8:28 AM, James Sumners <james.sumners at gmail.com>
wrote:

>
> On Wed, Sep 14, 2016 at 8:08 AM, DJ-Pfulio <djpfulio at jdpfu.com> wrote:
>
>> Just looked at that tmux cheat sheet.  Seems like a bunch of complexity
>> and keys
>> just to do something a push of a mouse will handled when using multiple
>> xterms
>> with focus-follows-mouse setup in the WM.
>>
>> I've got to be missing something. For years people I respect have been
>> crazy for
>> screen or tmux, but I just don't see the point.
>> * My connections are solid, disconnects just don't happen.
>> * I know how to use 'tee' so monitoring running jobs from anywhere isn't
>> hard.
>> * My desktop can be accessed from anywhere in the world, so anything
>> running
>> there will be seen as it progresses (GUI stuff).
>> * I know how to use batch processing (TaskSpooler) and 'at' for long
>> running
>> tasks that need to be queued.
>> * screen layouts are handled by normal X/Windows resources and WM
>> settings.
>> Hadar xterms open upper left. Romulus xterms open lower right. ... have
>> settings
>> for those things for decades.
>>
>> I've got to be missing something that tmux does. Right? Please convert me.
>>
>> I learn best by seeing - is there a great youtube video showing off tmux
>> that I
>> should watch?
>>
>
> Connections do fail. I don't care how stable they are 99.9999999% of the
> time. Do you want that rare occurrence to screw up a vitally important
> operation? If not, use a multiplexer.
>
> In general, it's nice to have a multiplexer so that work can simply be
> resumed when moving from one computer to another. They also offer much
> greater flexibility over a single connection and a single terminal window.
>

Even if connections don't fail, I am not always working from the same
host.  James gets it exactly right for my use case.  With tmux, I can
encapsulate context around a specific task by having multiple windows (or
panes in those windows) for a task.  Tmux also lets me attach to the same
session from multiple bash shells so I can move things around based on what
I need to focus on with a keystroke instead of having to move a mouse or
move windows.

My work setup has four monitors that regularly have ssh sessions up on
them.  With tmux, I can move the current activity to the "primary" monitor
and have others for referencing log files, man pages, running compiles,
etc. that are related to what I'm doing on the primary window.   Then, when
I need to reconnect from home, I can do the same thing (albeit with fewer
monitors) and have the current activity on one monitor and reference
information on the other.  And I don't need to reconnect to various hosts,
re-run session commands, etc.

But, for me, the killer app for tmux is being able to do something akin to
csshX inside a terminal without having to install anything on the box I'm
sitting at other than an ssh client.  Being able to run 'mwin
{web,app,db}host-{dev,ref,prod}{1,2}' and get an ssh session on 14 systems
with multiplexed input to be able to work on all of them at the same time
to be able to tweak a config, trigger chef/puppet, deploy a security patch,
etc. is amazing.

As far as "what is the tmux command to do X?" "C-b ?" is your friend (or,
for folks like me who remap C-b to C-a, "C-a ?").  If anyone is interested
in my tmux configurations (and helper scripts like 'mwin' listed above), I
have them in https://github.com/dylannorthrup/dotfiles/ .  My .tmux.conf is
in the top level, helper scripts are under ~/.tmux and 'mwin' is under
~/bin.  Happy to answer any questions folks might have.

-- 
Dylan Northrup
"Adversity is just change we haven't adapted ourselves to yet."
  - Aimee Mullins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20160914/c28018c2/attachment.html>


More information about the Ale mailing list