Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

5 Answers

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
add comment
up vote 1 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
add comment

hello i dont use unity but i guess this is somthin you have to set in your Window manager even i doubt you make it cus what you have said its the norrmal behavior of all browser and i dont think that a WM can have such feature to let the window get opened seamlessly good luck

share|improve this answer
    
True, I changed the question accordingly. –  sup Nov 20 '11 at 12:28
    
This is not a full answer. –  hexafraction Aug 17 '12 at 14:45
add comment

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
add comment

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

#!/bin/bash
delay=0.5
while true; do 
        windowId=`xdotool getwindowfocus`
        xdotool getwindowname $windowId
        xdotool windowactivate $windowId; 
        sleep $delay; 
done

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
add comment

Your Answer

 
discard

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.