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: Mon, 05 Nov 2018, 14:28

Default browser setup error

Unread postby BashCrash » Mon, 05 Nov 2018, 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: 22326
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: Default browser setup error

Unread postby Moonchild » Mon, 05 Nov 2018, 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.
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

Take note: 23 November is Wolfenoot! Eat roast meat and/or cake decorated like the full moon. #wolfenoot


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 10 guests