Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep the window's name fixed in tmux

Tags:

linux

tmux

People also ask

How do I change my tmux window name?

Panes are automatically named with their index, machine name and current command. To change the machine name you can run <C-b>R which will prompt you to enter a new name. *Pane renaming only works when you are in a shell.

How do you change panes in tmux?

Tmux uses the keybinding 'Prefix' followed by 'Ctrl+o' to cycle around the panes. When you use this key-binding for the first time, it moves the pane in one position clockwise.

How do I renumber windows in tmux?

The recently released tmux 1.7 includes the renumber-windows session option (keeps window numbers gapless), and the move-window -r command (does a one-time renumbering of windows). If you want “gapless” numbers for all sessions, then you could put set -g renumber-windows on in your config file (once you have tmux 1.7).


As shown in a comment to the main post: set-option -g allow-rename off in your .tmux.conf file


As suggested on the Super User link, setting the following variable in your .bashrc or .zshrc seems to solve the issue:

DISABLE_AUTO_TITLE=true

# set-window-option -g automatic-rename off 
set-option -g allow-rename off

Comment the first one, and set the second one, in the ~/.tmux.conf It works for me.


There is two way to disable automatic rename.

01. change .bashrc or .zshrc file and add this line

export DISABLE_AUTO_TITLE=true

02. or you can add this line to ~/.tmux.conf file

set-option -g allow-rename off
  • create it if not exist

  • Highly recommend the second option
  • Also you must reload the tmux config after changing the config.

This can be done either from within the tmux, by pressing Ctrl+B and then : to bring up a command prompt, and typing:

:source-file ~/.tmux.conf

Or simply from a shell:

$ tmux source-file ~/.tmux.conf