Change the config directory name on Linux Topic is solved

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.
Octane

Change the config directory name on Linux

Unread post by Octane » 2016-12-15, 18:37

The directory containing the config directories for Pale Moon and Fossamail on Linux is named ".moonchild productions", while the directory containing Pale Moon itself is named "pale moon". These filenames contains a spaces which is against common standards on UNIX-like systems. I suggest ".moonchild productions" should be changed to either ".moonchildproductions" or just ".moonchild", following how the config directory for Mozilla corporation software is simply named ".mozilla", while "pale moon" should be changed to "palemoon".

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

Re: Change the config directory name on Linux

Unread post by Moonchild » 2016-12-15, 19:37

There's nothing wrong with spaces in directory/file names. This has been a normal part of file systems for a very long time (at least since the mid-90s).

The name of the browser is Pale Moon. The name of the vendor is Moonchild Productions.
Whether Mozilla (and Mozilla is the general vendor name, comprising both the foundation and corporation) and Firefox happen to be one word or not has no bearing on what we should be using.
"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

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2860
Joined: 2012-06-28, 01:20

Re: Change the config directory name on Linux

Unread post by ron_1 » 2016-12-16, 04:03

FWIW, when I try to do anything in the Linux terminal with files or folders that contain a space, it doesn't work (I have never tried to do anything in the terminal that concerns Pale Moon). The Linux terminal doesn't like spaces.

User avatar
Nigaikaze
Board Warrior
Board Warrior
Posts: 1322
Joined: 2014-02-02, 22:15
Location: Chicagoland

Re: Change the config directory name on Linux

Unread post by Nigaikaze » 2016-12-16, 05:43

helloimustbegoing wrote:FWIW, when I try to do anything in the Linux terminal with files or folders that contain a space, it doesn't work (I have never tried to do anything in the terminal that concerns Pale Moon). The Linux terminal doesn't like spaces.
Enclose the name of the file or folder in quotes. Example:

Code: Select all

derp@derpbox:~ > cd ".moonchild productions"
derp@derpbox:~/.moonchild productions > 
derp@derpbox:~/.moonchild productions > cd "pale moon"
derp@derpbox:~/.moonchild productions/pale moon > 
Nichi nichi kore ko jitsu = Every day is a good day.

Andrew Gilbertson

Re: Change the config directory name on Linux

Unread post by Andrew Gilbertson » 2016-12-16, 12:42

Or:

Code: Select all

derp@derpbox:~ > cd .moonchild\ productions
derp@derpbox:~/.moonchild productions >
derp@derpbox:~/.moonchild productions > cd pale\ moon
derp@derpbox:~/.moonchild productions/pale moon >
The above is what you'll get if you rely on bash's tab completion functionality.

Or even:

Code: Select all

derp@derpbox:~ > cd '.moonchild productions'
derp@derpbox:~/.moonchild productions >
derp@derpbox:~/.moonchild productions > cd 'pale moon'
derp@derpbox:~/.moonchild productions/pale moon >
Which saves you from having hold down the shift key to get from ' to " - but it's far faster to use tab-completion like my earlier example.

While it is non-standard to have a space in the name of a dotfile, it's not exactly like it's problematic, either. (The only two things you're not allowed to have in a Unix filename, IIRC, are / and a null character. Everything else can be escaped by preceding it with \.)

cyteen

Re: Change the config directory name on Linux

Unread post by cyteen » 2016-12-23, 09:10

I've had some problems with the space in the directory names used by Pale Moon, and although it's 'acceptable' I still feel its 'wrong tm' in that it smells wrongd to me, but then I don't like capitalization in directory names either (fixed for me by zsh tab complete which is case in sensitive).

However for anyone else whose scripts choke on spaces when using find and xargs, for me the fix was to use 'find -print0' along with 'xargs -0'. See:

http://www.linuxdevcenter.com/pub/a/lin ... 09_22.html

Still having a logical distinction between the name of the vendor and the directory in which a program places its files has value, ditto the product name and the directory it places its files in.

Lucio Chiappetti
Astronaut
Astronaut
Posts: 660
Joined: 2014-09-01, 15:11
Location: Milan Italy

directory name on linux revisited

Unread post by Lucio Chiappetti » 2016-12-23, 10:50

Octane wrote:The directory containing the config directories for Pale Moon and Fossamail on Linux is named ".moonchild productions", while the directory containing Pale Moon itself is named "pale moon". These filenames contains a spaces which is against common standards on UNIX-like systems.
I was away for a while an missed the original thread which is now closed. I wanted to say that as a Linux user I share the feeling to be ill at ease with pathnames with imbedded blanks. It is possible though not easy or immediately comfortable to deal with them using quotes, but luckily there is an easy workaround (which I use also specifically for palemoon). Create a soft link with the name you like, and use that.
The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. (G.B. Shaw)

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

Re: Change the config directory name on Linux

Unread post by Moonchild » 2016-12-23, 14:06

cyteen wrote:I still feel its 'wrong tm' in that it smells wrongd to me
That's kind of vague, isn't it? ;)

I think the resistance here is more because of a "CLI doesn't do this" notion from a few decades ago than an actual issue with having spaces.
cyteen wrote:Still having a logical distinction between the name of the vendor and the directory in which a program places its files has value, ditto the product name and the directory it places its files in.
It does have value in terms of flexibility, but it's already established this way because of what we forked from, and having these tied to vendor and product has value as well, especially considering it makes things unambiguous in terms of where data is stored. The problem with changing this would not only be creating a new way of handling profile/data folders, it would also, somehow, require a migration path to be taken automatically. We don't have anything in place for that at the moment either (and no it would not be optional because requiring people to do this kind of thing manually would just cause immense support headaches).
In addition, if you really need a different profile folder because "spaces are evil" then you can specify a "traditional" path to use from the command-line with -P
"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

H_Eaven

Re: Change the config directory name on Linux

Unread post by H_Eaven » 2017-02-05, 18:01

Hello!

A new Pale Moon user here with a long time history of LInux usage and administration. First of all, I'm quite happy already one hour after moving from Firefox to Pale Moon. Bravo!

However, as I was seeing this discussion here, I've to add that the choice for spaces in the directory name is a big no-no in Linux land in my experience. While it would generally work and provisions are there (as described by people earlier here) it has a few strong disadvantages. Although I understand changing it back might break things (and I'm not asking to), here's a list of issues I see:

1. Pale Moon one of the very few Linux apps doing it after the last few hundred ones I used, installed and managed didn't do spaces the last ten years (the only one I see is VMWare).
2. While it works fine under the shell, it looks really crappy to deal\ with\ this\ kind\ of\ display under eg bash. Yes, it can be customized but only because Pale Moon breaks convention?
3. There are still many scripts and programs under Linux breaking on spaces. While that's not Moonchild's problem, it's definitely a problem for some users and admins. And it's an avoidable problem. SO just follow best practises!
4. It could make life harder for command line experts under Linux where spaces are often used as delimiter to process text. Also some environment variables will need suddenly quotes etc. Bah!

The reason for the best practise? To prevent people to start putting spaces in every file or path they create. Spaces are invisible at the end. Two or three spaces are impossible to distinguish. Especially in HTML rendering. And never mind URN encodings when paths will be rendered in browsers, copy, paste etc.

Anyway, thanks for reading this rant. Clearly the main development here is Windows based which is fine. But I challenge any notion that this is a "few decades" ago thing and just for CLI. It's not seen as good practise in (but not limited to) the Linux and Unix world also in many modern environments, period. No question. But I guess I can live with it in this case as it's configurable of course :-)

New Tobin Paradigm

Re: Change the config directory name on Linux

Unread post by New Tobin Paradigm » 2017-02-05, 23:42

You can always quote it rather than escape it. Besides, how often do you need to mess with the profile. Seriously, get over yourselves.