1

I was trying to configure LightDM. It appears that lightdm.conf is sensitive to trailing spaces. I found that I get different behavior with

greeter-hide-users=true

and

greeter-hide-users=true

where the second has a trailing space. Without the space, the greeter hides the list of users as I expected. With the space, the greeter displays the list of users as if the greeter-hide-users parameter is not set to true.

I am thinking of reporting this as a bug, but I want to make sure this type of sensitivity to trailing spaces is not typical in configuration files.

2

It depends on the configuration, /etc/passwd for example can be whitespace sensitive, because then you've set a user's shell to /bin/tcsh and then they cannot login because /bin/tcsh does not exist. This can also be difficult to debug; logging should ideally quote or bracket things so the logs have '/bin/tcsh ' or [username ] in them, and looking at the data with a hex viewer (hexdump, xxd) can by handy.

Eliminating trailing whitespace by default should be sensible and safe. (Um, except for the trailing newline, which it is not sensible to remove from the end of a file.)

  • This is true. Syntax depends on the program which is parsing the configuration file, therefore, it depends on the configuration. – Peschke Sep 24 '15 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.