Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to set a custom windows title in Linux?

share|improve this question
    
It might help to know if there's a particular program or set of programs that interest you. –  frabjous Jan 1 '11 at 16:04

2 Answers 2

up vote 1 down vote accepted

One way of doing it is to use xdotool, e.g., from the commandline:

xdotool search --name "Old name" set_window --name "New name"

This searches open windows that contain the name "Old name" and changes its name to "New name". You also search by Window class, PID and a variety of other things. See the xdotool man page.

There are probably other ways of setting the same automatically when the program starts depending on the program, and whether it uses Qt, or GTK, or what.

share|improve this answer
    
Thank you very much, xdotool sounds interesting. –  user_unknown Jan 2 '11 at 9:12

If the window in question is an xterm, you can use a magic escape sequence:

echo "^[]0;New name^G"

where ^[ is the escape character and ^G is control-G.

If the window is the Gnome Terminal, you can use the menu item "Terminal|Set Title".

Another way to write it is

 echo "\033]0;New name\007"
share|improve this answer
    
Very interesting! –  Ivan Z. G. Xiao Jun 4 '13 at 17:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.