View previous topic :: View next topic |
Author |
Message |
musv Advocate
Joined: 01 Dec 2002 Posts: 3366 Location: de
|
Posted: Thu Sep 26, 2024 1:34 pm Post subject: [solved] Change window title of TMUX (and Screen) |
|
|
Hi,
I'm currently trying to modify my bashrc.
To change the title of my xterm-Window:
Code: | printf "\033]0;asdf\007" |
TMUX and Screen have different Escape sequences. Google (and Claude AI) told me:
Code: | printf "\033kasdf\033\\" |
But neither in Tmux nor in Screen it seems to work. What am I doing wrong?
Last edited by musv on Sun Sep 29, 2024 11:31 am; edited 1 time in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9846 Location: almost Mile High in the USA
|
Posted: Thu Sep 26, 2024 2:04 pm Post subject: |
|
|
speaking for gnu-screen here as I don't tmux much:
Apparently there are two "titles" for gnu-screen, one is the label (C-a A) and other is the xterm escape sequence. The xterm escape sequence will be saved and ported over to the actual terminal as you switch, but does not affect the gnu-screen title which you have to use C-a A.
Which specifically are you trying to change? What environment are you trying to use? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20521
|
Posted: Fri Sep 27, 2024 12:43 am Post subject: |
|
|
It probably depends on what you want to do. I'm guessing you use a single screen or tmux session and want it to update the GUI window's title?
For tmux, probably this: man tmux: | set-titles [on | off]
Attempt to set the client terminal title using the tsl and fsl terminfo(5) entries if they exist. tmux automatically sets these to
the \e]0;...\007 sequence if the terminal appears to be xterm(1). This option is off by default.
set-titles-string string
String used to set the client terminal title if set-titles is on. Formats are expanded, see the “FORMATS” section. | If you're using multiple windows within tmux, a comma (that is C-b, unless you've remapped C-b). Then there is also a pane title.
The "NAMES AND TITLES" section of the tmux man page may help. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
musv Advocate
Joined: 01 Dec 2002 Posts: 3366 Location: de
|
Posted: Sun Sep 29, 2024 11:32 am Post subject: |
|
|
Thanks. At least for Tmux it worked. |
|
Back to top |
|
|
|