! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Switch User via Logout Dialog button - Out of service
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description poma 2016-06-08 12:41:13 CEST
Switch User via Logout Dialog button does not work.

Add a switch user button to the logout dialog (Bug #10345)
http://git.xfce.org/xfce/xfce4-session/commit/?id=a3a388b
Comment 1 poma 2016-06-08 12:41:51 CEST
However Switch User works via dbus-send:

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToGreeter
method return time=1465381153.205244 sender=:1.17 -> destination=:1.57 serial=46 reply_serial=2

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter
method return time=1465381174.195069 sender=:1.17 -> destination=:1.65 serial=53 reply_serial=2

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.Lock
method return time=1465381194.833036 sender=:1.17 -> destination=:1.73 serial=60 reply_serial=2

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.Lock
method return time=1465381222.148236 sender=:1.17 -> destination=:1.81 serial=67 reply_serial=2

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager $XDG_SEAT_PATH org.freedesktop.DisplayManager.Seat.SwitchToUser string:test string:
method return time=1465381352.536868 sender=:1.17 -> destination=:1.93 serial=82 reply_serial=2

$ dbus-send --system --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToUser string:test string:
method return time=1465381391.896697 sender=:1.17 -> destination=:1.101 serial=89 reply_serial=2
Comment 2 poma 2016-06-08 12:42:33 CEST
$ dbus-daemon --version
D-Bus Message Bus Daemon 1.11.2
Copyright (C) 2002, 2003 Red Hat, Inc., CodeFactory AB, and others
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ lightdm --version
lightdm 1.18.0

$ xfce4-session --version
xfce4-session 4.12.1git-20160606git43e532f (Xfce 4.12)

Copyright (c) 2003-2016
	The Xfce development team. All rights reserved.

Please report bugs to <http://bugs.xfce.org/>.
Comment 3 poma 2016-06-16 07:22:43 CEST
Log out - without logout dialog:
xfce4-session-logout [-l, --logout]

Switch User/To Greeter / Lock - with overdue logout dialog:
xfce4-session-logout [, -f, --fast]

thus at least works somewhat :)

---
 xfce4-session/xfsm-shutdown.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c
index e015323..c05e478 100644
--- a/xfce4-session/xfsm-shutdown.c
+++ b/xfce4-session/xfsm-shutdown.c
@@ -536,6 +536,18 @@ xfsm_shutdown_can_switch_user (XfsmShutdown  *shutdown,
                                                  NULL,
                                                  error);
 
+  if (display_proxy != NULL)
+    {
+      g_dbus_proxy_call_sync (display_proxy,
+                              "SwitchToGreeter",
+                              g_variant_new ("()"),
+                              G_DBUS_CALL_FLAGS_NONE,
+                              -1,
+                              NULL,
+                              NULL);
+      g_object_unref (display_proxy);
+    }
+
   if (display_proxy == NULL)
     {
       xfsm_verbose ("display proxy returned NULL\n");
--
Comment 4 poma 2016-06-30 00:37:02 CEST
git ac38787
All right!

Bug #12639

Reported by:
poma
Reported on: 2016-06-08
Last modified on: 2016-06-30

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
Unspecified

Attachments

Additional information