[kwlug-disc] Quick survey on tmux

Chris Irwin chris at chrisirwin.ca
Mon Sep 12 14:04:07 EDT 2022


On Sun, Sep 11, 2022, at 13:55, Khalid Baheyeldin wrote:
> I do the same with screen ... 
> 
> I have a screen session always on my home server with connections/sessions to 
> other servers and such.
> 
> I scripted this over a decade ago, by having a shell script called checkscreen
> run from .bash_profile with the following

I use the built-in functionality with screen to do this using named screen sessions:

    $ screen -DR devel

If 'devel' session doesn't exist, it creates it. If it does exist, it connects to it (including disconnecting another terminal you may have already had connected -- in case you left it connected from another place). It won't conflict with other sessions with different names.

I also have a function in my bashrc for is_in_screen, which is used to set a custom bash_history when in a named screen session. So my 'devel' session keeps separate history from 'testing', etc.

Myself, I looked at tmux, and didn't see any benefits to my use -- just a lot of re-learning to do what I've already been doing. That said, I work at a RHEL shop, so I'll probably have to adapt at some point.


-- 
*Chris Irwin*

email:   chris at chrisirwin.ca
  web: https://chrisirwin.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20220912/85c73ca5/attachment.htm>


More information about the kwlug-disc mailing list