Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

There are some gui programs where if you select them from the menu, if it is already open, instead of opening a new instance, that window will become foremost. However, there are some programs that will open multiple instances of themselves.

There is a certain program that exhibits the latter behavior but I want it to do the former. How can this be done?

share|improve this question
up vote 5 down vote accepted

I would recommend replacing the link to the program with a link to a shell script that checks if the program is running, and if it is, it uses the window manager's function to bring the program foremost, and if it isn't, starts it.

share|improve this answer
When I do ps ax | grep for the program it shows its status as S when it's running. If I close the program, then it doesn't disappear from the list. Instead it shows its status as S+. What does that mean? – tony_sid Aug 2 '10 at 14:35
^^^ That's a new question. ;-) – Chris Nava Aug 2 '10 at 14:37

Generally the application source code must be modified. It is not something done by the operating system.

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.