On one of my clients' servers, I've been using the tmux
status bar to monitor long-running processes, both through the automatic window-name changes and by setting window names through ANSI control codes in scripts. It's incredibly useful when you have to run a dozen processes at a time and see which ones are finished.
They recently moved the server to a new provider (Amazon AWS, I believe), and suddenly tmux
is crippled. There's no automatic name-changes on the tmux
status bar, and it won't respond to the scripts' name-changes (it does respond to some script changes, I'll have to work out why it isn't doing all of them).
I've tried various configuration changes, but nothing seems to make a difference — the "name" is always X:login@hostname:workingdir
(where X is the window index).
Am I doing something wrong, or is it a limitation of the server? In either case, is there some way to fix it?
Here's my current .tmux.conf
file:
set -g xterm-keys on
#bind-key C-b last-window
set -sg escape-time 20
setw -g mode-keys vi
# Reload the config file on demand.
bind r source-file ~/.tmux.conf
set -g set-titles on
setw -g allow-rename on
#setw -g monitor-activity on
setw -g automatic-rename on
setw -g window-status-current-format "#I:#W#F"
setw -g window-status-format "#I:#W#F"
Old system: CentOS 6.10
Old tmux
version: 1.6
New system: CentOS 7
New tmux
version: 1.8
Best Answer
It turned out to be the value of
PROMPT_COMMAND
, set in/etc/bashrc
on the new server, overwriting anything I put as the window title every time the prompt was shown. :-(