1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
--- libgdm/gdm-user-switching.c.orig 2022-01-12 14:15:56 UTC
+++ libgdm/gdm-user-switching.c
@@ -31,7 +31,9 @@
#include <glib-object.h>
#include <gio/gio.h>
+#ifdef WITH_SYSTEMD
#include <systemd/sd-login.h>
+#endif
#include "common/gdm-common.h"
#include "gdm-user-switching.h"
@@ -76,6 +78,7 @@ activate_session_id (GDBusConnection *connection,
{
GVariant *reply;
+#if defined(WITH_SYSTEMD)
reply = g_dbus_connection_call_sync (connection,
"org.freedesktop.login1",
"/org/freedesktop/login1",
@@ -86,6 +89,18 @@ activate_session_id (GDBusConnection *connection,
G_DBUS_CALL_FLAGS_NONE,
-1,
cancellable, error);
+#elif defined(WITH_CONSOLE_KIT)
+ reply = g_dbus_connection_call_sync (connection,
+ CK_NAME,
+ seat_id,
+ CK_SEAT_INTERFACE,
+ "ActivateSession",
+ g_variant_new ("(o)", session_id),
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ NULL, error);
+#endif
if (reply == NULL) {
g_prefix_error (error, _("Unable to activate session: "));
return FALSE;
@@ -227,7 +242,7 @@ goto_login_session (GDBusConnection *connection,
}
}
- if (! ret && g_strcmp0 (seat_id, "seat0") == 0) {
+ if (! ret && g_strcmp0 (seat_id, SEAT_ID) == 0) {
res = create_transient_display (connection, cancellable, error);
if (res) {
ret = TRUE;
|