If I open a program, like Firefox, from the terminal then that program will get the focus of the GUI. Can I somehow open it so that it will run in the visual background and not pop up, blocking any current program I am working with?
My problem is that I use karma test runner which is run every time I edit my code. Whenever that is done karma launches a browser which pops up in front of everything else on the screen which can be quite annoying.
I am using Ubuntu 13.04.
Best Answer
To do this, you will need
xdotool
. To install it, run the following command in terminal:Now, I will explain how you can do it for Firefox using a script:
In a terminal run:
This command will make a
bin
directory in yourhome
folder if you don't already have it.After run:
This will create the new file
change_sources.sh
in gedit.Go back into terminal and run:
to grant execute access for the script.
Run the script with:
In the same manner you can open any other application from terminal in the background.