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

I have Opera set as my default browser but it is the same for Firefox. When opening a link in Liferea, the link opens in an external browser and the browser gets focus. I would like to open the links in background (so that the browser does not get focus).

The only solution is to set Focus prevention level to Normal in the Focus & Raise Behaviour tab of General options in CCSM. But this messes things for other things. DO you have any other idea how to prevent new windows to have focus?

I am using Unity on 11.10.

share|improve this question
up vote 2 down vote accepted

I think this is a bug, so I reported it. This used to work with Gnome 2, it works with Gnome Shell and Gnome 3 fallback. I suspect compiz, but what do I know.

share|improve this answer

Right-click on the window title bar of Liferea and choose "Always on Top". Now all your links will open in the background.

share|improve this answer
Hm, a useful workaround, but not without its drawbacks (I must set it to be on top, it interferes if I want to do something else during browsing the feeds). But thanks. – sup Nov 20 '11 at 16:32

Open CompizConfig Settings manager(CCSM) from dash

Under General Options,
set Auto-raise=Very high
and Delay=500.

All new windows will open in the background!

share|improve this answer
Do you mean seet high Focus and prevention level? Autoraise is a binary option for me. – sup Aug 14 '12 at 8:44

Alone the CCSM auto-raise wont work here in ubuntu 10.04 or 12.04.. so I had to create this script:

while true; do 
        windowId=`xdotool getwindowfocus`
        xdotool getwindowname $windowId
        xdotool windowactivate $windowId; 
        sleep $delay; 

Be advised that this simple script will work for all windows, not only your browsers. But it is overall good in a sense that you wont for ex. miss click on new opened windows...

This script depends on you setting the "Focus prevention level" high enough so that new opened windows wont get the focus. It works on Ubuntu 10.04 and 12.04 at least, but should work anywhere... if it fails for you, say so and we can think together!

This is an endless loop (break it with ctrl+c) that will "activate" the window that has focus (focus for keyboard input). So it will make the focused window "jump" to foreground each 0.5 seconds (you can lower or up the delay value to your needs/taste).

So all new opened applications and windows will still open in the foreground but will be promptly hidden by the window that has focus!

Just to make it clear, they will not open in the background but this script will provide almost the same effect. "Almost" because if you are very unlucky you can still click on the new opened window before the focused one be put to foreground, what will make the new window be the focused one... Lowering the delay will help prevent that but consume more cpu, I think less than 0.1 is not good, but you must test to see what works better for you...

PS.: your xdotool version must support these commands: getwindowfocus, getwindowname, 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.