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

To open a web browser, I currently use xdg-open inside a python app. However the web browser steals focus. The Python webbrowser module is unreliable so how could I use xdg-open without the browser stealing focus?


share|improve this question
up vote 1 down vote accepted

Try adding the -iconic flag to your command, even though some window managers may choose to ignore it but I believe Unity acknowledges it.

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.