Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Jim Diamond Newsgroups: comp.sys.raspberry-pi Subject: Re: Titles in lxterminal Date: Fri, 20 Feb 2026 15:50:30 -0400 Organization: A noiseless patient Spider Lines: 72 Message-ID: References: <10n560g$2u42e$1@dont-email.me> <10n5vkt$36eqb$1@dont-email.me> Injection-Date: Fri, 20 Feb 2026 19:50:32 +0000 (UTC) Injection-Info: dont-email.me; posting-host="d8c26c423fc644f028345392112e252f"; logging-data="697802"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ykbnxJKeLpTUQO+sFNhFl" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:T0n4a9L1//EPinF4Q/rOrvDHM9E= Xref: csiph.com comp.sys.raspberry-pi:37781 On 2026-02-18 at 23:22 AST, bp@www.zefox.net wrote: > Jim Jackson wrote: >> On 2026-02-18, 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. Bob, bp mentioned that he was using a script, and in his script $1 would be the first argument to the script. You were just typing that from the command line, where $1 is not what you want. As has been pointed out (and "bravo"ed), there are less error-prone ways to get the escape char out of the echo command, but assuming you know that to get ^[ you want to type Ctrl-V Escape and that to get ^G you want to type Ctrl-V Ctrl-G then putting something useful in for $1 above might help: echo -n "^[]0;Hello There^G" Finally, if something in your default setup is resetting the tab/terminal title to something else every time before the prompt is printed, try echo -n "^[]0;Hello There^G" ; sleep 10 and see if you see "Hello There" for 10 seconds (+/-) after you hit Enter. Cheers. Jim