I had a similar problem – once I installed/started xfce (for testing), the lightdm-background changed to the ugly xfce-background. Deinstalling xfce and garbage-collecting does not help.
But I have found the reasons and solutions.
- Reason: The reason, why the lightdm-background changes, is, that it tries to use “user-backgrounds”. The idea is, that the login-background should be the same as the desktop-background of the user. So, as soon as you select a user on the login-screen, the background changes to the desktop-background of the user.
- Implementation: This is configured via the accounts-service and user-specific files in
/var/lib/AccountsService/users/
.
Solutions/Workarounds:
-
Change/set background per user: Edit
/var/lib/AccountsService/users/USERNAME
,- either as root (which feels like a dirty quickhack)
- in the settings of XFCE/your desktop manager
- in some accounts-service-settings-manager or a lightdm-settings-manager (e.g. GitHub - Xubuntu/lightdm-gtk-greeter-settings: A small dialog to make it easier for users to modify the settings of lightdm-gtk-greeter.).
XFCE e.g. adds the following there:
[org.freedesktop.DisplayManager.AccountsService] BackgroundFile='/nix/store/6ix5a17vkkaf9c4naxss8w4vf7kxh1bw-xfdesktop-4.18.1/share/backgrounds/xfce/xfce-blue.jpg'
-
Disable user-backgrounds in
configuration.nix
(recommended):services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = ''user-background = false'';
Then, no user-backgrounds are used, but
displayManager.lightdm.background
is used for all users.(Maybe adding an option
displayManager.lightdm.greeters.gtk.user-backgrounds
would be the best long-term solution.) -
Completely disable Accounts-Service in
configuration.nix
:services.accounts-daemon.enable = pkgs.lib.mkForce false;
But this may have some negative side-effects, since e.g. xfce wants accounts-services.