Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using wmctrl to move applications after I have launched them such that I do not have to do this manually for, for example, several text editors and web browsers and pdf viewers and terminals. I am issuing the following wmctrl command to move applications around

wmctrl -r <title> -e <x>,<y>,0,-1,-1

where < x > and < y > are the horizontal and vertical target coordinates, and < title > is the name of the application as returned by wmctrl -l. If I launch two copies of google chrome via the below commands,

google-chrome &
google-chrome &

then issue the command

wmctrl -l 

the window names returned are

0x03c06fd9  0 main New Tab - Google Chrome
0x03c0703d  0 main New Tab - Google Chrome

now if I try to move one of those to an arbitrary coordinate, lets say 100,100, with the following command

wmctrl -r "Google Chrome" -e 100,100,0,-1,-1

It will, if you haven't already guessed it, move THIS google chrome window I am currently typing in, as I opened it prior to the other two.

Is there some way to assign these window titles when launching from the command line, or to reset them later. I need to change the names to something like

Google Chrome 1
Google Chrome 2
Google Chrome 3

Note there are two ways around this that I am aware of, however, I do not like either of them, for they could lead to problems if the OS launches a program in the background.

  1. Instead of using the title, use the numerical window ID via the -i command.
  2. Use the string :ACTIVE: to use the active window
share|improve this question
up vote 0 down vote accepted

Use the xttitle program from the xttitle package. Note the TWO "t"s in x*tt*itle. Well, actually, there are 3 "t"s... but I've only had trouble mistyping the first two.

share|improve this answer
if you google xttitle it says 'did you mean xtitle' =P – puk Oct 18 '11 at 4:27

Your Answer


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.