Adding parameter to default browser

Solution 1:

Editing the .desktop file is enough in this case also because the default applications are called through the .desktop file.

See the /etc/gnome/defaults.list file and the ~/.local/share/applications/mimeapps.list file, the first one contains the system defaults and the second one contains the defaults which you chose instead of the system default.

So basically just look into those files and see which .desktop file is called for which mime type and edit that .desktop file the way you like. The .desktop files can be found in the /usr/share/applications/ directory or if you have overriden a default .desktop that can be found in the ~/.local/share/applications/ directory. (That means if you have a .desktop file with the same name in both directories, the system will always use the .desktop file present in the ~/.local/share/applications/ directory)

E.g. if I want firefox to open links what I click in a terminal in new window instead of in a new tab, I would just make sure that firefox is my default application for browsing, and then just

cp /usr/share/applications/firefox.desktop ~/.local/share/applications/firefox.desktop

to override the default .desktop file, and change the ~/.local/share/applications/firefox.desktop file at the line

Exec=firefox %u

to

Exec=firefox -new-window %u