Making PM default browser fails due to spaces in filenames.

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
berni

Making PM default browser fails due to spaces in filenames.

Unread post by berni » 2019-01-04, 13:50

When clicking "Preferences->Advanced->Make Pale Moon the default browser" PM creates a file called ".config/mimeapps.list" PM also creates a file "~/.local/share/applications/userapp-Pale Moon-XYVHQZ.desktop" (I don't know if that happens, when that button is clicked or earlier.) Both files might be found in different locations on different systems. Those two files help xdg-open to decide on the default browser. Unfortunately xdg cannot handle filenames with spaces (here between "Pale" and "Moon") properly (maybe spaces are not even allowed by xdg-specification, I don't know). Yet I would recommend to get rid of this spaces, either by removing them alltogether or by replacing them by - or something else.

See https://forum.palemoon.org/viewtopic.php?f=37&t=20639 for more details.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Making PM default browser fails due to spaces in filenames.

Unread post by Moonchild » 2019-01-04, 14:11

Don't blame us for a (likely purposefully) limitation of the xdg utils. XDG assumes and tends to enforce their "recommendation" to not have spaces in file names and directories, despite the fact that this has been a thing for a very long time already.
"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

berni

Re: Making PM default browser fails due to spaces in filenames.

Unread post by berni » 2019-01-04, 14:57

Moonchild wrote:Don't blame us for a (likely purposefully) limitation of the xdg utils. XDG assumes and tends to enforce their "recommendation" to not have spaces in file names and directories, despite the fact that this has been a thing for a very long time already.
I don't want to blame no one. But I think it's always easier to change one self (in this case PM) than others (XDG). ;)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Making PM default browser fails due to spaces in filenames.

Unread post by Moonchild » 2019-01-04, 16:57

berni wrote:But I think it's always easier to change one self (in this case PM) than others (XDG). ;)
Patches welcome. This kind of thing is so far on the backburner our core devs will likely never get to it.
"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