Under debian based distros, overriding an overwrite of ANY installed file is easily done.
There's a really cool tool called dpkg-divert that the system uses to take whatever files would normally be installed and steer them into a different place so that you can put your own version of the file in the same place without fear of it going away on the next update.

Just do:
dpkg-divert --add --rename /usr/share/applications/firefox.desktop

In this case, that would be the overkill and less correct way of handing the problem.  A better way would be to put your own version of the firefox.desktop into certain directories and that cause it to override the system version of the config.  Put them in ~/.local/share/applications/ to change an individual user and /usr/local/share/applications/ to effect every user on the system.

Brian Cluff

On 12/25/20 12:23 PM, John Seberg via PLUG-discuss wrote:
Some thoughts that occur to me:

1) Keep your own .desktop file, like myFirefox.desktop, separate from firefox.desktop. 

2) Create a patch routine for the existing firefox.desktop - lots of info. out there on the concept of patching a text file using classic utilities. This might be a good skill to develop, if you haven't.

3) It might be nice to know how to query the diff history of the firefox.desktop file in the official package for the occasion where something goes wrong.

4) The seemingly *daily* updates to Firefox are kind of annoying. :^)






On Friday, December 25, 2020, 11:51:01 AM MST, Steve B via PLUG-discuss <plug-discuss@lists.phxlinux.org> wrote: 





Thanks to all. I'd forgotten that the file would be overridden with each update of Firefox. For the moment I've written a quick shortcut into my bash aliases file, but you got me looking at some ideas to create another firefox.desktop file that I can use to launch the application with the firejail parameters.

On Wed, Dec 23, 2020 at 7:02 PM Michael Butash via PLUG-discuss <plug-discuss@lists.phxlinux.org> wrote:
Agreed customizations to firefox launchers will break with every update.  I run into this with arch and firefox that I add a custom command to add a menu for starting with profile chooser, and have to add the file back every time I update annoyingly.

-mb


On Wed, Dec 23, 2020 at 4:56 PM Matt Graham via PLUG-discuss <plug-discuss@lists.phxlinux.org> wrote:
On 2020-12-23 16:39, Steve B via PLUG-discuss wrote:
Is it possible to edit the firefox.desktop file such that I can
invoke "firejail --apparmor firefox -no-remote" as the default manner
in which the application starts? If so can someone point me to a guide
or provide me with an example? I'm having some difficulty finding a
resource through Google.
KDE:  right-click on the application menu, "Edit Applications", 
Internet->Mozilla Firefox, edit the Command: entry so that it executes 
what you want instead of the default "firefox %u" command.

Everything:  Just find whatever .desktop file is being used by your 
desktop environment with "locate \*desktop | grep firefox" (there may be 
a few of them.)  Then edit the Exec= line so that it invokes the command 
line you want instead of the default "firefox %u".  This will almost 
certainly break every time firefox gets updated though.

Alternatively, copy the default .desktop file to wherever your Desktop 
directory is, then edit that, and always launch your firefox from that 
icon/whatever instead of the system menu.  That will get rid of the 
"menu entry goes back to default after update" problem.

-- 
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.phxlinux.org
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss