Default browser setup error

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
BashCrash

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/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: 35600
Joined: 2011-08-28, 17:27
Location: Motala, SE
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/source/application/palemoon/components/shell/nsGNOMEShellService.cpp#287 doesn't actually check or correct the application name for valid characters.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked