Default browser setup error

Support and discussions for the x86/x64 Linux version of Pale Moon and specific Linux distribution questions related to the browser.

Moderator: trava90

Forum rules
If your question is about general use of the browser and not specific to Linux, then please use the General Support board.
Locked
User avatar
BashCrash
New to the forum
New to the forum
Posts: 1
Joined: 2018-11-05, 14:28

Default browser setup error

Post by BashCrash » 2018-11-05, 15:08

LinuxMint 19 kernel 4.15.0-38-generic Cinnamon 3.8.9 Gnome 3.28.2

Setting Pale Moon as default browser creates the file "~/.local/share/applications/userapp-Pale Moon-G2GJRZ.desktop" and adds numerous references to the file in ~/.config/mimeapps.list. (The "G2GJRZ" part of the file name seems to be randomly-generated.)

The file name "userapp-Pale Moon-G2GJRZ.desktop" does not comply with the spec https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#file-naming which stipulates that the file name may not contain spaces.

The non-compliant file name triggers an error with xdg-mime, which I use in scripts to display the default browser:

Code: Select all

xdg-mime query default x-scheme-handler/http
/usr/bin/xdg-mime: 953: local: Moon-O5RJOZ.desktop: bad variable name
Removing the space in the file name and correcting the corresponding entries in ~/.config/mimeapps.list fixes the problem.
I tested twice, one with the file name changed it to "~/.local/share/applications/userapp-PaleMoon-G2GJRZ.desktop", the other to "~/.local/share/applications/userapp-Pale_Moon-G2GJRZ.desktop".

Code: Select all

xdg-mime query default x-scheme-handler/http
userapp-PaleMoon-O5RJOZ.desktop
Mr. Moonchild, please correct this error.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29249
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Default browser setup error

Post by Moonchild » 2018-11-05, 15:45

Probably a Mozilla oversight in the shellservice.

http://xref.palemoon.org/uxp-trunk/source/application/palemoon/components/shell/nsGNOMEShellService.cpp#287 doesn't actually check or correct the application name for valid characters.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Locked