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

Does a shell command exist to bring a already started program in gnome in the front of another.


Gedit and Nautilus are started. Nautilus is in the background and Gedit in the foreground.

How to i bring Nautilus in the front with a shell command?

share|improve this question
Other:… – karthick87 Jan 12 '11 at 19:40
up vote 9 down vote accepted


  • More information about xdotool can be found here.
share|improve this answer
Sure edit your post just as I'm composing mine... :( ) – frabjous Jan 12 '11 at 20:58

Another option is xdotool:

xdotool search --class Nautilus windowactivate

share|improve this answer

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.