summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-02-16 20:31:33 -0500
committerRay Strode <rstrode@redhat.com>2015-02-16 23:40:11 -0500
commit1bc9311250935ec490cda75d1db979d0f04e1cd5 (patch)
tree649aca12b58812f886c3aa6d2417bc0c77a4d57f
parentebc2d47b7c21ba2bf683d5514842175b08c220ff (diff)
downloadgdm-wip/xserver-in-session.tar.gz
worker: force vt 1 for initial displaywip/xserver-in-session
If the session is logind managed, then we currently give it the next available VT. VT 1 will never show up as available, though, since it's allocated and in the foreground. This commit makes sure that, if the initial display is logind managed, then it will get put on VT 1.
-rw-r--r--daemon/gdm-session-worker.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 4c6ac2e6..783801f3 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -2025,9 +2025,13 @@ set_up_for_new_vt (GdmSessionWorker *worker)
goto fail;
}
- if (ioctl(fd, VT_OPENQRY, &session_vt) < 0) {
- g_debug ("GdmSessionWorker: couldn't open new VT: %m");
- goto fail;
+ 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;
+ }
}
worker->priv->login_vt = vt_state.v_active;