Need help with tmux

Think of tmux more as job control on steroids. I.e spawning a new xterm for every shell is quite wasteful.

But you need some xterms always present before your eyes,
continuously 'multiplexing' to see some output has no sense.

tmux as 'better' job-control has more or less so much use as job control.

I never needed more than one tmux server.
 
In a shell/bash you need to do something like this exec [terminal]....

if you want to send it to another display below some more examples

Code:
exec xterm -display :0.1 -e tmux new-session -s Session-Name03 -n Name-Windows \; split-window -v &

Code:
exec xterm tmux new-session -s Session-Name02 -n Windows-Name \; split-window -v \; selectp -t 0 \; split-window -h\; selectp -t 2 \; split-window -h\; selectp -t 3 \; split-window -h \; selectp -t 1 \; split-window -h &

Code:
exec alacritty -display :0.1 -e tmux new-session -s Session-Name01 -n Windows-name \; split-window -h \; new-window -n Windows-name2 \; split-window -h \; new-window -n Windows-name3 \; split-window -h &

---------------------------------------------------------------------------------------------------------------


AND To install plugin on tmux is easy... Here is what some AI said....

Installation Steps for tmux-resurrect​

To successfully install the tmux-resurrect plugin, follow these steps:

Step 1: Update Your .tmux.conf File​

Add the following line to your .tmux.conf file:



Code:
set -g @plugin 'tmux-plugins/tmux-resurrect'

Step 2: Install Tmux Plugin Manager (TPM)​

If you haven't already installed the Tmux Plugin Manager (TPM), you need to do that first. Use the following command to clone the TPM repository:



Code:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Then, add this line to the bottom of your .tmux.conf file to initialize TPM:



Code:
run '~/.tmux/plugins/tpm/tpm'
(ADD THIS LINE last on the tmux.conf)

Step 3: Install the Plugin​

  1. Start tmux by running the command tmux new in your terminal.
  2. Press prefix + I (where the default prefix is usually Ctrl-b) to install the plugin.

Step 4: Verify Installation​

After installation, you should see a message indicating that the tmux environment has been reloaded. You can now use tmux-resurrect to save and restore your tmux sessions.

Key Commands for tmux-resurrect​

  • Save Environment: prefix + Ctrl-s
  • Restore Environment: `prefix + Ctrl-r
 
And if he is using X11, then tmux makes also not much sense.
The reason I use tmux under X11 is because I can quickly swap between windows using C-> or C< rather than requiring to use the prefix key.

It makes life easier. I don't know why it works.
 
The reason I use tmux under X11 is because I can quickly swap between windows using C-> or C< rather than requiring to use the prefix key.
My tmux opens by default menus with C-B < and C-B >, these menus are a newer feature of tmux and run
normal tmux commands. The advantage of menus is, that you do not need to remember the commands or keys
associated to them, the disadvantage is that it is not so quickly as you say. Knowing keys is a big advantage also
in the console, I used emacs in (something like) a vt220 and use it today also under X11 in the same way, my
emacs is configured not to show menus or any other trash feature. Another advantage of tmux is the splitting of
windows as emacs and also nvi can do, more an advantage in the console.

For me is your wonderful use of tmux so an enigma as the use of the wonderful so called Desktop environments.
 
Back
Top