I have a bash script like this
#!/bin/sh
firefox &
The Firefox window opens, but it doesn't have focus. What can I do so that it has the focus automatically?
I could use some X window tools / commands, but how do I get the window ID of Firefox? The window name is changing with the URLs displayed and therefore not useful.
EDIT: My window manager is Gnome.