| Summary: | Port lightdm to use systemd(-logind) instead of consolekit | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Jani Välimaa <jani.valimaa> |
| Component: | RPM Packages | Assignee: | Jani Välimaa <jani.valimaa> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | derekjenn, paiiou |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: |
https://launchpad.net/bugs/930488 https://bugzilla.redhat.com/show_bug.cgi?id=867924 https://bugzilla.redhat.com/show_bug.cgi?id=872797 |
||
| Whiteboard: | |||
| Source RPM: | lightdm | CVE: | |
| Status comment: | |||
| Attachments: |
lightdm greeter log
Patch to disable check for support of shutdown/reboot Replacement for Fedora patch |
||
|
Description
Jani Välimaa
2012-11-06 14:38:12 CET
Jani Välimaa
2012-11-06 14:39:22 CET
See Also:
(none) =>
https://launchpad.net/bugs/930488, https://bugzilla.redhat.com/show_bug.cgi?id=867924
Georges Eckenschwiller
2012-11-16 14:54:55 CET
CC:
(none) =>
paiiou
Jani Välimaa
2012-11-19 20:01:46 CET
See Also:
(none) =>
https://bugzilla.redhat.com/show_bug.cgi?id=872797 I guess I'll push new lightdm with systemd-logind patches from Fedora to core/updates_testing to see if things works for other users than me. For me (with Xfce) there's no reboot/shutdown options in lightdm menu with Fedora's patches. Also, shutdown from desktop asks password as gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.CanPowerOff returns 'challenge'. Please update lightdm from core/updates_testing and report results. Thanks for that Jani I tried out lightdm-1.4.0-6.1.mga3 Still no shutdown or restart option in the gtk greeter, but then I tried it with lightdm-razorqt-greeter-0.5.1-2.mga3 and restart and shutdown works OK in the razor greeter. I then downgraded back to lightdm-1.4.0-6.mga3 and confirmed that restart/shutdown did NOT work with the razor greeter with the old package. It complains of a dbus error. So the new package works with the razor greeter but not the gtk greeter. It appears that the Fedora patch works to the extent that shudown and restart using systemd-logind works. What does not work is the function login1_call_function to check if shutdown and restart is supported. As a quick and dirty workaround if we just disable the check in lightdm-gtk-greeter then it works OK with lightdm-1.4.0-6.1.mga3 Here is the patch (including the patch for Bug 8413 ) --- lightdm-gtk-greeter/src/lightdm-gtk-greeter.c 2012-08-30 18:39:09.000000000 +0100 +++ /home/derek/rpmbuild/SOURCES/lightdm-gtk-greeter.c 2012-12-20 19:03:20.347275000 +0000 @@ -801,6 +801,7 @@ g_warning ("Failed to load background: %s", error->message); g_clear_error (&error); g_free (path); + background_pixbuf=gdk_pixbuf_add_alpha (background_pixbuf,FALSE,255,255,255); } else g_debug ("Using background color %s", value); @@ -952,14 +953,14 @@ gtk_widget_show (image); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0); - if (!lightdm_get_can_suspend ()) +/* if (!lightdm_get_can_suspend ()) gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "suspend_menuitem"))); if (!lightdm_get_can_hibernate ()) gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "hibernate_menuitem"))); if (!lightdm_get_can_restart ()) gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "restart_menuitem"))); if (!lightdm_get_can_shutdown ()) - gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shutdown_menuitem"))); + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shutdown_menuitem"))); */ renderer = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (session_combo), renderer, TRUE); I'll check this tomorrow. But before that, could you please add your patch as an attachment without alpha channel part. Then it's easier to read and apply them. no probs
--- lightdm-gtk-greeter/src/lightdm-gtk-greeter.c 2012-08-30 18:39:09.000000000 +0100
+++ lightdm-gtk-greeter/src/lightdm-gtk-greeter.c 2012-12-20 20:59:25.315950000 +0000
@@ -952,14 +952,14 @@
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, TRUE, 0);
- if (!lightdm_get_can_suspend ())
+/* if (!lightdm_get_can_suspend ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "suspend_menuitem")));
if (!lightdm_get_can_hibernate ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "hibernate_menuitem")));
if (!lightdm_get_can_restart ())
gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "restart_menuitem")));
if (!lightdm_get_can_shutdown ())
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shutdown_menuitem")));
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "shutdown_menuitem"))); */
renderer = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (session_combo), renderer, TRUE);
Created attachment 3270 [details]
lightdm greeter log
Jani
Attached is the log from lightdm without the patch. It looks like the Fedora patch has some errors in it. I will have an attempt to fix it tomorrow but I am not currently able to compile lightdm locally. Do you have any idea what dependencies I need to satisfy these failures?
error: Failed build dependencies:
pkgconfig(QtCore) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586
pkgconfig(QtDBus) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586
pkgconfig(QtGui) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586
(In reply to comment #6) > no probs > I ment as an attachment, a separate file, like you did with the greeter log. :) (In reply to comment #7) > Do you have any idea what > dependencies I need to satisfy these failures? > > error: Failed build dependencies: > pkgconfig(QtCore) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586 > pkgconfig(QtDBus) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586 > pkgconfig(QtGui) < 5.0.0 is needed by lightdm-1.4.0-6.1.mga3.i586 If you have the .spec available you can do 'urpmi lightdm.spec' to install needed BuildRequires. You can also do "urpmf --provides --literal 'pkgconfig(QtCore)'" to see which pkg provides QtCore pkgconfig file. Created attachment 3272 [details]
Patch to disable check for support of shutdown/reboot
>If you have the .spec available you can do 'urpmi lightdm.spec' to install
>needed BuildRequires.
Hey That's great! How come I have not known this all these years?
Created attachment 3273 [details]
Replacement for Fedora patch
Hi Jani
I think I have succeeded in fixing the Fedora patch.
The attached patch removes some cruft and fixes the bug in the Fedora patch. It now works with lightdm-gtk-greeter without having to use the disable check hack I gave you yesterday.
Attachment 3272 is obsolete:
0 =>
1
Derek Jennings
2012-12-21 15:56:50 CET
Attachment 3273 is patch:
0 =>
1 Thx again. Reused your mods in original patch and modified it a bit by myself too [1]. Pushed fixed release to core/updates_testing. Please test it so I can push it to core/release if all works. [1] http://svnweb.mageia.org/packages/cauldron/lightdm/current/SOURCES/lightdm-1.4.0-systemd_login1_power.patch?r1=333812&r2=333811&pathrev=333812 Confirming lightdm-1.4.0-6.2.mga3 works great I can Shutdown and Restart using either the gtk or razorqt greeters. The only thing I can find wrong is that the drop down list of users for the gtk greeter shows entries for "system user for lightdm" "system user for openssh" I will take a look into it and see if I can work out what is happening. (In reply to comment #14) > Confirming lightdm-1.4.0-6.2.mga3 works great > > I can Shutdown and Restart using either the gtk or razorqt greeters. > > The only thing I can find wrong is that the drop down list of users for the gtk > greeter shows entries for > > "system user for lightdm" > "system user for openssh" > For openssh it's because sshd user's login shell is set to /sbin/true. If you change it to e.g. /sbin/false it doesn't appear anymore. Dunno if this is a bug in lightdm or accountsservice. Never saw lightdm in user list. I may have created lightdm user by hand with "correct" options when testing lightdm, though. BTW, I'm closing this bug as FIXED and will push lightdm to release. Please open a new one for other issues. Status:
NEW =>
RESOLVED >For openssh it's because sshd user's login shell is set to /sbin/true. If you >change it to e.g. /sbin/false it doesn't appear anymore. Dunno if this is a bug >in lightdm or accountsservice. >Never saw lightdm in user list. I may have created lightdm user by hand with >"correct" options when testing lightdm, though. Ah. That will be my fault. I changed lightdm's login shell to /bin/bash so I could issue gdbus call commands as lightdm. I will poke about and see if lightdm is doing anything wrong and raise a new bug if necessary. Thanks for the work on this one. That is another bug squashed :-) for ssh its seems an accountsservice bug (see bug 7995) |