You are not logged in.

#1 2022-12-30 23:39:30

Chris98
Member
Registered: 2022-12-30
Posts: 7

Unable to customise LightDM login background

Ok, so I've tried just about everything I can possibly find, but the LightDM login background is not displaying with the image I would like. I'm trying to use the slick greeter.

It appears, from what I can tell, that accountsservice and mugshot are conflicting, however without these two packages installed, no background displays at all. With them installed, I've managed twice to get the correct background to display, however it will only display once. After this, the file /var/lib/AccountsService/users/username is getting overwritten with the desktop background which by default is stored in a folder of /home/username.backgrounds - although LightDM doesn't seem to like the fact I have this in a hidden directory and doesn't show it anymore.

I've tried adding the background image in both /usr/share/backgrounds and /usr/share/pixmaps - only the latter will work. I've been on for hours going round in circles with lightdm-gtk-greeter.conf (although not directly related to the slick-greeter) and also the slick-greeter.conf and lightdm.conf, and at this point I genuinely don't know what can be done anymore.

If I uninstall the accountsservice and with that mugshot, I have to go through the three above files (namely: /var/lib/AccountsService/users/username, /etc/lightdm/lightdm-gtk-greeter.conf and /etc/lightdm/slick-greeter.conf) and make sure all have the correct background on from /usr/share/pixmaps. The desktop still has the /home/username/.backgrounds one. If I then install the accountsservice and mugshot again, with a little bit of tweaking I can get the background to display once, AFTER I've ran systemctl restart lightdm-plymouth.service.

However as soon as I log back in again, the background in /var/lib/AccountsService/users/username is automatically changed back again, and the background never shows again - I just get a black colour. I also can't ever get it working again after this point even if I change the background image back, so I literally have to completely remove the accountsservice and then re-install it.

However, without the accountsservice package, I can't seem to get any background image working at all. There's clearly some kind of caching going on somewhere on login that is affecting this - evn though I've specifically set various settings in various places to NOT use the user's desktop background, but this behaviour is still persisting. Also if I remove the accountsservice I'm getting errors about not having permission to run the org.freedesktop.DisplayManager ("Failed to use bus name org.freedesktop.DisplayManager, do you have appropriate permissions?"). On that particular error, I've even tried enabling the dbus-service in lightdm.conf, to no avail.

I've checked file permissions, ownership of the background and even tried changing it, everything. Nothing I can find is working on this. Until I found what I did about the accountsservice, the only thing I could think of was perhaps the potential that Firejail got in the way, but it's not even running at that point and is only sandboxing a couple of programs on demand like Firefox - this laptop is pretty new.

I've even gone to such lengths as to find apparently you need  capital "G" in the slick-greeter.conf, and this doesn't work with a lowercase G, but the lightdm-gtk-greeter.conf is the other way around! What should have been a simple task has ended up taking about 8 hours and I'm no further forward, so any help at this stage would really be very much appreciated.

Here are my config files:

/var/lib/AccountsService/users/username

  GNU nano 7.0       /var/lib/AccountsService/users/Christopher                 
[org.freedesktop.DisplayManager.AccountsService]
BackgroundFile='/usr/share/pixmaps/Preah_Khan,_Cambodia.jpg'

[User]
Email=
Session=
XSession=xfce
Icon=/var/lib/AccountsService/icons/Christopher
SystemAccount=false
[Greeter]
background=/home/Christopher/Desktop/small-memory.jpg
font-name=Segoe UI 10
theme-name=Adwaita
cursor-theme-name=Adwaita
cursor-theme-size=16
icon-theme-name=Adwaita
show-hostname=false
draw-user-backgrounds=false
draw-grid=false

/etc/lightdm/lightdm-gtk-greeter.conf

[greeter]
theme-name = Adwaita
background = /usr/share/pixmaps/Preah_Khan,_Cambodia.jpg
xft-hintstyle = hintfull
font-name = Segoe UI 10
draw-user-backgrounds = false
user-background = false

/etc/lightdm/lightdm.conf

#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account
# logind-check-graphical = True to on start seats that are marked as graphical by logind
# log-directory = Directory to log information to
# run-directory = Directory to put running state in
# cache-directory = Directory to cache to
# sessions-directory = Directory to find sessions
# remote-sessions-directory = Directory to find remote sessions
# greeters-directory = Directory to find greeters
# backup-logs = True to move add a .old suffix to old log files when opening new ones
# dbus-service = True if LightDM provides a D-Bus service to control it
#
[LightDM]
#start-default-seat=true
#greeter-user=lightdm
#minimum-display-number=0
#minimum-vt=7 # Setting this to a value < 7 implies security issues, see FS#46799
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
#logind-check-graphical=true
#log-directory=/var/log/lightdm
run-directory=/run/lightdm
#cache-directory=/var/cache/lightdm
#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions
#remote-sessions-directory=/usr/share/lightdm/remote-sessions
#greeters-directory=$XDG_DATA_DIRS/lightdm/greeters:$XDG_DATA_DIRS/xgreeters
#backup-logs=true
#dbus-service=true

#
# Seat configuration
#
# Seat configuration is matched against the seat name glob in the section, for example:
# [Seat:*] matches all seats and is applied first.
# [Seat:seat0] matches the seat named "seat0".
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
#
# type = Seat type (local, xremote)
# pam-service = PAM service to use for login
# pam-autologin-service = PAM service to use for autologin
# pam-greeter-service = PAM service to use for greeters
# xserver-command = X server command to run (can also contain arguments e.g. X -special-option)
# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option)
# xserver-config = Config file to pass to X server
# xserver-layout = Layout to pass to X server
# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server
# xserver-share = True if the X server is shared for both greeter and session
# xserver-hostname = Hostname of X server (only for type=xremote)
# xserver-display-number = Display number of X server (only for type=xremote)
# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
# xdmcp-port = XDMCP UDP/IP port to communicate on
# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
# greeter-session = Session to load for greeter
# greeter-hide-users = True to hide the user list
# greeter-allow-guest = True if the greeter should show a guest login option
# greeter-show-manual-login = True if the greeter should offer a manual login option
# greeter-show-remote-login = True if the greeter should offer a remote login option
# user-session = Session to load for users
# allow-user-switching = True if allowed to switch users
# allow-guest = True if guest login is allowed
# guest-session = Session to load for guests (overrides user-session)
# session-wrapper = Wrapper script to run session with
# greeter-wrapper = Wrapper script to run greeter with
# guest-wrapper = Wrapper script to run guest sessions with
# display-setup-script = Script to run when starting a greeter session (runs as root)
# display-stopped-script = Script to run after stopping the display server (runs as root)
# greeter-setup-script = Script to run when starting a greeter (runs as root)
# session-setup-script = Script to run when starting a user session (runs as root)
# session-cleanup-script = Script to run when quitting a user session (runs as root)
# autologin-guest = True to log in as guest by default
# autologin-user = User to log in with by default (overrides autologin-guest)
# autologin-user-timeout = Number of seconds to wait before loading default user
# autologin-session = Session to load for automatic login (overrides user-session)
# autologin-in-background = True if autologin session should not be immediately activated
# exit-on-failure = True if the daemon should exit if this seat fails
#
[Seat:*]
#type=local
#pam-service=lightdm
#pam-autologin-service=lightdm-autologin
#pam-greeter-service=lightdm-greeter
#xserver-command=X
#xmir-command=Xmir
#xserver-config=
#xserver-layout=
#xserver-allow-tcp=false
#xserver-share=true
#xserver-hostname=
#xserver-display-number=
#xdmcp-manager=
#xdmcp-port=177
#xdmcp-key=
greeter-session=lightdm-slick-greeter
#greeter-hide-users=false
#greeter-allow-guest=true
#greeter-show-manual-login=false
#greeter-show-remote-login=true
#user-session=default
#allow-user-switching=true
#allow-guest=true
#guest-session=
session-wrapper=/etc/lightdm/Xsession
#greeter-wrapper=
#guest-wrapper=
#display-setup-script=
#display-stopped-script=
#greeter-setup-script=
#session-setup-script=
#session-cleanup-script=
#autologin-guest=false
#autologin-user=
#autologin-user-timeout=0
#autologin-in-background=false
#autologin-session=
#exit-on-failure=false

#
# XDMCP Server configuration
#
# enabled = True if XDMCP connections should be allowed
# port = UDP/IP port to listen for connections on
# listen-address = Host/address to listen for XDMCP connections (use all addresses if not present)
# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf)
# hostname = Hostname to report to XDMCP clients (defaults to system hostname if unset)
#
# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn.  Alternatively
# it can be a word and the first 7 characters are used as the key.
#
[XDMCPServer]
#enabled=false
#port=177
#listen-address=
#key=
#hostname=

#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
#enabled=false
#command=Xvnc
#port=5900
#listen-address=
#width=1024
#height=768
#depth=8

Offline

#2 2022-12-31 15:08:33

Chris98
Member
Registered: 2022-12-30
Posts: 7

Re: Unable to customise LightDM login background

Ok things I've learned ....

1- the issue is definitely with accountsservice
2- it's basically not possible to run slick-greeter without accountsservice
3- it is possible to get this done, but as soon as you change the desktop background it all stops working again

I managed it via the following steps:

1- move the login manager background to /usr/share/pixmaps and update corresponding file /etc/lightdm/slick-greeter.conf
1- uninstall accountsservice via sudo pacman -Rdd accountsservice
2- manually edit the file in /var/lib/AccountsService/username and change the login background (yes the package no longer exists but the files are still here as it appears to be an undocumented dependency of slick-greeter). Apparently it doesn't matter what you do in slick-greeter.conf because it's always superseded by what is in /var/lib/AccountsService/username
3- restart lightdm (or in my case lightdm-plymouth) with systemctl. Whenever you make a change in accountsservice, nothing will happen until you restart lightdm.
4-  move all the desktop backgrounds to /usr/share/backgrounds out of wherever they are in /home/
5- restart lightdm to make sure your background is still the same - if it breaks, it usually only works once
6- review all three files to make sure no silly changes have happened: /etc/lightdm/lightdm-gtk-greeter.conf /etc/lightdm/slick-greeter.conf /var/lib/AccountsService/username
7- try a test mode of lightdm via sudo lightdm --test-mode (this will complain about the missing accountsservice)
8- re-install accountsservice via sudo pacman -S accountsservice
9- reboot via systemctl reboot and then restart lightdm again once you're in

If you get this far, it's worked. However only until you change your background image again. The only other solution I can think of unless someone knows more than me, is to setup some kind of script to constantly sync the /var/lib/AccountsService/username background with /etc/lightdm/lightdm-gtk-greeter.conf to stop it overwriting it on every session login.

This isn't really a fix so I'm hoping someone who knows more about accountsservice can pick this thread up and give me some suggestions as to what may be going wrong.

EDIT: On looking at this again, this only worked once for me. I honestly have no idea what is wrong anymore so I'm uninstalling slick greeter until someone else can give me some advice on what may be going wrong here.

Last edited by Chris98 (2022-12-31 15:17:52)

Offline

Board footer

Powered by FluxBB