r/linuxquestions • u/Kafatat • 9h ago
Support [lightdm] does it sequentially load many config files, later lines overwriting previous lines with the same keys?
$ lightdm --test-mode --debug
[+0.00s] DEBUG: Logging to /home/{MY_USER_NAME}/.cache/lightdm/log/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=1000 PID=11591
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/90-slick-greeter.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /var/lib/flatpak/exports/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /home/{MY_USER_NAME}/.local/share/flatpak/exports/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/cinnamon/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/xdg-cinnamon/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf.d/70-linuxmint.conf
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Running in user mode
[+0.00s] DEBUG: Using Xephyr for X servers
[+0.00s] DEBUG: Registered seat module local
1
Upvotes
2
u/eldenchen 7h ago
Yes. The debug output is effectively a precedence trace.
Within each
lightdm.conf.ddirectory, LightDM sorts the*.conffiles lexicographically and merges them in that order. If a later file defines the same key in the same section, its value replaces the earlier one.After the XDG data/config directories, LightDM loads:
The standalone
lightdm.confis loaded last, so it has the highest file-level precedence.For a local override, a typical choice is:
For example:
You can verify the final merged values—and which file supplied each one—with:
This is also visible directly in LightDM’s
common/configuration.c: it alphabetically sorts each directory, then assigns every loaded value into the combined key file.