1

When I use tmux from urxvt, window title is not updated. Normally when I use just urxvt, window title is updated every time I change directory and it is in form of "$USER@$HOST:$PWD", but when I run tmux from urxvt, window title stays the same as it was before running tmux.

I have tried different set terminal-overrides in tmux.conf as suggested in some answers I found on google, but none worked.

Has anybody managed to make it work? I use Xmonad as WM, but same config works if I run tmux from xterm (title changed accordingly to set-titles-string in tmux.conf), so I guess that tmux and urxvt does not really understand each other.

Versions of software:

rxvt-unicode (urxvt) v9.21 - released: 2014-12-31

tmux 1.9

My dotfiles: https://github.com/overlordtm/dotfiles

1 Answer 1

0

tmux looks at the terminal description to see if it can set the title:

  • if the terminal description has the ncurses extended capability XT or
  • if the terminal description has the terminfo capabilities fsl and tsl (from- and to-status-line).

ncurses' terminfo database has defined XT for xterm entries for some time (since 2010); there is a discussion of the criteria for that in the ncurses database in Screen Extensions.

Only occasional entries might define the other capabilities for urxvt. If you did not modify the entry, it probably does not include fsl/tsl. The discussion in the terminal database explains why fsl/tsl are not recommended:

# These building-blocks allow access to the X titlebar and icon name as a
# status line.  There are a few problems in using them in entries:
#
# a) tsl should have a parameter to denote the column on which to transfer to
#    the status line.
# b) the "0" code for xterm updates both icon-title and window title.  Some
#    window managers such as twm (and possibly window managers descended from
#    it such as tvtwm, ctwm, and vtwm) track windows by icon-name. Thus, you
#    don't want to mess with icon-name when using those window managers.
#
# The extension "TS" is preferable, because it does not accept a parameter.
# However, if you are using a non-extended terminfo, "TS" is not visible.
xterm+sl|access X title line and icon name,
        hs,
        dsl=\E]0;\007, fsl=^G, tsl=\E]0;, TS=\E]0;,

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .