Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18.04: something broke retrieving user background images #94

Closed
rik-shaw opened this issue Feb 9, 2018 · 18 comments
Closed

Ubuntu 18.04: something broke retrieving user background images #94

rik-shaw opened this issue Feb 9, 2018 · 18 comments
Assignees

Comments

@rik-shaw
Copy link

rik-shaw commented Feb 9, 2018

 * slick-greeter version: 1.0.8 (also tested with 1.1.4)
 * Distribution - Ubuntu 18.04
 * Intel
 * 64 bit

Issue
Some updates to Ubuntu 18.04 'bionic' in the last month have broken the ability for slick-greeter to retrieve the user's background image and display it. This is true for lightdm-gtk-greeter as well, so this isn't a slick-greeter issue per-say but it will affect slick-greeter users for 18.04. It is hard to dig around to find where the problem is but I can confirm these things:

  • when changing a user background, /var/lib/AccountsService/users/<username> does contain a reference to the updated/correct user background image (for this testing YES it is a world-readable background image from /usr/share/backgrounds so that isn't the issue as others have had in the past)
  • dconf-editor for the user shows the updated/correct filename in the x.dm.slick-greeter background key

BUT: at the lightdm login screen, the user's background image will not display. Things worked correctly until sometime around the beginning of the year / first few weeks of January. Then some update somehow messed it up. I have rolled back my testing vm and confirmed it was working then did a dist-upgrade and confirmed it stopped working. I don't know if it is an update to lightdm, some sort of accountsservice package, dconf, or etc??? that is the culprit... I tested updating to slick-greeter 1.1.4 with the same unfortunate results that user backgrounds are still not loading... logs have these messages:

  • /var/log/lightdm/lightdm.log: [+47.31s] WARNING: Error updating user /org/freedesktop/Accounts/User1000: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: No such interface 'org.freedesktop.DisplayManager.AccountsService (I am not certain if this error was present when slick-greeter was showing user backgrounds from late December / early January)
  • /var/log/lightdm/seat0-greeter.log: doesn't have any reference to the user background image: it seems to not be attempting to load it? (again this same issue of not loading user background images seems identical in lightdm-gtk-greeter so I don't think this is a slick-greeter only bug...

Not sure if @flexiondotorg (Ubuntu MATE 18.04) or @fossfreedom (Ubuntu Budgie 18.04) see the same issues as they also use slick-greeter?

@fossfreedom
Copy link
Contributor

I will test this weekend. If necessary I will rebuild with the latest unstable release build that has just been made.

@rik-shaw
Copy link
Author

rik-shaw commented Feb 9, 2018

@fossfreedom thanks for the quick reply. Note that I am not using a /etc/lightdm/slick-greeter.conf file but rather am using a gschema.override file in /usr/share/glib-2.0/schemas and ensuring that the current user (and root user) have their gsettings reset-recursively x.dm.slick-greeter so all settings should pull from the gschema files. All settings appear to work in this regard except the user background which is not being retrieved.

If you see the same thing please report back and maybe we can work out together what offending package is messing up the AccountsService process(??)

@fossfreedom
Copy link
Contributor

Can confirm this problem occurs on Ubuntu Budgie. Also tried the latest unstable. No joy.

Looking at lightdm e.g. canonical/lightdm@6015bce there has been a few changes to AccountService. I wonder if these have impacted in this area.

Not sure if it will compile - but might try if I find some time to compile the 17.10 version of lightdm for bionic.

@rik-shaw
Copy link
Author

@fossfreedom well at least we are seeing the same thing. It is strange to me that there are changes coming into lightdm since Ubuntu will use gdm instead. Maybe @robert-ancell can comment on the changes you note above?

@robert-ancell
Copy link

Looking into this I did find a bug in that I wasn't installing the AccountsService configuration for that change incorrectly, so that's now fixed in 1.25.2 (released and uploaded to Bionic).

But yes, I didn't communicate this change very well. The existing background support relied on a patch to AccountsService that was never upstreamed - insteald AccountsService grew an extension system.

So what needs to happen is whatever is informing AccountsService of the background needs to be updated to the new location.

It was:
SetBackgroundFile() using the org.freedesktop.Accounts.User interface.

It is now:
Set the BackgroundFile property using the org.freedesktop.DisplayManager.AccountsService interface.

When I did the change I considered reading the old value, but I think that might cause a problem of LightDM reading a wrong value once it is no longer updated. I was also unsure how many systems outside of Unity made use of this feature.

I couldn't work out what was setting it in Budgie - if you point me to the appropriate code I can help fix it.

I'm also open to changing LightDM before the 1.26 release if this is not going to work for everyone. This was a change that had been bugging me for ages and meant basically non-Ubuntu distros couldn't really use this feature.

@mtwebster mtwebster self-assigned this Feb 13, 2018
@fossfreedom
Copy link
Contributor

@ikeydoherty any thoughts on Robert's budgie query above?

@ikeydoherty
Copy link
Contributor

Budgie has no support for the Ubuntu patches to AccountsService. Even slick-greeter has Ubuntu specific configuration for this non-standard patch. I believe the original idea was that LightDM extensions would be used.

If these changes are now upstream and part of AccountService proper, then perhaps we can modify budgie-daemon to listen to the picture-uri change and appropriately update the backend data. However if this is still Ubuntu specific then it is grossly inappropriate for inclusion into Budgie, so perhaps we should see where we stand on that part first.

@robert-ancell
Copy link

If something was writing to /var/lib/AccountsService/users/<username> directly they would have previously written:

[User]
Background=/path/to/background/image.jpg

Using the AccountsService extension the equivalent would be:

[org.freedesktop.DisplayManager.AccountsService]
BackgroundFile='/path/to/background/image.jpg'

With canonical/lightdm@6015bce (i.e. LightDM 1.26) this change is no longer Ubuntu specific and works with standard upstream AccountsService.

mtwebster added a commit to linuxmint/cinnamon-desktop that referenced this issue Feb 14, 2018
org.freedesktop.DisplayManager.AccountsService, while retaining
support for the old method (for mint 18/xenial.)

Remove build-time checks for support, instead rely on dbus feedback
at runtime.

ref: linuxmint/slick-greeter#94
mtwebster added a commit to linuxmint/lightdm-settings that referenced this issue Feb 14, 2018
being more broadly-supported, rather than just being an Ubuntu patch.

see linuxmint/slick-greeter#94
@mtwebster
Copy link
Member

Added support in Cinnamon (in addition to keeping support in mint 18/xenial for the old method,) and improved detection for user backgrounds in lightdm-settings.

One minor drawback is that there's no magic fix to users' current background not displaying, they'll have to set a new one using the new interface.

@robert-ancell
Copy link

@mtwebster my thoughts for current users is if you're using a service like gnome-settings-daemon to set BackgroundFile then you can write the value when the service starts (there shouldn't be any significant cost to doing this).

@mtwebster
Copy link
Member

That was entirely too simple - thanks

linuxmint/cinnamon-settings-daemon@63f501e

@rik-shaw
Copy link
Author

Thanks everyone for taking time to look at this: our users have standard Ubuntu (with Gnome) with Cinnamon added (and set as the default desktop) so it is nice to have this worked out in good time to ensure slick-greeter will work nicely for Ubuntu 18.04 / LM19 bases.

As the "fix" is to adjust how the desktop writes the user setting it seems that @flexiondotorg and @fossfreedom will need to make sure that Ubuntu Mate and Ubuntu Budgie can register user backgrounds correctly for 18.04 but it should hopefully be easy for them to implement. I'll close this bug now as it isn't a slick-greeter patch that is needed.

@ikeydoherty
Copy link
Contributor

@rik-shaw if this is indeed upstreamed then I hope that isn't the path forward for Budgie inclusion, Ubuntu Budgie is downstream.

@fossfreedom
Copy link
Contributor

@ikeydoherty ... think that is more of a gentle prod to ensure Mate and Budgie upstreams are appropriately poked to raise and discuss...

@khurshid-alam
Copy link

@mtwebster

With unity-greeter when I create new users in u-c-c, It doesn't set the required BackgroundFile in /var/lib/AccountsService/users/<username> for new user. Is this same with cinnamon?

See canonical/lightdm#11 (comment)

@mtwebster
Copy link
Member

Works fine here - our background is managed by cinnamon-settings-daemon - linuxmint/cinnamon-settings-daemon@63f501e

The AccountsService file is written at session startup (this covers new users) as well as during background changes.

@khurshid-alam
Copy link

Thanks. Then I suppose the issue is at our end.

@mtwebster
Copy link
Member

I should have mentioned, the way it works for us, the first time a new user logs in they will not have a background in their greeter - only after they've logged in once. (To me this is not worth worrying over, considering the various ways a new user can be created, via ui, terminal, etc...)

embrosyn pushed a commit to embrosyn/cinnamon-desktop that referenced this issue Mar 10, 2019
org.freedesktop.DisplayManager.AccountsService, while retaining
support for the old method (for mint 18/xenial.)

Remove build-time checks for support, instead rely on dbus feedback
at runtime.

ref: linuxmint/slick-greeter#94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants