summaryrefslogtreecommitdiff
path: root/src/session-child.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-08-22 13:35:29 +1200
committerRobert Ancell <robert.ancell@canonical.com>2014-08-22 13:35:29 +1200
commit2b95d13e880ef4bb927fd0df4debfce3f0a9f766 (patch)
tree4b484bd971e0a33ceeb2fa9541201dc8939c16ac /src/session-child.c
parent9966903c17a74ec7b265c9b25afabaa7af4d42e5 (diff)
downloadlightdm-2b95d13e880ef4bb927fd0df4debfce3f0a9f766.tar.gz
Connect to logind on startup
Diffstat (limited to 'src/session-child.c')
-rw-r--r--src/session-child.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/session-child.c b/src/session-child.c
index 220d4860..f8fd3eaf 100644
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -544,15 +544,12 @@ session_child_run (int argc, char **argv)
return EXIT_FAILURE;
}
- if (login1_is_running ())
- {
- login1_session = login1_get_session_id ();
+ /* Check what logind session we are, or fallback to ConsoleKit */
+ login1_session = login1_get_session_id ();
+ if (login1_session)
write_string (login1_session);
- }
-
- if (!login1_session)
+ else
{
- /* Open a Console Kit session */
g_variant_builder_init (&ck_parameters, G_VARIANT_TYPE ("(a(sv))"));
g_variant_builder_open (&ck_parameters, G_VARIANT_TYPE ("a(sv)"));
g_variant_builder_add (&ck_parameters, "(sv)", "unix-user", g_variant_new_int32 (user_get_uid (user)));