user-background doesn't work for me after Bionic update

Asked by Gerry on 2018-04-15

After upgrading to ubuntu 18.04 bionic (Beta) my greeter background image doesn't change based on the username any more. /var/lib/AccountsService/users/myuser contains the user's current background and it's readable by lightdm.

 [User]
 XSession=ubuntu
 Background=/usr/share/backgrounds/Green_Island_by_Radu_Galan.jpg
 Icon=/usr/share/pixmaps/faces/bicycle.jpg
 SystemAccount=false

Is anyone else seeing this? I don't see any change in the lightdm-gtk-greeter/greeterbackground.c that might affect this.
I did a clean install of the OS and saw the same thing.
This gets logged in seat0-greeter.log:

Reading file: /usr/share/lightdm/lightdm-gtk-greeter.conf.d/01_ubuntu.conf

[greeter]
#background=/usr/share/backgrounds/warty-final-ubuntu.png
theme-name=Ambiance
icon-theme-name=LoginIcons
font-name=Ubuntu 11
xft-antialias=true
xft-dpi=96
xft-hintstyle=slight
xft-rgba=rgb
indicators=~host;~spacer;~session;~language;~a11y;~clock;~power;
clock-format=%d %b, %H:%M
user-background=true

And those other settings to get respected.

Let me know if I need to share anything more to clarify my question.

Question information

Language:
English Edit question
Status:
Solved
For:
LightDM GTK+ Greeter Edit question
Assignee:
No assignee Edit question
Solved by:
Simon Steinbeiß
Solved:
2018-04-16
Last query:
2018-04-16
Last reply:
2018-04-15
Simon Steinbeiß (ochosi) said : #1

This is due to a change within lightdm and accountsservice. You need to re-set your wallpaper in xfdesktop's settings dialog once (just change it back and forth) - then it should work again as expected.

Gerry (gsker) said : #2

Thank you for the reply!

1. Changing the wallpaper in xfdesktop and back didn't do anything :-( -- and that is a usual way for me to push a background change from my desktop out to the login screen.
2. What is the effect that that change has on the accountsservices data that lightdm picks up on?
3. How would one do this with gnome-shell (which the clean install of bionic that I mentioned before uses) or any other desktop environment?

In the past, I dug into the xfdesktop dbus interaction to figure out how to propagate a non-DE background change to accountsservices using a shell script so lightdm would pick it up. So I still know how that works, but that must not be this.... what is the difference in lightdm that you refer to?

Is there a change in lightdm.conf that has to accompany the [greeter]\nuser-background=true setting in lightdm-gtk-greeter.conf?

Best Simon Steinbeiß (ochosi) said : #3

This is the relevant diff, hope it helps (nothing in the greeter changed, only xfdesktop):
https://launchpadlibrarian.net/357449299/xfdesktop4_4.12.3-4ubuntu1_4.12.3-4ubuntu2.diff.gz

Gerry (gsker) said : #4

Thanks, Simon!
That was the clue I needed. I finally got xfdesktop-settings to populate the AccountsService data in a way that, along with the source code, made it clear.

The clean install of bionic still doesn't work -- that's a gnome problem I suspect -- but I got my dbus call to manage it with my regular desktop (still bionic, but not a standard install).

I had some trouble making it work with dbus-send, but this worked with qdbus:

qdbus --system --literal org.freedesktop.Accounts \
   /org/freedesktop/Accounts/User1000 \
   org.freedesktop.DBus.Properties.Set \
   org.freedesktop.DisplayManager.AccountsService BackgroundFile $FIRSTIMAGE

And worked right for everything as long as I maintained the other interface too:

dbus-send --system --print-reply \
 --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetBackgroundFile \
   string:$FIRSTIMAGE

Needing them both might be a compiz wallpaper thing?
I'm don't quite get the dbus messaging yet...

Thanks for your help.

--gerry

Gerry (gsker) said : #5

Thanks Simon Steinbeiß, that solved my question.