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