Is there any documentation / guidance on how to customize .desktop
files bundled into a snap?
For example with chromium I need to add the --proxy-pac-url
argument to all Exec=
lines in /snap/chromium/current/usr/share/applications/chromium.desktop
.
You can’t just edit those file directly as the snaps are mounted readonly.
I’ve set the environment variables for http_proxy
& https_proxy
& auto_proxy
(both lowercase and uppercase variants), and confirmed that they are shown if I run snap run --shell chromium
and list the current environment variables (env
), but chromium appears to ignore them.
I can get chromium to correctly run via chromium --proxy-pac-url=file:///etc/proxy.pac
, so i just need to find a way to amend the desktop files accordingly.
I’ve read that you can override desktop files by placing amended copies in ~/.local/share/applications
and running update-desktop-database ~/.local/share/applications
, but now I have two icons in the launcher (one for the default, and another for the amended version, rather than overriding the original). Obviously I could amend the Name=
for the amended version, but it’s still not ideal.