0

Overview

I created three VMs using Redhat 7.6, VMs are deployed using KVM.

  1. CNODE1 = 192.168.100.150
  2. CNODE2 = 192.168.100.151
  3. STORAGE= 192.168.100.200
  4. HOST = RHELHOST

Now because i have a habit of using tmux, so that whenever i type "connect" it automatically opens tmux session with Name "0" with 3 windows each one for 1 vm and automatically logins to all the vms. I added this alias in /etc/bashrc

alias connect='tmux new-session -s 0 -d "ssh root@192.168.100.150" \; rename-window -t 1 NODE1 \; new-window -n "NODE2" -d "ssh root@192.168.100.151" \; new-window -n "STORAGE" -d "ssh root@192.168.100.200" \; attach'

when i run alias "connect" it acts strangely , it seems it doesn't read the /etc/tmux.conf even though i tried to explicitly mention it using -f filter and source-file command .

  1. First, it doesn't show status bar, Status Bar only appears when i navigate to some other window. and

  2. lets suppose i try to divide the window of one Node1 ,instead of showing shell of node1 it shows shell of Host.

  3. In tmux.conf i added

    set-environment -g 'IGNOREEOF' 1 # for accidental exit But it still exits on first ctrl+d

I will add gif of my above actions

https://i.imgur.com/6591W81.gifv

1 Answer 1

0

tmux will only read tmux.conf when the tmux server is started or when you explicitly load it with the source-file command.

Splitting a window will always open a shell on the host tmux is running on unless you give a different shell command to split-window.

I'm not sure what is up with the status line, perhaps a redraw issue. Make sure TERM is correct outside tmux.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.