Blob Blame History Raw
From 6df33bb3293d220bcdff7abc68f61ebad841ffe1 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Fri, 12 May 2017 10:11:09 -0400
Subject: [PATCH] Revert "session: forward is-initial from display to worker"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 7a4e34049c79e907d1a027390c5d3a8dcdc11977.

It breaks login screen until reboot on 7.3→7.4 upgrade.
---
 daemon/gdm-display.c          |  6 ------
 daemon/gdm-session-worker.c   | 21 +++++----------------
 daemon/gdm-session-worker.xml |  3 ---
 daemon/gdm-session.c          | 25 -------------------------
 4 files changed, 5 insertions(+), 50 deletions(-)

diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 2af8e13e..c44e4941 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -1488,119 +1488,113 @@ wants_initial_setup (GdmDisplay *self)
         /* don't run initial-setup on remote displays
          */
         if (!self->priv->is_local) {
                 return FALSE;
         }
 
         /* don't run if the system has existing users */
         if (self->priv->have_existing_user_accounts) {
                 return FALSE;
         }
 
         /* don't run if initial-setup is unavailable */
         if (!can_create_environment ("gnome-initial-setup")) {
                 return FALSE;
         }
 
         if (!gdm_settings_direct_get_boolean (GDM_KEY_INITIAL_SETUP_ENABLE, &enabled)) {
                 return FALSE;
         }
 
         if (initial_setup_disabled_by_anaconda ()) {
                 return FALSE;
         }
 
         return enabled;
 }
 
 void
 gdm_display_start_greeter_session (GdmDisplay *self)
 {
-        GdmSession    *session;
         char          *display_name;
         char          *seat_id;
         char          *hostname;
         char          *auth_file = NULL;
 
         g_return_if_fail (g_strcmp0 (self->priv->session_class, "greeter") == 0);
 
         g_debug ("GdmDisplay: Running greeter");
 
         display_name = NULL;
         seat_id = NULL;
         hostname = NULL;
 
         g_object_get (self,
                       "x11-display-name", &display_name,
                       "seat-id", &seat_id,
                       "remote-hostname", &hostname,
                       NULL);
         if (self->priv->access_file != NULL) {
                 auth_file = gdm_display_access_file_get_path (self->priv->access_file);
         }
 
         g_debug ("GdmDisplay: Creating greeter for %s %s", display_name, hostname);
 
         g_signal_connect_object (self->priv->launch_environment,
                                  "opened",
                                  G_CALLBACK (on_launch_environment_session_opened),
                                  self, 0);
         g_signal_connect_object (self->priv->launch_environment,
                                  "started",
                                  G_CALLBACK (on_launch_environment_session_started),
                                  self, 0);
         g_signal_connect_object (self->priv->launch_environment,
                                  "stopped",
                                  G_CALLBACK (on_launch_environment_session_stopped),
                                  self, 0);
         g_signal_connect_object (self->priv->launch_environment,
                                  "exited",
                                  G_CALLBACK (on_launch_environment_session_exited),
                                  self, 0);
         g_signal_connect_object (self->priv->launch_environment,
                                  "died",
                                  G_CALLBACK (on_launch_environment_session_died),
                                  self, 0);
 
         if (auth_file != NULL) {
                 g_object_set (self->priv->launch_environment,
                               "x11-authority-file", auth_file,
                               NULL);
         }
 
         gdm_launch_environment_start (self->priv->launch_environment);
 
-        session = gdm_launch_environment_get_session (self->priv->launch_environment);
-        g_object_set (G_OBJECT (session),
-                      "display-is-initial", self->priv->is_initial,
-                      NULL);
-
         g_free (display_name);
         g_free (seat_id);
         g_free (hostname);
         g_free (auth_file);
 }
 
 static void
 chown_initial_setup_home_dir (void)
 {
         GFile *dir;
         GError *error;
         char *gis_dir_path;
         char *gis_uid_path;
         char *gis_uid_contents;
         struct passwd *pwe;
         uid_t uid;
 
         if (!gdm_get_pwent_for_name (INITIAL_SETUP_USERNAME, &pwe)) {
                 g_warning ("Unknown user %s", INITIAL_SETUP_USERNAME);
                 return;
         }
 
         gis_dir_path = g_strdup (pwe->pw_dir);
 
         gis_uid_path = g_build_filename (gis_dir_path,
                                          "gnome-initial-setup-uid",
                                          NULL);
         if (!g_file_get_contents (gis_uid_path, &gis_uid_contents, NULL, NULL)) {
                 g_warning ("Unable to read %s", gis_uid_path);
                 goto out;
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index d97b02b5..dffc8917 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -134,61 +134,60 @@ struct GdmSessionWorkerPrivate
         pam_handle_t     *pam_handle;
 
         GPid              child_pid;
         guint             child_watch_id;
 
         /* from Setup */
         char             *service;
         char             *x11_display_name;
         char             *x11_authority_file;
         char             *display_device;
         char             *display_seat_id;
         char             *hostname;
         char             *username;
         char             *log_file;
         char             *session_id;
         uid_t             uid;
         gid_t             gid;
         gboolean          password_is_required;
 
         int               cred_flags;
         int               login_vt;
         int               session_vt;
         int               session_tty_fd;
 
         char            **arguments;
         guint32           cancelled : 1;
         guint32           timed_out : 1;
         guint32           is_program_session : 1;
         guint32           is_reauth_session : 1;
         guint32           display_is_local : 1;
-        guint32           display_is_initial : 1;
         guint             state_change_idle_id;
         GdmSessionDisplayMode display_mode;
 
         char                 *server_address;
         GDBusConnection      *connection;
         GdmDBusWorkerManager *manager;
 
         GHashTable         *reauthentication_requests;
 
         GdmSessionAuditor  *auditor;
         GdmSessionSettings *user_settings;
 
         GDBusMethodInvocation *pending_invocation;
 };
 
 enum {
         PROP_0,
         PROP_SERVER_ADDRESS,
         PROP_IS_REAUTH_SESSION,
 };
 
 static void     gdm_session_worker_class_init   (GdmSessionWorkerClass *klass);
 static void     gdm_session_worker_init         (GdmSessionWorker      *session_worker);
 static void     gdm_session_worker_finalize     (GObject               *object);
 
 static void     gdm_session_worker_set_environment_variable (GdmSessionWorker *worker,
                                                              const char       *key,
                                                              const char       *value);
 
 static void     queue_state_change              (GdmSessionWorker      *worker);
@@ -2057,67 +2056,63 @@ gdm_session_worker_start_session (GdmSessionWorker  *worker,
         g_assert (sizeof (GPid) <= sizeof (int));
 
         g_debug ("GdmSessionWorker: state SESSION_STARTED");
         worker->priv->state = GDM_SESSION_WORKER_STATE_SESSION_STARTED;
 
         gdm_session_worker_watch_child (worker);
 
  out:
         if (error_code != PAM_SUCCESS) {
                 gdm_session_worker_uninitialize_pam (worker, error_code);
                 return FALSE;
         }
 
         return TRUE;
 }
 
 static gboolean
 set_up_for_new_vt (GdmSessionWorker *worker)
 {
         int fd;
         char vt_string[256], tty_string[256];
         int session_vt = 0;
 
         fd = open ("/dev/tty0", O_RDWR | O_NOCTTY);
 
         if (fd < 0) {
                 g_debug ("GdmSessionWorker: couldn't open VT master: %m");
                 return FALSE;
         }
 
-        if (worker->priv->display_is_initial) {
-                session_vt = atoi (GDM_INITIAL_VT);
-        } else {
-                if (ioctl(fd, VT_OPENQRY, &session_vt) < 0) {
-                        g_debug ("GdmSessionWorker: couldn't open new VT: %m");
-                        goto fail;
-                }
+        if (ioctl(fd, VT_OPENQRY, &session_vt) < 0) {
+                g_debug ("GdmSessionWorker: couldn't open new VT: %m");
+                goto fail;
         }
 
         worker->priv->session_vt = session_vt;
 
         close (fd);
         fd = -1;
 
         g_assert (session_vt > 0);
 
         g_snprintf (vt_string, sizeof (vt_string), "%d", session_vt);
 
         /* Set the VTNR. This is used by logind to configure a session in
          * the logind-managed case, but it doesn't hurt to set it always.
          * When logind gains support for XDG_VTNR=auto, we can make the
          * OPENQRY and this whole path only used by the new VT code. */
         gdm_session_worker_set_environment_variable (worker,
                                                      "XDG_VTNR",
                                                      vt_string);
 
         g_snprintf (tty_string, 256, "/dev/tty%d", session_vt);
         worker->priv->session_tty_fd = open (tty_string, O_RDWR | O_NOCTTY);
         pam_set_item (worker->priv->pam_handle, PAM_TTY, tty_string);
 
         return TRUE;
 
 fail:
         close (fd);
         return FALSE;
 }
 
@@ -2795,166 +2790,160 @@ gdm_session_worker_handle_establish_credentials (GdmDBusWorker         *object,
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
         validate_and_queue_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_ACCREDITED);
 
         if (!worker->priv->is_reauth_session) {
                 worker->priv->cred_flags = PAM_ESTABLISH_CRED;
         } else {
                 worker->priv->cred_flags = PAM_REINITIALIZE_CRED;
         }
 
         return TRUE;
 }
 
 static gboolean
 gdm_session_worker_handle_open (GdmDBusWorker         *object,
                                 GDBusMethodInvocation *invocation)
 {
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
         validate_and_queue_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_ACCOUNT_DETAILS_SAVED);
         return TRUE;
 }
 
 static gboolean
 gdm_session_worker_handle_setup (GdmDBusWorker         *object,
                                  GDBusMethodInvocation *invocation,
                                  const char            *service,
                                  const char            *x11_display_name,
                                  const char            *x11_authority_file,
                                  const char            *console,
                                  const char            *seat_id,
                                  const char            *hostname,
-                                 gboolean               display_is_local,
-                                 gboolean               display_is_initial)
+                                 gboolean               display_is_local)
 {
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
         validate_and_queue_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE);
 
         worker->priv->service = g_strdup (service);
         worker->priv->x11_display_name = g_strdup (x11_display_name);
         worker->priv->x11_authority_file = g_strdup (x11_authority_file);
         worker->priv->display_device = g_strdup (console);
         worker->priv->display_seat_id = g_strdup (seat_id);
         worker->priv->hostname = g_strdup (hostname);
         worker->priv->display_is_local = display_is_local;
-        worker->priv->display_is_initial = display_is_initial;
         worker->priv->username = NULL;
 
         g_signal_connect_swapped (worker->priv->user_settings,
                                   "notify::language-name",
                                   G_CALLBACK (on_saved_language_name_read),
                                   worker);
 
         g_signal_connect_swapped (worker->priv->user_settings,
                                   "notify::session-name",
                                   G_CALLBACK (on_saved_session_name_read),
                                   worker);
         return TRUE;
 }
 
 static gboolean
 gdm_session_worker_handle_setup_for_user (GdmDBusWorker         *object,
                                           GDBusMethodInvocation *invocation,
                                           const char            *service,
                                           const char            *username,
                                           const char            *x11_display_name,
                                           const char            *x11_authority_file,
                                           const char            *console,
                                           const char            *seat_id,
                                           const char            *hostname,
-                                          gboolean               display_is_local,
-                                          gboolean               display_is_initial)
+                                          gboolean               display_is_local)
 {
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
 
         if (!validate_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE))
                 return TRUE;
 
         worker->priv->service = g_strdup (service);
         worker->priv->x11_display_name = g_strdup (x11_display_name);
         worker->priv->x11_authority_file = g_strdup (x11_authority_file);
         worker->priv->display_device = g_strdup (console);
         worker->priv->display_seat_id = g_strdup (seat_id);
         worker->priv->hostname = g_strdup (hostname);
         worker->priv->display_is_local = display_is_local;
-        worker->priv->display_is_initial = display_is_initial;
         worker->priv->username = g_strdup (username);
 
         g_signal_connect_swapped (worker->priv->user_settings,
                                   "notify::language-name",
                                   G_CALLBACK (on_saved_language_name_read),
                                   worker);
 
         g_signal_connect_swapped (worker->priv->user_settings,
                                   "notify::session-name",
                                   G_CALLBACK (on_saved_session_name_read),
                                   worker);
 
         /* Load settings from accounts daemon before continuing
          */
         worker->priv->pending_invocation = invocation;
         if (gdm_session_settings_load (worker->priv->user_settings, username)) {
                 queue_state_change (worker);
         } else {
                 g_signal_connect (G_OBJECT (worker->priv->user_settings),
                                   "notify::is-loaded",
                                   G_CALLBACK (on_settings_is_loaded_changed),
                                   worker);
         }
 
         return TRUE;
 }
 
 static gboolean
 gdm_session_worker_handle_setup_for_program (GdmDBusWorker         *object,
                                              GDBusMethodInvocation *invocation,
                                              const char            *service,
                                              const char            *username,
                                              const char            *x11_display_name,
                                              const char            *x11_authority_file,
                                              const char            *console,
                                              const char            *seat_id,
                                              const char            *hostname,
                                              gboolean               display_is_local,
-                                             gboolean               display_is_initial,
                                              const char            *log_file)
 {
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
         validate_and_queue_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SETUP_COMPLETE);
 
         worker->priv->service = g_strdup (service);
         worker->priv->x11_display_name = g_strdup (x11_display_name);
         worker->priv->x11_authority_file = g_strdup (x11_authority_file);
         worker->priv->display_device = g_strdup (console);
         worker->priv->display_seat_id = g_strdup (seat_id);
         worker->priv->hostname = g_strdup (hostname);
         worker->priv->display_is_local = display_is_local;
-        worker->priv->display_is_initial = display_is_initial;
         worker->priv->username = g_strdup (username);
         worker->priv->log_file = g_strdup (log_file);
         worker->priv->is_program_session = TRUE;
 
         return TRUE;
 }
 
 static gboolean
 gdm_session_worker_handle_start_program (GdmDBusWorker         *object,
                                          GDBusMethodInvocation *invocation,
                                          const char            *text)
 {
         GdmSessionWorker *worker = GDM_SESSION_WORKER (object);
         GError *parse_error = NULL;
         validate_state_change (worker, invocation, GDM_SESSION_WORKER_STATE_SESSION_STARTED);
 
         if (worker->priv->is_reauth_session) {
                 g_dbus_method_invocation_return_error (invocation,
                                                        GDM_SESSION_WORKER_ERROR,
                                                        GDM_SESSION_WORKER_ERROR_IN_REAUTH_SESSION,
                                                        "Cannot start a program while in a reauth session");
                 return TRUE;
         }
 
         g_debug ("GdmSessionWorker: start program: %s", text);
 
         g_clear_pointer (&worker->priv->arguments, (GDestroyNotify) g_strfreev);
         if (! g_shell_parse_argv (text, NULL, &worker->priv->arguments, &parse_error)) {
                 g_dbus_method_invocation_take_error (invocation, parse_error);
                 return TRUE;
diff --git a/daemon/gdm-session-worker.xml b/daemon/gdm-session-worker.xml
index 9f6d8b35..f7d1dc2d 100644
--- a/daemon/gdm-session-worker.xml
+++ b/daemon/gdm-session-worker.xml
@@ -5,83 +5,80 @@
     <method name="Authorize" />
     <method name="EstablishCredentials" />
     <method name="Open">
       <arg name="session_id" direction="out" type="s"/>
     </method>
     <method name="SetLanguageName">
       <arg name="language" direction="in" type="s"/>
     </method>
     <method name="SetSessionName">
       <arg name="session_name" direction="in" type="s" />
     </method>
     <method name="SetSessionDisplayMode">
       <arg name="mode" direction="in" type="s"/>
     </method>
     <method name="SetEnvironmentVariable">
       <arg name="name" direction="in" type="s"/>
       <arg name="value" direction="in" type="s"/>
     </method>
     <method name="StartProgram">
       <arg name="command" direction="in" type="s"/>
       <arg name="child_pid" direction="out" type="i"/>
     </method>
     <method name="Setup">
       <arg name="service_name" direction="in" type="s"/>
       <arg name="x11_display_name" direction="in" type="s"/>
       <arg name="x11_authority_file" direction="in" type="s"/>
       <arg name="display_device" direction="in" type="s"/>
       <arg name="display_seat" direction="in" type="s"/>
       <arg name="hostname" direction="in" type="s"/>
       <arg name="display_is_local" direction="in" type="b"/>
-      <arg name="display_is_initial" direction="in" type="b"/>
     </method>
     <method name="SetupForUser">
       <arg name="service_name" direction="in" type="s"/>
       <arg name="user_name" direction="in" type="s"/>
       <arg name="x11_display_name" direction="in" type="s"/>
       <arg name="x11_authority_file" direction="in" type="s"/>
       <arg name="display_device" direction="in" type="s"/>
       <arg name="display_seat" direction="in" type="s"/>
       <arg name="hostname" direction="in" type="s"/>
       <arg name="display_is_local" direction="in" type="b"/>
-      <arg name="display_is_initial" direction="in" type="b"/>
     </method>
     <method name="SetupForProgram">
       <arg name="service_name" direction="in" type="s"/>
       <arg name="user_name" direction="in" type="s"/>
       <arg name="x11_display_name" direction="in" type="s"/>
       <arg name="x11_authority_file" direction="in" type="s"/>
       <arg name="display_device" direction="in" type="s"/>
       <arg name="display_seat" direction="in" type="s"/>
       <arg name="hostname" direction="in" type="s"/>
       <arg name="display_is_local" direction="in" type="b"/>
-      <arg name="display_is_initial" direction="in" type="b"/>
       <arg name="log_file" direction="in" type="s"/>
     </method>
     <method name="StartReauthentication">
       <arg name="pid_of_caller" direction="in" type="i"/>
       <arg name="uid_of_caller" direction="in" type="i"/>
       <arg name="address" direction="out" type="s"/>
     </method>
 
     <signal name="SessionExited">
       <arg name="service_name" type="s" />
       <!-- This is a combination of exit code and exit
            signal. Use macros in sys/wait.h to handle it. -->
       <arg name="status" type="i" />
     </signal>
     <signal name="SavedLanguageNameRead">
       <arg name="language_name" type="s"/>
     </signal>
     <signal name="SavedSessionNameRead">
       <arg name="session_name" type="s"/>
     </signal>
     <signal name="UsernameChanged">
       <arg name="new_username" type="s"/>
     </signal>
     <signal name="Reauthenticated">
       <arg name="service_name" type="s"/>
     </signal>
     <signal name="CancelPendingQuery">
     </signal>
   </interface>
 </node>
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index e69291fb..1dfbef64 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -103,74 +103,72 @@ struct _GdmSessionPrivate
         GdmDBusUserVerifier   *user_verifier_interface;
         GdmDBusGreeter        *greeter_interface;
         GdmDBusRemoteGreeter  *remote_greeter_interface;
         GdmDBusChooser        *chooser_interface;
 
         GList               *pending_worker_connections;
         GList               *outside_connections;
 
         GPid                 session_pid;
 
         /* object lifetime scope */
         char                *session_type;
         char                *display_name;
         char                *display_hostname;
         char                *display_device;
         char                *display_seat_id;
         char                *display_x11_authority_file;
         gboolean             display_is_local;
 
         GdmSessionVerificationMode verification_mode;
 
         uid_t                allowed_user;
 
         char                *fallback_session_name;
 
         GDBusServer         *worker_server;
         GDBusServer         *outside_server;
         GHashTable          *environment;
 
         guint32              is_program_session : 1;
-        guint32              display_is_initial : 1;
 #ifdef ENABLE_WAYLAND_SUPPORT
         guint32              ignore_wayland : 1;
 #endif
 };
 
 enum {
         PROP_0,
         PROP_VERIFICATION_MODE,
         PROP_ALLOWED_USER,
         PROP_DISPLAY_NAME,
         PROP_DISPLAY_HOSTNAME,
         PROP_DISPLAY_IS_LOCAL,
-        PROP_DISPLAY_IS_INITIAL,
         PROP_SESSION_TYPE,
         PROP_DISPLAY_DEVICE,
         PROP_DISPLAY_SEAT_ID,
         PROP_DISPLAY_X11_AUTHORITY_FILE,
         PROP_USER_X11_AUTHORITY_FILE,
         PROP_CONVERSATION_ENVIRONMENT,
 #ifdef ENABLE_WAYLAND_SUPPORT
         PROP_IGNORE_WAYLAND,
 #endif
 };
 
 enum {
         CONVERSATION_STARTED = 0,
         CONVERSATION_STOPPED,
         SETUP_COMPLETE,
         CANCELLED,
         HOSTNAME_SELECTED,
         CLIENT_REJECTED,
         CLIENT_CONNECTED,
         CLIENT_DISCONNECTED,
         CLIENT_READY_FOR_SESSION_TO_START,
         DISCONNECTED,
         AUTHENTICATION_FAILED,
         VERIFICATION_COMPLETE,
         SESSION_OPENED,
         SESSION_STARTED,
         SESSION_START_FAILED,
         SESSION_EXITED,
         SESSION_DIED,
         REAUTHENTICATION_STARTED,
@@ -2118,61 +2116,60 @@ send_setup (GdmSession *self,
                 display_hostname = "";
         }
         if (self->priv->display_device != NULL) {
                 display_device = self->priv->display_device;
         } else {
                 display_device = "";
         }
         if (self->priv->display_seat_id != NULL) {
                 display_seat_id = self->priv->display_seat_id;
         } else {
                 display_seat_id = "";
         }
         if (self->priv->display_x11_authority_file != NULL) {
                 display_x11_authority_file = self->priv->display_x11_authority_file;
         } else {
                 display_x11_authority_file = "";
         }
 
         g_debug ("GdmSession: Beginning setup");
 
         conversation = find_conversation_by_name (self, service_name);
         if (conversation != NULL) {
                 gdm_dbus_worker_call_setup (conversation->worker_proxy,
                                             service_name,
                                             display_name,
                                             display_x11_authority_file,
                                             display_device,
                                             display_seat_id,
                                             display_hostname,
                                             self->priv->display_is_local,
-                                            self->priv->display_is_initial,
                                             conversation->worker_cancellable,
                                             (GAsyncReadyCallback) on_setup_complete_cb,
                                             conversation);
         }
 }
 
 static void
 send_setup_for_user (GdmSession *self,
                      const char *service_name)
 {
         const char     *display_name;
         const char     *display_device;
         const char     *display_seat_id;
         const char     *display_hostname;
         const char     *display_x11_authority_file;
         const char     *selected_user;
         GdmSessionConversation *conversation;
 
         g_assert (service_name != NULL);
 
         conversation = find_conversation_by_name (self, service_name);
 
         if (self->priv->display_name != NULL) {
                 display_name = self->priv->display_name;
         } else {
                 display_name = "";
         }
         if (self->priv->display_hostname != NULL) {
                 display_hostname = self->priv->display_hostname;
         } else {
@@ -2184,122 +2181,120 @@ send_setup_for_user (GdmSession *self,
                 display_device = "";
         }
         if (self->priv->display_seat_id != NULL) {
                 display_seat_id = self->priv->display_seat_id;
         } else {
                 display_seat_id = "";
         }
         if (self->priv->display_x11_authority_file != NULL) {
                 display_x11_authority_file = self->priv->display_x11_authority_file;
         } else {
                 display_x11_authority_file = "";
         }
         if (self->priv->selected_user != NULL) {
                 selected_user = self->priv->selected_user;
         } else {
                 selected_user = "";
         }
 
         g_debug ("GdmSession: Beginning setup for user %s", self->priv->selected_user);
 
         if (conversation != NULL) {
                 gdm_dbus_worker_call_setup_for_user (conversation->worker_proxy,
                                                      service_name,
                                                      selected_user,
                                                      display_name,
                                                      display_x11_authority_file,
                                                      display_device,
                                                      display_seat_id,
                                                      display_hostname,
                                                      self->priv->display_is_local,
-                                                     self->priv->display_is_initial,
                                                      conversation->worker_cancellable,
                                                      (GAsyncReadyCallback) on_setup_complete_cb,
                                                      conversation);
         }
 }
 
 static void
 send_setup_for_program (GdmSession *self,
                         const char *service_name,
                         const char *username,
                         const char *log_file)
 {
         const char     *display_name;
         const char     *display_device;
         const char     *display_seat_id;
         const char     *display_hostname;
         const char     *display_x11_authority_file;
         GdmSessionConversation *conversation;
 
         g_assert (service_name != NULL);
 
         if (self->priv->display_name != NULL) {
                 display_name = self->priv->display_name;
         } else {
                 display_name = "";
         }
         if (self->priv->display_hostname != NULL) {
                 display_hostname = self->priv->display_hostname;
         } else {
                 display_hostname = "";
         }
         if (self->priv->display_device != NULL) {
                 display_device = self->priv->display_device;
         } else {
                 display_device = "";
         }
         if (self->priv->display_seat_id != NULL) {
                 display_seat_id = self->priv->display_seat_id;
         } else {
                 display_seat_id = "";
         }
         if (self->priv->display_x11_authority_file != NULL) {
                 display_x11_authority_file = self->priv->display_x11_authority_file;
         } else {
                 display_x11_authority_file = "";
         }
 
         g_debug ("GdmSession: Beginning setup for session for program using PAM service %s", service_name);
 
         conversation = find_conversation_by_name (self, service_name);
         if (conversation != NULL) {
                 gdm_dbus_worker_call_setup_for_program (conversation->worker_proxy,
                                                         service_name,
                                                         username,
                                                         display_name,
                                                         display_x11_authority_file,
                                                         display_device,
                                                         display_seat_id,
                                                         display_hostname,
                                                         self->priv->display_is_local,
-                                                        self->priv->display_is_initial,
                                                         log_file,
                                                         conversation->worker_cancellable,
                                                         (GAsyncReadyCallback) on_setup_complete_cb,
                                                         conversation);
         }
 }
 
 void
 gdm_session_setup (GdmSession *self,
                    const char *service_name)
 {
 
         g_return_if_fail (GDM_IS_SESSION (self));
 
         send_setup (self, service_name);
         gdm_session_defaults_changed (self);
 }
 
 
 void
 gdm_session_setup_for_user (GdmSession *self,
                             const char *service_name,
                             const char *username)
 {
 
         g_return_if_fail (GDM_IS_SESSION (self));
         g_return_if_fail (username != NULL);
 
         gdm_session_select_user (self, username);
 
@@ -3217,67 +3212,60 @@ set_display_seat_id (GdmSession *self,
                      const char *name)
 {
         g_free (self->priv->display_seat_id);
         self->priv->display_seat_id = g_strdup (name);
 }
 
 static void
 set_user_x11_authority_file (GdmSession *self,
                              const char *name)
 {
         g_free (self->priv->user_x11_authority_file);
         self->priv->user_x11_authority_file = g_strdup (name);
 }
 
 static void
 set_display_x11_authority_file (GdmSession *self,
                                 const char *name)
 {
         g_free (self->priv->display_x11_authority_file);
         self->priv->display_x11_authority_file = g_strdup (name);
 }
 
 static void
 set_display_is_local (GdmSession *self,
                       gboolean    is_local)
 {
         self->priv->display_is_local = is_local;
 }
 
 static void
-set_display_is_initial (GdmSession *self,
-                        gboolean    is_initial)
-{
-        self->priv->display_is_initial = is_initial;
-}
-
-static void
 set_verification_mode (GdmSession                 *self,
                        GdmSessionVerificationMode  verification_mode)
 {
         self->priv->verification_mode = verification_mode;
 }
 
 static void
 set_allowed_user (GdmSession *self,
                   uid_t       allowed_user)
 {
         self->priv->allowed_user = allowed_user;
 }
 
 static void
 set_conversation_environment (GdmSession  *self,
                               char       **environment)
 {
         g_strfreev (self->priv->conversation_environment);
         self->priv->conversation_environment = g_strdupv (environment);
 }
 
 static void
 set_session_type (GdmSession *self,
                   const char *session_type)
 {
 
         if (g_strcmp0 (self->priv->session_type, session_type) != 0) {
                 g_debug ("GdmSession: setting session to type '%s'", session_type? session_type : "");
                 g_free (self->priv->session_type);
                 self->priv->session_type = g_strdup (session_type);
@@ -3292,121 +3280,115 @@ gdm_session_set_property (GObject      *object,
 {
         GdmSession *self;
 
         self = GDM_SESSION (object);
 
         switch (prop_id) {
         case PROP_SESSION_TYPE:
                 set_session_type (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_NAME:
                 set_display_name (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_HOSTNAME:
                 set_display_hostname (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_DEVICE:
                 set_display_device (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_SEAT_ID:
                 set_display_seat_id (self, g_value_get_string (value));
                 break;
         case PROP_USER_X11_AUTHORITY_FILE:
                 set_user_x11_authority_file (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_X11_AUTHORITY_FILE:
                 set_display_x11_authority_file (self, g_value_get_string (value));
                 break;
         case PROP_DISPLAY_IS_LOCAL:
                 set_display_is_local (self, g_value_get_boolean (value));
                 break;
-        case PROP_DISPLAY_IS_INITIAL:
-                set_display_is_initial (self, g_value_get_boolean (value));
-                break;
         case PROP_VERIFICATION_MODE:
                 set_verification_mode (self, g_value_get_enum (value));
                 break;
         case PROP_ALLOWED_USER:
                 set_allowed_user (self, g_value_get_uint (value));
                 break;
         case PROP_CONVERSATION_ENVIRONMENT:
                 set_conversation_environment (self, g_value_get_pointer (value));
                 break;
 #ifdef ENABLE_WAYLAND_SUPPORT
         case PROP_IGNORE_WAYLAND:
                 gdm_session_set_ignore_wayland (self, g_value_get_boolean (value));
                 break;
 #endif
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
         }
 }
 
 static void
 gdm_session_get_property (GObject    *object,
                           guint       prop_id,
                           GValue     *value,
                           GParamSpec *pspec)
 {
         GdmSession *self;
 
         self = GDM_SESSION (object);
 
         switch (prop_id) {
         case PROP_SESSION_TYPE:
                 g_value_set_string (value, self->priv->session_type);
                 break;
         case PROP_DISPLAY_NAME:
                 g_value_set_string (value, self->priv->display_name);
                 break;
         case PROP_DISPLAY_HOSTNAME:
                 g_value_set_string (value, self->priv->display_hostname);
                 break;
         case PROP_DISPLAY_DEVICE:
                 g_value_set_string (value, self->priv->display_device);
                 break;
         case PROP_DISPLAY_SEAT_ID:
                 g_value_set_string (value, self->priv->display_seat_id);
                 break;
         case PROP_USER_X11_AUTHORITY_FILE:
                 g_value_set_string (value, self->priv->user_x11_authority_file);
                 break;
         case PROP_DISPLAY_X11_AUTHORITY_FILE:
                 g_value_set_string (value, self->priv->display_x11_authority_file);
                 break;
         case PROP_DISPLAY_IS_LOCAL:
                 g_value_set_boolean (value, self->priv->display_is_local);
                 break;
-        case PROP_DISPLAY_IS_INITIAL:
-                g_value_set_boolean (value, self->priv->display_is_initial);
-                break;
         case PROP_VERIFICATION_MODE:
                 g_value_set_enum (value, self->priv->verification_mode);
                 break;
         case PROP_ALLOWED_USER:
                 g_value_set_uint (value, self->priv->allowed_user);
                 break;
         case PROP_CONVERSATION_ENVIRONMENT:
                 g_value_set_pointer (value, self->priv->environment);
                 break;
 #ifdef ENABLE_WAYLAND_SUPPORT
         case PROP_IGNORE_WAYLAND:
                 g_value_set_boolean (value, self->priv->ignore_wayland);
                 break;
 #endif
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
         }
 }
 
 static void
 gdm_session_dispose (GObject *object)
 {
         GdmSession *self;
 
         self = GDM_SESSION (object);
 
         g_debug ("GdmSession: Disposing session");
 
         gdm_session_close (self);
@@ -3749,67 +3731,60 @@ gdm_session_class_init (GdmSessionClass *session_class)
 
         g_object_class_install_property (object_class,
                                          PROP_SESSION_TYPE,
                                          g_param_spec_string ("session-type",
                                                               NULL,
                                                               NULL,
                                                               NULL,
                                                               G_PARAM_READWRITE));
         g_object_class_install_property (object_class,
                                          PROP_DISPLAY_NAME,
                                          g_param_spec_string ("display-name",
                                                               "display name",
                                                               "display name",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
         g_object_class_install_property (object_class,
                                          PROP_DISPLAY_HOSTNAME,
                                          g_param_spec_string ("display-hostname",
                                                               "display hostname",
                                                               "display hostname",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
         g_object_class_install_property (object_class,
                                          PROP_DISPLAY_IS_LOCAL,
                                          g_param_spec_boolean ("display-is-local",
                                                                "display is local",
                                                                "display is local",
                                                                TRUE,
                                                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
         g_object_class_install_property (object_class,
-                                         PROP_DISPLAY_IS_INITIAL,
-                                         g_param_spec_boolean ("display-is-initial",
-                                                               "display is initial",
-                                                               "display is initial",
-                                                               FALSE,
-                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-        g_object_class_install_property (object_class,
                                          PROP_DISPLAY_X11_AUTHORITY_FILE,
                                          g_param_spec_string ("display-x11-authority-file",
                                                               "display x11 authority file",
                                                               "display x11 authority file",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
         /* not construct only */
         g_object_class_install_property (object_class,
                                          PROP_USER_X11_AUTHORITY_FILE,
                                          g_param_spec_string ("user-x11-authority-file",
                                                               "",
                                                               "",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
         g_object_class_install_property (object_class,
                                          PROP_DISPLAY_DEVICE,
                                          g_param_spec_string ("display-device",
                                                               "display device",
                                                               "display device",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
         g_object_class_install_property (object_class,
                                          PROP_DISPLAY_SEAT_ID,
                                          g_param_spec_string ("display-seat-id",
                                                               "display seat id",
                                                               "display seat id",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
-- 
2.12.2