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


wmctrl -R x-nautilus-session

why? how to get it working? Other windows are well controlled that way.

share|improve this question
up vote 2 down vote accepted

Try the following:

wmctrl -xF -R nautilus.Nautilus

Explanation of options:

  • x: interprets the specified Windows as the WM_CLASS name.
  • F: Modifies the behaviour of the window title matching algorithm. It will match only the full window title instead of a substring, when this option is used. Furthermore it makes the matching case sensitive.

To get a list of available windows and WM_CLASS values you can use: wmctrl -lx

share|improve this answer
Great! Thank you very much! – zuba Apr 20 '12 at 15:34
You're welcome! – lgarzo Apr 20 '12 at 16:05
Is there to get wmctrl to output the result? If success then output something? That way I can open the the application if there is no such window. – momo Apr 7 '15 at 17:50

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.