At startup I use a little script that creates a number of byobu-sessions i.e. 'LOCAL','SSH','SSH2','INTERNAL','GUAKE','DEV'

I use a windows tiling manager (awesome wm) and most of the time I keep a terminal-emulator with a specific byobu-session on their designated desktop/tag.

At the moment I'm using xfce4-terminal-emulator, which has an option to use a dynamic title. However, none of the solutions I've found seem to work in combination with byobu/tmux.
If I'm trying to find a terminal window in my window list, they all appear as user@hostname(ip address)-byobu

So, I would like to use a workflow where I can either set the window title from the terminal-emulator or it gets set when opening (or switching to) a byobu-session


The terminal does not need any special "dynamic title" support – it literally just shows whatever text Byobu (or another application) is telling it to show. In this case, byobu always provides the same static text on startup. ($BYOBU_NO_TITLE would disable it entirely.)

More usefully, you can make tmux provide its own title (overriding the static one from Byobu) through a custom ~/.config/byobu/.tmux.conf:

set -g set-titles on
set -g set-titles-string "#(whoami)@#H - byobu (#S)"
set -g set-titles on
set -g set-titles-string "#T (#h.#S.#I)"

The full syntax can be found in the tmux(1) manual page under "FORMATS" – in these examples, #S is the session name, #W and #I are the current window name & index, and so on.

Various programs running inside tmux/byobu will often provide their own terminal titles, so it's useful to include #T as well.

  • I noticed that all terminal-emulator sessions are sharing the title, a custom title per window could not be set. I ran this in one terminal and noticed in the windowlist that all my emulator had renamed their title to the tmux session name, exactly what I needed !! – oneindelijk Oct 9 '19 at 14:03

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.