elementary / greeter

Login and Lock Screen greeter for elementary OS and Pantheon, using LightDM
GNU General Public License v3.0
152 stars 39 forks source link

Fix double login #624

Closed vjr closed 1 year ago

vjr commented 1 year ago

Fixes https://github.com/elementary/triage/issues/92

vjr commented 1 year ago

@elementary/desktop-developers

Any suggestions for how to get greeter to restart itself or via restart lightdm?

See the code block starting here: https://github.com/elementary/greeter/pull/624/files#diff-3d3c3150c12cf12f07b12828137c3dc9478f9a12c21ad40905aef57c8e12255aR519

When I try to trigger lightdm restart I get the error "this requires interactive permissions" so any pointers on how to resolve this?

Initial setup uses the systemd hostname1 dbus interface and the methods there have a boolean parameter to set interactive mode false but I couldn't see something similar for the systemd1 dbus interface methods.

I think this draft PR with its current approach might be an acceptable way to resolve the issue but if anyone has a better approach I can give that a shot too.

Thanks!

vjr commented 1 year ago

I tried (probably incorrectly) to use the sd_bus_set_allow_interactive_authorization () libsystemd API , still get the error.

@tintou

vjr commented 1 year ago

@meisenzahl the rules file wasn't working because jammy still has an older version 0.105 of polkit which doesn't support rules/javascript! Came across this while searching the web while troubleshooting the issue.

danirabbit commented 1 year ago

@tintou fixed this with a patch in Lightdm. So we don't need to restart this anymore :)