Keep the window's name fixed in tmux

LinuxTmux

Linux Problem Overview


I'm new to tmux. I want to keep the windows' name fixed after I rename it. But after I renaming it, they keep changing when I execute the commands.

Is there any way that I can keep them in a static name?

Linux Solutions


Solution 1 - Linux

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

Solution 2 - Linux

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

Solution 3 - Linux

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

Solution 4 - Linux

# 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.

Solution 5 - Linux

In my .zshrc file , add the following config, it solved this problem.

DISABLE_AUTO_TITLE=true

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionXieziView Question on Stackoverflow
Solution 1 - LinuxpreactionView Answer on Stackoverflow
Solution 2 - LinuxJean Carlo MachadoView Answer on Stackoverflow
Solution 3 - LinuxMohammad RajablooView Answer on Stackoverflow
Solution 4 - LinuxVicotrView Answer on Stackoverflow
Solution 5 - Linuxyixing yanView Answer on Stackoverflow