A known feature in Chromium is the option to make it run in the background, which makes it easier to open .
Is it possible to do the same with firefox (and other applications)?
background-processchromiumfirefoxminimizewindow-manager
A known feature in Chromium is the option to make it run in the background, which makes it easier to open .
Is it possible to do the same with firefox (and other applications)?
Best Answer
Running an application in the background
The solution below will allow you to run firefox (or any other application) in the background, meaning: without a visible window. Nor will the application show in Dash as a running application:
If you pick Toggle Firefox however, the application will pop up immediately:
How it works
If the panel icon (indicator) starts up, it launches a new
firefox
window, but immediately hides it (including possible existingfirefox
windows) from the face of the earth, usingxdotool
:This will not only hide the window, but also will hide the fact that
firefox
is running at all, since the unity launcher acts on visibly existing windows.~/.config/hidden_windows
, to be mapped on the next time you choose Toggle Firefox from the menu.The script
How to use
The script needs both
wmctrl
andxdotool
Copy the script into an empty file, save it as
firefox_bg.py
Test_run the script by the command:
If all works fine, add it to Startup Applications: Dash > Startup Applications > Add. Add the command:
Alternatively, copy the code below into an empty file, save it as
firefox_bgrunner.desktop
in~/usr/share/applications
, log out and back in.*The last line,
StartupWMClasss=nonsense
is to make sureFirefox windows will appear under their own icon, not the one of the indicator
.No need to mention that you have to edit the
Exec=
line to reflect the real (absolute) path to where you storedfirefox_bg.py
Then you will have the panel runner available from Dash:
Other applications?
I tested the same procedure with
gnome-terminal
andThunderbird
(the latter usually not the quickest to startup), and it works perfectly:To use with other applications, simply edit the line:
Note however that some applications seem to check if their attempt to create a window succeeded, and create a second one if the first one is unmapped. This happened to me with
Inkscape
.The script can even then perfectly be used though, but would need a small edit. If anyone ever might need to use it with
Inkscape
, please leave a comment.