How to remove xfce wallpaper

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,

    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.