Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xterm window title not set
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mortonP
Tux's lil' helper
Tux's lil' helper


Joined: 22 Dec 2015
Posts: 88

PostPosted: Sat Jun 15, 2024 3:51 pm    Post subject: xterm window title not set Reply with quote

[Administrator note: this post, and only this post, was originally attached to the solved topic [SOLVED] bash-5.1_p16-r10 issue with window title (ssh). The problems appear unrelated, and the original thread was solved, so I split this out. -Hu]

I'm not sure whether this is the correct thread...

...but I upgraded all packages (finally a free weekend to do the profile switch...) and now setting the title in a simple xterm+bash no longer works with:
echo -ne "\033]0;MYTITLE\007"

I used that extensively to distinguish my xterms :-/
..how to restore the old behaviour?

Thank you!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21978

PostPosted: Sat Jun 15, 2024 4:25 pm    Post subject: Reply with quote

Your prior location was not in the correct thread. That thread was solved, and discussed a problem where the Gentoo default changed such that ssh sessions would not attempt to set their title. Your problem is that you are attempting to set the title, and it is not working.

Per Guidelines item #4, we need more information. The shown statement works for me here. Please show emerge --pretend --verbose x11-terms/xterm app-shells/bash ; /bin/bash --version ; echo -ne "\033]0;MYTITLE\007" | od -tx1z. Please describe what "no longer works" means: is the title set to the wrong string? An empty string? Is ssh involved? Please test running echo -ne "\033]0;MYTITLE\007" ; sleep 1m, and check whether the window title is correct for the duration of that 1 minute sleep.
Back to top
View user's profile Send private message
mortonP
Tux's lil' helper
Tux's lil' helper


Joined: 22 Dec 2015
Posts: 88

PostPosted: Sun Jun 16, 2024 7:18 am    Post subject: Reply with quote

Hu wrote:
Your prior location was not in the correct thread.
Please test running echo -ne "\033]0;MYTITLE\007" ; sleep 1m, and check whether the window title is correct for the duration of that 1 minute sleep.


I apologize, I searched for "bash, xterm, title" and that thread seemed the best fit.
Having slept now and calmed down...
...great idea with "sleep 1m". The title is set, but reverts then.

Testing this:
bash 5.1_p16-r6 works
bash 5.1_p16-r11 does not

The emerge info on the bash changes got drowned in the full profile rebuild and I was panicking getting a working machine back again.

Addition of "unset PROMPT_COMMAND" at the end of .bashrc reverts to old behaviour and my title setting echo command works as expected.

Only question left: Where to add this "unset" line globally, so this does not have to be added to every user's .bashrc?

Your patience is appreciated, thanks for helping!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21978

PostPosted: Sun Jun 16, 2024 3:26 pm    Post subject: Reply with quote

Since Gentoo's default bash initialization reads and runs files in /etc/bash/bashrc.d, I would add a system-wide override as a new file there.
Back to top
View user's profile Send private message
RumpletonBongworth
n00b
n00b


Joined: 17 Jun 2024
Posts: 60

PostPosted: Mon Jun 17, 2024 10:57 am    Post subject: Reply with quote

Hu wrote:
Since Gentoo's default bash initialization reads and runs files in /etc/bash/bashrc.d, I would add a system-wide override as a new file there.

For the benefit of anyone reading that might not know, I would add that the file has to have a name that's lexicographically greater than the files beginning with "10-". For example, "99-local.bash".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum