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

Is there a way to focus a certain window under Gnome without bringing the window up?


I'm creating a script to type an arbitrary sequence characters on a certain window/application. With the help of xdotool, it is possible. But any focus function that it provides -- or any other tools do -- brings the target window forward. That, I want to find a way around.

share|improve this question

You can change the focusing habit of windows in Ubuntu like this

First got to:

System -> Preferences -> Windows

Then Check "Select windows when the mouse moves over them"

Gnome 2 Windows Preferences Dialogue

Make sure "Raise selected windows after an interval" is deselected.

Hope this helps.

share|improve this answer
My system is already set up just like what you suggested. But what I want to do is focus a window without raising it using a command-line tool. – Gödel Sep 4 '11 at 6:16
in that case I would use either wmctrl or Sikuli – Allan Sep 4 '11 at 22:09

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.