Default browser setup error

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

User avatar
BashCrash
New to the forum
New to the forum
Posts: 1
Joined: 2018-11-05, 14:28

Default browser setup error

Unread 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/ ... ile-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: 23227
Joined: 2011-08-28, 17:27
Location: 58°2'16"N 14°58'31"E
Contact:

Re: Default browser setup error

Unread post by Moonchild » 2018-11-05, 15:45

Probably a Mozilla oversight in the shellservice.

http://xref.palemoon.org/uxp-trunk/sour ... ce.cpp#287 doesn't actually check or correct the application name for valid characters.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne

Post Reply