g_main_loop_quit (loop);
}
+static Seat *
+create_seat (const gchar *module_name, const gchar *name)
+{
+ if (strcmp (module_name, "xlocal") == 0) {
+ g_warning ("Seat type 'xlocal' is deprecated, use 'type=local' instead");
+ return seat_new ("local", name);
+ }
+ else
+ return seat_new (module_name, name);
+}
+
static void
display_manager_seat_removed_cb (DisplayManager *display_manager, Seat *seat)
{
if (!next_seat)
{
- next_seat = seat_new (*iter, seat_get_name (seat));
+ next_seat = create_seat (*iter, seat_get_name (seat));
g_string_assign (next_types, *iter);
}
else
g_debug ("Adding local X seat :%d", display_number);
- seat = seat_new ("xremote", "xremote0"); // FIXME: What to use for a name?
+ seat = create_seat ("xremote", "xremote0"); // FIXME: What to use for a name?
if (seat)
{
gchar *display_number_string;
g_list_free_full (config_sections, g_free);
for (type = types; !seat && type && *type; type++)
- seat = seat_new (*type, seat_name);
+ seat = create_seat (*type, seat_name);
g_strfreev (types);
if (seat)
if (seat)
{
Session *active_session;
- active_session = seat_get_expected_active_session (seat);
- if (g_strcmp0 (login1_session_id, session_get_login1_session_id (active_session)) == 0)
+ active_session = seat_get_expected_active_session (seat);
+ if (active_session != NULL &&
+ g_strcmp0 (login1_session_id, session_get_login1_session_id (active_session)) == 0)
{
// Session is already active
g_debug ("Session %s is already active", login1_session_id);
};
GError *error = NULL;
+ /* Disable the SIGPIPE handler - this is a stupid Unix hangover behaviour.
+ * We will handle piples / sockets being closed instead of having the whole daemon be killed...
+ * http://stackoverflow.com/questions/8369506/why-does-sigpipe-exist
+ */
+ signal (SIGPIPE, SIG_IGN);
+
/* When lightdm starts sessions it needs to run itself in a new mode */
if (argc >= 2 && strcmp (argv[1], "--session-child") == 0)
return session_child_run (argc, argv);
if (!config_has_key (config_get_instance (), "LightDM", "backup-logs"))
config_set_boolean (config_get_instance (), "LightDM", "backup-logs", TRUE);
if (!config_has_key (config_get_instance (), "Seat:*", "type"))
- config_set_string (config_get_instance (), "Seat:*", "type", "xlocal");
+ config_set_string (config_get_instance (), "Seat:*", "type", "local");
if (!config_has_key (config_get_instance (), "Seat:*", "pam-service"))
config_set_string (config_get_instance (), "Seat:*", "pam-service", "lightdm");
if (!config_has_key (config_get_instance (), "Seat:*", "pam-autologin-service"))
types = config_get_string_list (config_get_instance (), "Seat:*", "type");
for (type = types; type && *type; type++)
{
- seat = seat_new (*type, "seat0");
+ seat = create_seat (*type, "seat0");
if (seat)
break;
}