Wednesday, May 15, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3213  / 1 Year ago, mon, april 17, 2023, 6:52:57

I can run Browser from dash with added parameters (like google-chrome --single-process --purge-memory-button) without problem, by editing of .desktop file, but how I could reach the same by running of default browser via triggering open URL event? There is no options applied in this case.



For example if I have document in LibreOffice with URL, after click on it, new instance of browser appear, but no parameters are applied to. How I can change those?


More From » google-chrome

 Answers
6

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

[#27905] Wednesday, April 19, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eryeath

Total Points: 122
Total Questions: 121
Total Answers: 112

Location: Saint Helena
Member since Fri, Aug 26, 2022
2 Years ago
eryeath questions
Sat, May 28, 22, 09:50, 2 Years ago
Fri, Sep 9, 22, 13:09, 2 Years ago
Wed, Sep 8, 21, 03:57, 3 Years ago
Fri, Mar 17, 23, 00:13, 1 Year ago
Sat, Apr 16, 22, 06:07, 2 Years ago
;