3 ms·
Maybe I'm a bit weird, but I don't know why you'd want to run tmux locally as an alternative to using tiling wm/tabs/other equivalent feature of your terminal e
by aragilar 1y ago
Maybe I'm a bit weird, but I don't know why you'd want to run tmux locally as an alternative to using tiling wm/tabs/other equivalent feature of your terminal emulator? I use tmux in two ways:
1. Persistent long-running sessions (which typically involve having more than one tty going at once, so something like shpool seems like a downgrade).
2. Local named-network-namespace sessions where I'm connected to a VPN and so not having to reconnect to the same namespace/vpn for every new tty is a benefit.
Also, if you do physically connect to a headless machine, it's nice to not need to keep having to open a new getty session (or be able to log out of a session) ;)
- em-bee 1y agoi have 5 tmux sessions with a total of 19 windows on my laptop, one of which contains a localhost ssh connection to a second account where i have another tmux session with half a dozen windows. not to mention the tmux sessions i have on my servers. the key benefit is i only need to learn one set of commands to switch sessions and windows, and to create new windows. the sessions all run in a single terminal window, so when i have multiple other windows, i don't have to switch between them to find the right terminal window. terminals have tabs, but they don't group tabs into sessions. a single terminal with 19 tabs would not work. i use the gui to start the terminal. i would have to find out how to script starting a terminal with multiple tabs. tmux is more easily scriptable, and again, i can't avoid learning tmux, since i use it remotely, and so when using it locally too, i don't have to learn a different way for my local machine. finally, although rarely needed, i can log out, or my gui can crash, but the tmux sessions survive. i can also connect to my laptop from a different device and attach to the tmux sessions that way. for a gui terminal to replace tmux the foremost feature i need is for it to remember my windows and tabs, just like the browser does. i have not come across any terminal that does that (but i admit, i haven't done a exhaustive search either). gnome (or any WM) can remember which apps i have open, but it can't remember the state inside the apps. being able to reproduce state is really the key. i have a few vim sessions for example, easily remembered and recalled from my command line history. i could use gvim if i could figure out how to connect a gvim window with a terminal such that they form one unit, because every vim session is connected a number of commandline operations. (i believe BeOS/haiku can potentially do that based on the way its window tabs work)
- atq2119 1y ago> localhost ssh connection to a second account Any particular reason why you cannot simply use su or sudo for this?
- em-bee 1y agoit would not make a difference, would it? do you see any benefits? ssh -X can forward windows to my gui and it just works.
- atq2119 1y agoThe overhead is certainly less. I haven't felt the need to run a graphical application as a different user in a long time, but presumably you could forward the right environment variables and have it work including HW acceleration (which ssh X forwarding certainly doesn't support)
- em-bee 1y agook, good point. i didn't consider that. it hasn't been a problem so far. probably my laptop is fast enough. but i'll keep that in mind. thanks
- rkangel 1y agoTwo reasons: I don't use a tiling WM, and tmux[1] does an excellent job at the tiling features. I do the majority of my work physically at a Linux (Fedora) desktop, but I also work from home SSH'd to that desktop. Being able to just attach to the same session and pick up where I left off, with all the same shell management, is great. [1] I used tmux for years, but have very recently switched to Zellij. I find the pane navigation to be much smoother (and more discoverable).