I am trying to change the wallpaper on my greeter screen. I can modify the theme/icons/cursor in the configuration.nix
file, but although it correctly sets the background in lightdm-gtk-greeter.conf
file, its not working. The greeter keeps defaulting back to the standard xfce wallpaper. Sometimes it looks like it loads my wallpaper but is almostly instantly replaced by the xfce one. Once it gets to the desltop, I don’t have an issue as I have set my desktop wallpaper through awesomewm.
I am running NixOS 23.05. Below is the section of my configuration that deals with the xserver, desktopmanager, windowsmanager, greeter settings, etc.
Any help is appreciated. Thanks.
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
displayManager.defaultSession = "xfce+awesome";
windowManager.awesome = {
enable = true;
luaModules = with pkgs.luaPackages; [
luarocks #pkg manager for lua modules
luadbi-mysql #database abstraction layer
];
};
};
# Set greeter theme options
services.xserver.displayManager.lightdm.greeters.gtk = {
theme.name = "Nordic-darker";
iconTheme.name = "Nordzy-cyan-dark";
cursorTheme.name = "Nordzy-cursors";
};
services.xserver.displayManager.lightdm.background = "/etc/nixos/background/nord-wallpaper.png";
Sometimes it looks like it loads my wallpaper but is almostly instantly replaced by the xfce one.
What does sudo cat /var/lib/AccountsService/users/$USER | grep BackgroundFile
say? Did you try
{
services.xserver.displayManager.lightdm.greeters.gtk = {
extraConfig = ''
user-background = false
'';
};
}
Thanks! That worked for the greeter despite BackgroundFile in the $USER file still listing a stock xfce file: '/nix/store/dlalka0n192hmw4l89hd3d4lkvggcpp9-xfdesktop-4.16.1/share/backgrounds/xfce/xfce-verticals.png'
.
However, that didn’t fix the lock screen. I have tried to apply the user-background = false
more broadly through services.xserver.displayManager.lightdm.extraConfig
but that didn’t work. I also tried to use the ...greeters.slick.extraConfig
and ...greeters.slick.draw-user-backgrounds
, but couldn’t get it to work that way either. Any help would be appreciated again.
Thanks.
despite BackgroundFile in the $USER file still listing a stock xfce file
That should be updated when you change the wallpaper in e.g. xfce4-settings-manager, though the file is mutable (it’s in /var/lib/
) and you can try to play with that file and see what happen 
that didn’t fix the lock screen
What screen locker do you use? For xfce4-screensaver, I don’t think greeter configs have anything to do with that, I think it uses the user wallpaper from xfconf, which should (again) be set in xfce4-settings-manager.
Ah sorry I didn’t notice you are not using xfwm so stuff might be missing in xfce4-settings-manager, if you do use xfce4-screensaver, you can try the following script for lock screen wallpaper I guess:
#!/usr/bin/env bash
wallpaper="$(realpath "$1")"
properties=$(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$")
for property in $properties; do
xfconf-query -c xfce4-desktop -p $property -s "$wallpaper"
done
Run it as ./wallpaper.sh /path/to/your/wallpaper.jpg
Thank you for the advice. You were correct that because I am not using xfce as a full desktop manager the desktop settings in settings manager are not available. I am disabling my lock screen for now because I do not actually need it in this environment. If I want one, I might switch to a dedicated lockscreen application, such as i3lock.
Thanks again.