4

I am trying to open an URL from the terminal window in my default browser which is Chromium:

$ xdg-open 'https://www.google.no/?gws_rd=ssl#q=site:askubuntu.com+xdg-open' >/dev/null

This will open the URL in a new tab in Chromium browser, but focus is still in the terminal window. How can I also bring Chromium browser to the front of my desktop, and give it focus?

5

You can keep your command as is and change the way applications are getting automatic focus by changing the following settings.

Open a terminal and type:

dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 0

To restore the initial behaviour:

dconf write /org/compiz/profiles/unity/plugins/core/focus-prevention-level 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.