[kwlug-disc] Quick survey on tmux

John Sellens jsellens at syonex.com
Sun Sep 11 02:51:32 EDT 2022


I may be misunderstanding how tmux works, but I think it might be
similar to the screen use case.

e.g. Create local xterm on localhost, ssh to remotehost, run tmux
on remotehost, and perhaps have multiple panes in the tmux running
on remotehost.

If the connection drops, then you run ssh again, and then run "tmux attach"
on remotehost to re-connect to your existing tmux.

You could also have multiple xterms on localhost, ssh-ing to multiple tmux
sessions on remotehost.  And of course multiple remotehosts.

I think it's similar to how one uses screen, but tmux has more features.

What sshp does is automate the ssh re-connection and the "tmux attach"
("screen -r").

If you just have one ssh to one remotehost, it's not a big deal.

If you have 5 or 10 sessions to re-ssh and re-attach, I find it annoying.

sshp automates that, and also automates the creation of the initial screen
session on the remotehost.

i.e. I run "xterm -e sshp remotehost" and that's all I have to do, and
it's all persistent.

I think for my typical usage, I would still find sshp useful even if I
was a dedicated tmux user.

You mileage may vary of course!

John


On Sat, 2022/09/10 03:57:26PM -0400, CrankyOldBugger <crankyoldbugger at gmail.com> wrote:
| That's actually one of the features that sold me on tmux..  I've been
| regularly working on a particular server at work and I had to setup several
| panes so that I could monitor activity concurrently.  Unfortunately our VPN
| at work sometimes drops the connection.  I was going in and resetting all
| the panes each time, until I found out that I could reactivate my previous
| session, with the right panes setup, using 'tmux attach', and whammo:
| there's all my panes setup just the way they were before.
| 
| 
| 
| On Sat, Sep 10, 2022 at 3:52 PM John Sellens <jsellens at syonex.com> wrote:
| 
| > Just in case anyone is interested, I'll mention my little tool
| > that I use constantly every day:
| >
| >     sshp - simple persistent ssh connections using screen
| >     https://github.com/jsellens/sshp
| >
| > I constantly have xterm windows with ssh connections open to remote
| > machines.  If I put my local machine to sleep, or it crashes, or
| > my connection goes out, those connections used to drop and I would
| > lose all remote context.
| >
| > I put sshp together after I started working (pretty much) only from
| > home, in large part so I could sleep my desktop when I'm not working,
| > and not have to restart all my connections.
| >
| > It works by transparently starting a screen on the remote end, and
| > connecting/re-connecting to that screen session as needed.  I use
| > screen, and not tmux (habit), but I suspect it could be modified to
| > use tmux on the remote side if someone were keen.
| >
| > Hope some of you might find it handy.
| >
| > Cheers
| >
| > John




More information about the kwlug-disc mailing list