Monday, May 6, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3297  / 2 Years ago, fri, may 20, 2022, 6:35:02

How can I programmically set the gnome-terminal title? I've tried



gnome-terminal --title="bla"


but this opens a new terminal window while outputting



Xlib:  extension "RANDR" missing on display ":0.0".

More From » gnome-terminal

 Answers
6

Got this to work



PROMPT_COMMAND='echo -ne "033]0;g0007"' 


If this did not change your terminal title you will first have to open ~/.bashrc. Find the line that says:



PS1="[e]0;${debian_chroot:+($debian_chroot)}u@h: wa]$PS1"


Comment out this line, by putting a # character in front of it:



# PS1="[e]0;${debian_chroot:+($debian_chroot)}u@h: wa]$PS1"


Now add this line (you may want to put it just after the commented-out line):



PROMPT_COMMAND='echo -ne "033]0;Terminal title name change here007"'


Replace Terminal title name change here with whatever you want to change the Terminal title to be, if anything.


[#37285] Sunday, May 22, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
soahan

Total Points: 230
Total Questions: 123
Total Answers: 123

Location: Maldives
Member since Tue, Dec 21, 2021
2 Years ago
soahan questions
Fri, May 7, 21, 06:17, 3 Years ago
Mon, Jan 16, 23, 05:49, 1 Year ago
Mon, Dec 13, 21, 14:40, 2 Years ago
;