From time to time I get badly confused about which terminal window does what. This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display the name of the command being run. In most cases that would be an ssh command and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu,
but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Thanks for reading,
bob prohaska
From time to time I get badly confused about which terminal window does what. This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display the name of the command being run. In most cases that would be an ssh command and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu,
but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
On 2026-02-18, bp@www.zefox.net <bp@www.zefox.net> wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display >> the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu,
but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Thanks for reading,
bob prohaska
You need to write the string ESC]0;Title^G to the terminal.
I have this in a little script called xtn which does this.
To generate ESC in bash use ^V^[ where '^' is holding down the control key. ^G is done like wise. You will have to wrap the strings in quotes
e.g. echo -n "^[]0;"$1"^G"
good luck. I've just done this in LXTerminal with bash as my shell.
bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display >> the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu,
but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
bash should set the window title to the current command, using the same escape sequence. If it doesn't:
a) you aren't using bash. Maybe it needs to be enabled in your shell?
b) bash is not configured to set the title, I'm not sure where you'd find that
c) your terminal is not advertising itself as a suitable type that uses the escape code. What's your TERM variable set to?
d) your terminal is choosing not to display it, for some reason (perhaps
the configuration you mention above)
On 19/02/2026 03:47, bp@www.zefox.net wrote:
Theo <theom+news@chiark.greenend.org.uk> wrote:
bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >>>> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
No. Neither does it trigger an error message....
bash should set the window title to the current command, using the sameAccording to /etc/passwd, bash is my login shell, running
escape sequence. If it doesn't:
a) you aren't using bash. Maybe it needs to be enabled in your shell?
bob@raspberrypi:~$ echo $TERM
xterm-256color
suggests that lxterm is a variant of xterm, which makes sense.
b) bash is not configured to set the title, I'm not sure where you'd find >>> that
c) your terminal is not advertising itself as a suitable type that uses the >>> escape code. What's your TERM variable set to?
As above, xterm-256color
d) your terminal is choosing not to display it, for some reason (perhaps >>> the configuration you mention above)The configuration file at ~/.config/lxterminal/lxterminal.conf contains
quite a few entries, but none appears to be related to titles. The man
page for lxterminal doesn't give any useful hints. The config file
appears to be name=value format, Shift-ctrl-I brings up the dialog
to manually enter a title which is interpreted as a simple string.
Does
echo -en "\033]0;Hello World\007"
work?
Gordon Henderson <gordon+usenet@drogon.net> wrote:
In article <10n560g$2u42e$1@dont-email.me>, <bp@www.zefox.net> wrote: >>>From time to time I get badly confused about which terminal window does what.This suggestion might touch on a fundamental issue: Which host,
This is on a Pi5 running bookworm, if it matters.
This is on "generic Linux" if it matters:
In ~/bin I have an executable script:
#!/bin/sh
if [ "x$*" = x ]; then
echo -n "\033];`hostname`\007"
else
echo -n "\033];$*\007"
fi
I call it 'xtt' (xterm title - works in xterm and other terminals I use)
You make it yours and call it what you like.
So xtt on it's own resets the title to your hostname (handy if you login
to many systems) othrwise it sets the title to whatever you put on the
command line
xtt silly editing session
for example
Your challenge is to make it work automatically for every command
you type.. (I don't need that functionality, I use it inside other
scripts that start stuff)
the ssh client or the ssh server, gets to set the window or tab
title on the client machine running RasPiOS? I've been thinking
it's the RasPiOS machine displaying the window or tab. If I'm
understanding you correctly it's the server end of the connection.
Is that correct?
I'm working with only one RasPiOS workstation client and several
FreeBSD servers. I'd rather customize the workstation than the
servers, if that's possible.
In article <10n7fpe$3lun8$2@dont-email.me>, <bp@www.zefox.net> wrote:
This suggestion might touch on a fundamental issue: Which host,
the ssh client or the ssh server, gets to set the window or tab
title on the client machine running RasPiOS? I've been thinking
it's the RasPiOS machine displaying the window or tab. If I'm
understanding you correctly it's the server end of the connection.
Is that correct?
It's whatever you want it to be. In my case it's the client - which to
avoid ambiguity is the system I type the ssh command on...
Jim Jackson <jj@franjam.org.uk> wrote:
On 2026-02-18, bp@www.zefox.net <bp@www.zefox.net> wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >>> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Thanks for reading,
bob prohaska
You need to write the string ESC]0;Title^G to the terminal.
I have this in a little script called xtn which does this.
To generate ESC in bash use ^V^[ where '^' is holding down the control key.
^G is done like wise. You will have to wrap the strings in quotes
e.g. echo -n "^[]0;"$1"^G"
good luck. I've just done this in LXTerminal with bash as my shell.
It doesn't seem to do much of anything in my case. Here's a transcript: bob@raspberrypi:~$ echo $TERM
xterm-256color
bob@raspberrypi:~$ echo -n "^[]0;"$1"^G"
^[]0;^Gbob@raspberrypi:~$
bob@raspberrypi:~$
I was hoping to see the title change, but no luck. As you might
guess, my fluency with shells is abysmal. I use them only in a
very simple-minded way, usually to type single commands.
Thanks for writing!
bob prohaska
Theo <theom+news@chiark.greenend.org.uk> wrote:
bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >>> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
No. Neither does it trigger an error message....
bash should set the window title to the current command, using the sameAccording to /etc/passwd, bash is my login shell, running
escape sequence. If it doesn't:
a) you aren't using bash. Maybe it needs to be enabled in your shell?
bob@raspberrypi:~$ echo $TERM
xterm-256color
suggests that lxterm is a variant of xterm, which makes sense.
b) bash is not configured to set the title, I'm not sure where you'd find
that
c) your terminal is not advertising itself as a suitable type that uses the >> escape code. What's your TERM variable set to?
As above, xterm-256color
d) your terminal is choosing not to display it, for some reason (perhapsThe configuration file at ~/.config/lxterminal/lxterminal.conf contains
the configuration you mention above)
quite a few entries, but none appears to be related to titles. The man
page for lxterminal doesn't give any useful hints. The config file
appears to be name=value format, Shift-ctrl-I brings up the dialog
to manually enter a title which is interpreted as a simple string.
Richard Harnden <richard.nospam@gmail.invalid> wrote:
Does
echo -en "\033]0;Hello World\007"
work?
No, it doesn't do anything visible:
bob@raspberrypi:~$ echo -en "\033]0;Hello World\007"
bob@raspberrypi:~$
so no output beyond the echoed input and no change in
the tab title. I rather wonder where the command output
went, since no error was reported.
If I'm missing something idiotic please point it out!
Does
echo -en "\033]0;Hello World\007"
work?
From time to time I get badly confused about which terminal window does what. >This is on a Pi5 running bookworm, if it matters.
In article <10n560g$2u42e$1@dont-email.me>, <bp@www.zefox.net> wrote:
From time to time I get badly confused about which terminal window does what. >>This is on a Pi5 running bookworm, if it matters.
This is on "generic Linux" if it matters:
In ~/bin I have an executable script:
#!/bin/sh
if [ "x$*" = x ]; then
echo -n "\033];`hostname`\007"
else
echo -n "\033];$*\007"
fi
I call it 'xtt' (xterm title - works in xterm and other terminals I use)
You make it yours and call it what you like.
So xtt on it's own resets the title to your hostname (handy if you login
to many systems) othrwise it sets the title to whatever you put on the command line
xtt silly editing session
for example
Your challenge is to make it work automatically for every command
you type.. (I don't need that functionality, I use it inside other
scripts that start stuff)
Gordon
bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display >> the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu,
but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
Jim Jackson <jj@franjam.org.uk> wrote:
On 2026-02-18, bp@www.zefox.net <bp@www.zefox.net> wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >>> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Thanks for reading,
bob prohaska
You need to write the string ESC]0;Title^G to the terminal.
I have this in a little script called xtn which does this.
To generate ESC in bash use ^V^[ where '^' is holding down the control key.
^G is done like wise. You will have to wrap the strings in quotes
e.g. echo -n "^[]0;"$1"^G"
good luck. I've just done this in LXTerminal with bash as my shell.
It doesn't seem to do much of anything in my case. Here's a transcript: bob@raspberrypi:~$ echo $TERM
xterm-256color
bob@raspberrypi:~$ echo -n "^[]0;"$1"^G"
^[]0;^Gbob@raspberrypi:~$
bob@raspberrypi:~$
I was hoping to see the title change, but no luck. As you might
guess, my fluency with shells is abysmal. I use them only in a
very simple-minded way, usually to type single commands.
On 2026-02-18 at 20:43 AST, Theo <theom+news@chiark.greenend.org.uk> wrote:
bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
I realize that the conversation has moved on, but for anyone coming in late...
There is a '3' in the above line which should not be there.
Try
$ echo -en "\e]0;$TITLE\a"
Richard Harnden <richard.nospam@gmail.invalid> wrote:
On 19/02/2026 03:47, bp@www.zefox.net wrote:
Does
echo -en "\033]0;Hello World\007"
work?
No, it doesn't do anything visible:
It seems the remaining puzzle is how to replace the string
Hello World with the name of the last-typed command...
On 22/02/2026 00:21, bp@www.zefox.net wrote:
It seems the remaining puzzle is how to replace the string
Hello World with the name of the last-typed command...
I think this works ...
ESC=$(echo -en "\033")
BEL=$(echo -en "\007")
export HISTFILE=~./bash_history$(tty | sed "s,/,_,g")
export PS1='${ESC}]0;\
$(fc -ln -1 |\
tail -1 |\
sed "s/^[[:space:]]*//g")${BEL}\
${LOGNAME}@${HOSTNAME}:${PWD/$HOME/\~} $ '
On 25/02/2026 19:45, Jim Jackson wrote:
Depends whether you want your desktop to be consistent, or have half
??? Why a differnet desktop. Just a different terminal emulator -
or are modern Term.
a dozen different types of menus and window furniture on the apps
that you use.
On 23/02/2026 18:18, bp@www.zefox.net wrote:
I really owe everybody an apology here. I thought there'd
be some trivial way to auto-title lxterminal windows so
they could be easily distinguished. Clearly there isn't
such a thing. The "name tab" option takes only a few seconds
and is probably the most efficient way to keep folks like me
from typing the wrong commands in the wrong window....
The problem is lxterminal is not as fully featured as the alternatives
most people were probably using when they suggested the command
sequences which work for them.
You might want to consider an alternative desktop with a different
terminal program, MATE is almost as light weight as Pixel and runs very nicely on Pi4s and Pi5s.
Jim Diamond <zsd@jdvb.ca> wrote:
On 2026-02-18 at 20:43 AST, Theo <theom+news@chiark.greenend.org.uk> wrote: >>> bp@www.zefox.net wrote:
From time to time I get badly confused about which terminal window does what.
This is on a Pi5 running bookworm, if it matters.
One thing that would help is causing each lxterminl window or tab to display
the name of the command being run. In most cases that would be an ssh command
and hostname.
Obviously, this can be done manually by using the Tabs > Name Tab menuu, >>>> but it seems likely there'd be a setting in .config/lxterminal/lxterminal.conf
which I'm unable to intuit.
Does anyone know if this is true, and if so what syntax is required?
Does this set the window title:
$ export TITLE="hello world"
$ echo -en "\e]30;$TITLE\a"
I realize that the conversation has moved on, but for anyone coming in late...
There is a '3' in the above line which should not be there.
Try
$ echo -en "\e]0;$TITLE\a"
They both work for me (in Konsole). According to:
$ zless /usr/share/doc/xterm/ctlseqs.txt.gz
Code | Sun | CDE | XTerm | Description
OSC 0 ST | - | yes | yes | set window and icon title
OSC 1 ST | - | yes | yes | set icon label
OSC 2 ST | - | yes | yes | set window title
OSC 3 ST | - | n/a | yes | set X server property
where OSC ('operating system command') is 'ESC ]' in 7-bit mode (0x9b in 8-bit mode) and ST ('sequence terminator') is 'ESC \' or 0x9c. So it looks like the first 3 is overridden by the second 0 as there's no OSC 3 0 ST command listed.
On Wed, 25 Feb 2026 20:42:05 +0000, druck wrote:
On 25/02/2026 19:45, Jim Jackson wrote:
Depends whether you want your desktop to be consistent, or have half
??? Why a differnet desktop. Just a different terminal emulator -
or are modern Term.
a dozen different types of menus and window furniture on the apps
that you use.
Especially if you do this on the day your interior decorator comes to
visit ...
On 25/02/2026 19:45, Jim Jackson wrote:
On 2026-02-23, druck <news@druck.org.uk> wrote:Depends whether you want your desktop to be consistent, or have half a
On 23/02/2026 18:18, bp@www.zefox.net wrote:
You might want to consider an alternative desktop with a different
terminal program, MATE is almost as light weight as Pixel and runs very
nicely on Pi4s and Pi5s.
??? Why a differnet desktop. Just a different terminal emulator - or are
modern Term.
dozen different types of menus and window furniture on the apps that you use.
On 2026-02-26, Jim Diamond <zsd@jdvb.ca> wrote:
Huh. They don't work for me in urxvt.
Of course, the question was about lxterminal. So maybe it didn't work for >> the OP because of the '3', and maybe for some other reason.
just installed rxvt-unicode, fired it up and ran my usual terminal name script which uses these codes and it works! Dunno what makes you setup
not work.
Huh. They don't work for me in urxvt.
Of course, the question was about lxterminal. So maybe it didn't work for the OP because of the '3', and maybe for some other reason.
I'm on Devuan, so urxvt is the Debian one.
On 2026-02-27 at 12:24 AST, Jim Jackson <jj@franjam.org.uk> wrote:
On 2026-02-26, Jim Diamond <zsd@jdvb.ca> wrote:
Huh. They don't work for me in urxvt.
Of course, the question was about lxterminal. So maybe it didn't work for >>> the OP because of the '3', and maybe for some other reason.
just installed rxvt-unicode, fired it up and ran my usual terminal name
script which uses these codes and it works! Dunno what makes you setup
not work.
Me neither. I just tried it again, in case I had done something wrong.
Perhaps your urxvt was compiled with different options than mine, and one such option allows more
transparent,tint,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,
scrollbars=plain+rxvt+NeXT+xterm
| Sysop: | Tetrazocine |
|---|---|
| Location: | Melbourne, VIC, Australia |
| Users: | 16 |
| Nodes: | 8 (0 / 8) |
| Uptime: | 138:06:02 |
| Calls: | 207 |
| Files: | 21,502 |
| Messages: | 80,627 |