diff options
Diffstat (limited to 'src/seat.c')
-rw-r--r-- | src/seat.c | 100 |
1 files changed, 50 insertions, 50 deletions
@@ -202,7 +202,7 @@ seat_set_active_session (Seat *seat, Session *session) if (IS_GREETER (s)) { - g_debug ("Stopping greeter"); + l_debug (seat, "Stopping greeter"); session_stop (s); } } @@ -281,7 +281,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name, exit_status = process_get_exit_status (script); if (WIFEXITED (exit_status)) { - g_debug ("Exit status of %s: %d", script_name, WEXITSTATUS (exit_status)); + l_debug (seat, "Exit status of %s: %d", script_name, WEXITSTATUS (exit_status)); result = WEXITSTATUS (exit_status) == EXIT_SUCCESS; } } @@ -319,7 +319,7 @@ check_stopped (Seat *seat) g_list_length (seat->priv->sessions) == 0) { seat->priv->stopped = TRUE; - g_debug ("Seat stopped"); + l_debug (seat, "Seat stopped"); g_signal_emit (seat, signals[STOPPED], 0); } } @@ -336,7 +336,7 @@ display_server_stopped_cb (DisplayServer *display_server, Seat *seat) GList *list, *link; Session *active_session; - g_debug ("Display server stopped"); + l_debug (seat, "Display server stopped"); g_signal_handlers_disconnect_matched (display_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat); seat->priv->display_servers = g_list_remove (seat->priv->display_servers, display_server); @@ -364,11 +364,11 @@ display_server_stopped_cb (DisplayServer *display_server, Seat *seat) !session_get_is_started (session) && g_list_length (seat->priv->display_servers) == 0) { - g_debug ("Stopping seat, greeter display server failed to start"); + l_debug (seat, "Stopping seat, greeter display server failed to start"); seat_stop (seat); } - g_debug ("Stopping session"); + l_debug (seat, "Stopping session"); session_stop (session); } g_list_free_full (list, g_object_unref); @@ -379,7 +379,7 @@ display_server_stopped_cb (DisplayServer *display_server, Seat *seat) active_session = seat_get_active_session (seat); if (!active_session || session_get_display_server (active_session) == display_server) { - g_debug ("Active display server stopped, starting greeter"); + l_debug (seat, "Active display server stopped, starting greeter"); seat_switch_to_greeter (seat); } } @@ -416,7 +416,7 @@ switch_to_greeter_from_failed_session (Seat *seat, Session *session) display_server = create_display_server (seat, session_get_session_type (session)); if (!display_server_start (display_server)) { - g_debug ("Failed to start display server for greeter"); + l_debug (seat, "Failed to start display server for greeter"); seat_stop (seat); } @@ -451,12 +451,12 @@ start_session (Seat *seat, Session *session) if (IS_GREETER (session)) { - g_debug ("Failed to start greeter"); + l_debug (seat, "Failed to start greeter"); display_server_stop (session_get_display_server (session)); return; } - g_debug ("Failed to start session, starting greeter"); + l_debug (seat, "Failed to start session, starting greeter"); switch_to_greeter_from_failed_session (seat, session); } @@ -471,7 +471,7 @@ run_session (Seat *seat, Session *session) script = seat_get_string_property (seat, "session-setup-script"); if (script && !run_script (seat, session_get_display_server (session), script, NULL)) { - g_debug ("Switching to greeter due to failed setup script"); + l_debug (seat, "Switching to greeter due to failed setup script"); switch_to_greeter_from_failed_session (seat, session); return; } @@ -499,17 +499,17 @@ session_authentication_complete_cb (Session *session, Seat *seat) { if (session_get_is_authenticated (session)) { - g_debug ("Session authenticated, running command"); + l_debug (seat, "Session authenticated, running command"); run_session (seat, session); } else if (!IS_GREETER (session)) { - g_debug ("Switching to greeter due to failed authentication"); + l_debug (seat, "Switching to greeter due to failed authentication"); switch_to_greeter_from_failed_session (seat, session); } else { - g_debug ("Stopping session that failed authentication"); + l_debug (seat, "Stopping session that failed authentication"); session_stop (session); } } @@ -519,7 +519,7 @@ session_stopped_cb (Session *session, Seat *seat) { DisplayServer *display_server; - g_debug ("Session stopped"); + l_debug (seat, "Session stopped"); g_signal_handlers_disconnect_matched (session, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat); seat->priv->sessions = g_list_remove (seat->priv->sessions, session); @@ -582,12 +582,12 @@ session_stopped_cb (Session *session, Seat *seat) if (session_get_is_authenticated (s)) { - g_debug ("Greeter stopped, running session"); + l_debug (seat, "Greeter stopped, running session"); run_session (seat, s); } else { - g_debug ("Greeter stopped, starting session authentication"); + l_debug (seat, "Greeter stopped, starting session authentication"); start_session (seat, s); } break; @@ -599,13 +599,13 @@ session_stopped_cb (Session *session, Seat *seat) g_list_length (seat->priv->display_servers) == 1 && g_list_nth_data (seat->priv->display_servers, 0) == display_server) { - g_debug ("Stopping seat, failed to start a greeter"); + l_debug (seat, "Stopping seat, failed to start a greeter"); seat_stop (seat); } /* If we were the active session, switch to a greeter */ else if (!IS_GREETER (session) && session == seat_get_active_session (seat)) { - g_debug ("Active session stopped, starting greeter"); + l_debug (seat, "Active session stopped, starting greeter"); seat_switch_to_greeter (seat); } @@ -625,7 +625,7 @@ session_stopped_cb (Session *session, Seat *seat) } if (n_sessions == 0) { - g_debug ("Stopping display server, no sessions require it"); + l_debug (seat, "Stopping display server, no sessions require it"); display_server_stop (display_server); } } @@ -703,7 +703,7 @@ get_session_argv (Seat *seat, SessionConfig *session_config, const gchar *sessio /* Split command into an array listing and make command absolute */ result = g_shell_parse_argv (session_config_get_command (session_config), &argc, &argv, &error); if (error) - g_debug ("Invalid session command '%s': %s", session_config_get_command (session_config), error->message); + l_debug (seat, "Invalid session command '%s': %s", session_config_get_command (session_config), error->message); g_clear_error (&error); if (!result) return NULL; @@ -742,7 +742,7 @@ find_session_config (Seat *seat, const gchar *sessions_dir, const gchar *session break; if (dirs[i+1] == NULL) - g_debug ("Failed to find session configuration %s", session_name); + l_debug (seat, "Failed to find session configuration %s", session_name); g_clear_error (&error); } g_strfreev (dirs); @@ -759,13 +759,13 @@ create_user_session (Seat *seat, const gchar *username) SessionConfig *session_config; Session *session = NULL; - g_debug ("Creating user session"); + l_debug (seat, "Creating user session"); /* Load user preferences */ user = accounts_get_user_by_name (username); if (!user) { - g_debug ("Can't login unknown user '%s'", username); + l_debug (seat, "Can't login unknown user '%s'", username); return NULL; } session_name = user_get_xsession (user); @@ -799,7 +799,7 @@ create_user_session (Seat *seat, const gchar *username) g_object_unref (session_config); } else - g_debug ("Can't find session '%s'", seat_get_string_property (seat, "user-session")); + l_debug (seat, "Can't find session '%s'", seat_get_string_property (seat, "user-session")); g_object_unref (user); @@ -819,7 +819,7 @@ create_guest_session (Seat *seat) g_free (sessions_dir); if (!session_config) { - g_debug ("Can't find session '%s'", seat_get_string_property (seat, "user-session")); + l_debug (seat, "Can't find session '%s'", seat_get_string_property (seat, "user-session")); return NULL; } @@ -915,7 +915,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi existing_session = find_user_session (seat, username); if (existing_session && session != existing_session) { - g_debug ("Returning to existing user session %s", username); + l_debug (seat, "Returning to existing user session %s", username); session_stop (session); seat_set_active_session (seat, existing_session); return TRUE; @@ -950,7 +950,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi g_free (sessions_dir); if (!session_config) { - g_debug ("Can't find session '%s'", seat_get_string_property (seat, "user-session")); + l_debug (seat, "Can't find session '%s'", seat_get_string_property (seat, "user-session")); return FALSE; } @@ -973,7 +973,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi if (can_share_display_server (seat, display_server) && strcmp (display_server_get_session_type (display_server), session_get_session_type (session)) == 0) { - g_debug ("Stopping greeter; display server will be re-used for user session"); + l_debug (seat, "Stopping greeter; display server will be re-used for user session"); /* Run on the same display server after the greeter has stopped */ session_set_display_server (session, display_server); @@ -990,7 +990,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi session_set_display_server (session, display_server); if (!display_server_start (display_server)) { - g_debug ("Failed to start display server for new session"); + l_debug (seat, "Failed to start display server for new session"); return FALSE; } @@ -1007,7 +1007,7 @@ create_greeter_session (Seat *seat) gchar *greeter_user; const gchar *greeter_wrapper; - g_debug ("Creating greeter session"); + l_debug (seat, "Creating greeter session"); sessions_dir = config_get_string (config_get_instance (), "LightDM", "greeters-directory"); session_config = find_session_config (seat, sessions_dir, seat_get_string_property (seat, "greeter-session")); @@ -1082,7 +1082,7 @@ display_server_ready_cb (DisplayServer *display_server, Seat *seat) script = seat_get_string_property (seat, "display-setup-script"); if (script && !run_script (seat, display_server, script, NULL)) { - g_debug ("Stopping display server due to failed setup script"); + l_debug (seat, "Stopping display server due to failed setup script"); display_server_stop (display_server); return; } @@ -1099,18 +1099,18 @@ display_server_ready_cb (DisplayServer *display_server, Seat *seat) { if (session_get_is_authenticated (session)) { - g_debug ("Display server ready, running session"); + l_debug (seat, "Display server ready, running session"); run_session (seat, session); } else { - g_debug ("Display server ready, starting session authentication"); + l_debug (seat, "Display server ready, starting session authentication"); start_session (seat, session); } } else { - g_debug ("Stopping not required display server"); + l_debug (seat, "Stopping not required display server"); display_server_stop (display_server); } } @@ -1120,7 +1120,7 @@ create_display_server (Seat *seat, const gchar *session_type) { DisplayServer *display_server; - g_debug ("Creating display server of type %s", session_type); + l_debug (seat, "Creating display server of type %s", session_type); display_server = SEAT_GET_CLASS (seat)->create_display_server (seat, session_type); if (!display_server) @@ -1163,7 +1163,7 @@ seat_switch_to_greeter (Seat *seat) greeter_session = find_greeter_session (seat); if (greeter_session) { - g_debug ("Switching to existing greeter"); + l_debug (seat, "Switching to existing greeter"); seat_set_active_session (seat, SESSION (greeter_session)); return TRUE; } @@ -1193,12 +1193,12 @@ seat_switch_to_user (Seat *seat, const gchar *username, const gchar *session_nam if (!seat->priv->can_switch) return FALSE; - g_debug ("Switching to user %s", username); + l_debug (seat, "Switching to user %s", username); session = find_user_session (seat, username); if (session) { - g_debug ("Switching to existing user session %s", username); + l_debug (seat, "Switching to existing user session %s", username); seat_set_active_session (seat, session); return TRUE; } @@ -1249,7 +1249,7 @@ seat_switch_to_guest (Seat *seat, const gchar *session_name) session = find_guest_session (seat); if (session) { - g_debug ("Switching to existing guest account %s", session_get_username (session)); + l_debug (seat, "Switching to existing guest account %s", session_get_username (session)); seat_set_active_session (seat, session); return TRUE; } @@ -1282,13 +1282,13 @@ seat_lock (Seat *seat, const gchar *username) if (!seat->priv->can_switch) return FALSE; - g_debug ("Locking seat"); + l_debug (seat, "Locking seat"); /* Switch to greeter if one open (shouldn't be though) */ greeter_session = find_greeter_session (seat); if (greeter_session) { - g_debug ("Switching to existing greeter"); + l_debug (seat, "Switching to existing greeter"); seat_set_active_session (seat, SESSION (greeter_session)); return TRUE; } @@ -1320,7 +1320,7 @@ seat_stop (Seat *seat) if (seat->priv->stopping) return; - g_debug ("Stopping seat"); + l_debug (seat, "Stopping seat"); seat->priv->stopping = TRUE; SEAT_GET_CLASS (seat)->stop (seat); } @@ -1352,7 +1352,7 @@ seat_real_start (Seat *seat) gboolean autologin_in_background; Session *session = NULL, *background_session = NULL; - g_debug ("Starting seat"); + l_debug (seat, "Starting seat"); /* If this display server doesn't have a session running on it, just start it */ if (!get_start_local_sessions (seat)) @@ -1400,7 +1400,7 @@ seat_real_start (Seat *seat) session_set_display_server (session, display_server); if (!display_server || !display_server_start (display_server)) { - g_debug ("Can't create display server for automatic login"); + l_debug (seat, "Can't create display server for automatic login"); session_stop (session); if (display_server) display_server_stop (display_server); @@ -1418,7 +1418,7 @@ seat_real_start (Seat *seat) greeter_session = create_greeter_session (seat); if (!greeter_session) { - g_debug ("Failed to create greeter session"); + l_debug (seat, "Failed to create greeter session"); return FALSE; } @@ -1444,7 +1444,7 @@ seat_real_start (Seat *seat) session_set_display_server (session, display_server); if (!display_server || !display_server_start (display_server)) { - g_debug ("Can't create display server for greeter"); + l_debug (seat, "Can't create display server for greeter"); session_stop (session); if (display_server) display_server_stop (display_server); @@ -1467,7 +1467,7 @@ seat_real_start (Seat *seat) background_display_server = create_display_server (seat, session_get_session_type (background_session)); session_set_display_server (background_session, background_display_server); if (!display_server_start (background_display_server)) - g_warning ("Failed to start display server for background session"); + l_warning (seat, "Failed to start display server for background session"); } seat->priv->started = TRUE; @@ -1516,7 +1516,7 @@ seat_real_stop (Seat *seat) DisplayServer *display_server = link->data; if (!display_server_get_is_stopping (display_server)) { - g_debug ("Stopping display server"); + l_debug (seat, "Stopping display server"); display_server_stop (display_server); } } @@ -1529,7 +1529,7 @@ seat_real_stop (Seat *seat) Session *session = link->data; if (!session_get_is_stopping (session)) { - g_debug ("Stopping session"); + l_debug (seat, "Stopping session"); session_stop (session); } } |