summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2011-05-12 16:36:39 -0400
committerRay Strode <rstrode@redhat.com>2011-06-15 09:58:59 -0400
commit15a3f0c699fe1e8583a33d744edfbb0801ab92bf (patch)
treef4e492219848dd347a0cfb4973b9e5b629e7362e /daemon
parent8bf1de19c95b3069e108c9e477785c4e654801f7 (diff)
downloadgdm-15a3f0c699fe1e8583a33d744edfbb0801ab92bf.tar.gz
daemon: clean up greeter when unused
When user switching GDM needs to show a transient greeter for the user to pick a name from the list and jump to that session. After the user has been jumped to the selected session we don't really have a use for the greeter session. Historically, we've kept it around anyway, though, because X by default jumps back to the VT it started on when it exits, and we don't want the user to get thrown to an empty VT after they log out. This commit changes X to get started with the "-novtswitch" option, so that it doesn't do the undesirable switch-on-exit thing. This allows us to clean up the useless greeter following user switches. Based on work by Josselin Mouette <joss@debian.org> https://bugzilla.gnome.org/show_bug.cgi?id=618047
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-server.c8
-rw-r--r--daemon/gdm-simple-slave.c15
2 files changed, 17 insertions, 6 deletions
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 7135ffaf..8dacdb51 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -52,6 +52,12 @@
extern char **environ;
+#ifdef WITH_VT_SWITCH_WORKAROUND
+#define X_SERVER_COMMAND_LINE X_SERVER " -br -verbose -logverbose 7"
+#else
+#define X_SERVER_COMMAND_LINE X_SERVER " -br -verbose -logverbose 7 -novtswitch"
+#endif
+
#define GDM_SERVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SERVER, GdmServerPrivate))
/* These are the servstat values, also used as server
@@ -941,7 +947,7 @@ gdm_server_init (GdmServer *server)
server->priv = GDM_SERVER_GET_PRIVATE (server);
server->priv->pid = -1;
- server->priv->command = g_strdup (X_SERVER " -br -verbose -logverbose 7");
+ server->priv->command = g_strdup (X_SERVER_COMMAND_LINE);
server->priv->log_dir = g_strdup (LOGDIR);
add_ready_handler (server);
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index 7b9d7d8b..55c0f19a 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -463,12 +463,17 @@ start_session_timeout (GdmSimpleSlave *slave)
if (migrated) {
destroy_session (slave);
- /* We don't stop the slave here because
- when Xorg exits it switches to the VT it was
- started from. That interferes with fast
- user switching. */
+#ifdef WITH_VT_SWITCH_WORKAROUND
+ /* If the X server doesn't support -novtswitch, then when the
+ * user logs out from their session later, they're going to get thrown
+ * back to the VT the greeter is currently running on. We keep the
+ * greeter alive here, so when that happens the user doesn't see
+ * a blank VT or some confusing thing.
+ */
queue_greeter_reset (slave);
-
+#else
+ gdm_slave_stopped (GDM_SLAVE (slave));
+#endif
goto out;
}