How to display a user’s avatar instead of the generic avatar on the LightDM GTK Greeter screen in Lubuntu 17.10
February 23, 2018 1 Comment
I recently installed Lubuntu 17.10 on my family’s PC (single-seat, multi-user). The default avatar was displayed for each user on the LightDM greeter screen, rather than each user’s individual avatar. I have experienced this problem in more than one Linux distribution (Gentoo, Sabayon and now Lubuntu 17.10), more than one Desktop Environment (KDE, GNOME and now LXDE), and more than one Display Manager (LightDM and SDDM), so my suspicion is that the problem lies with AccountsService rather than the DE or DM. Anyway, here is how I fixed the problem in Lubuntu 17.10. The example below is for user fitzcarraldo
, and I used the same procedure for each username in the installation.
1. Create a 96×96 PNG avatar /home/fitzcarraldo/Pictures/fitzcarraldo.png
2. Edit the file /var/lib/AccountsService/users/fitzcarraldo
to contain the following:
[User] XSession=Lubuntu SystemAccount=false Icon=/var/lib/AccountsService/icons/fitzcarraldo
3. Make sure that the file has 644 permissions:
$ ls -la /var/lib/AccountsService/users/fitzcarraldo
-rw-r--r-- 1 root root 85 Jan 1 02:53 /var/lib/AccountsService/users/fitzcarraldo
4. Copy the avatar to the relevant directory and make sure it has 644 permissions:
$ sudo cp /home/fitzcarraldo/Pictures/fitzcarraldo.png /var/lib/AccountsService/icons/fitzcarraldo
$ ls -la /var/lib/AccountsService/icons/fitzcarraldo
-rw-r--r-- 1 root root 14860 Jan 1 02:54 /var/lib/AccountsService/icons/fitzcarraldo
After rebooting, the desired avatar should be displayed on LightDM’s GTK Greeter screen.
Background reading