summaryrefslogtreecommitdiff
blob: 202e247fe0c4bf6435f6ace9588e7aadf598631e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
diff -Naur gdm-2.26.1.orig/common/gdm-settings-keys.h gdm-2.26.1/common/gdm-settings-keys.h
--- gdm-2.26.1.orig/common/gdm-settings-keys.h	2009-05-12 16:52:49.747175254 +0200
+++ gdm-2.26.1/common/gdm-settings-keys.h	2009-05-12 17:02:36.826359776 +0200
@@ -27,6 +27,7 @@
 
 #define GDM_KEY_USER "daemon/User"
 #define GDM_KEY_GROUP "daemon/Group"
+#define GDM_KEY_VT "daemon/VT"
 #define GDM_KEY_AUTO_LOGIN_ENABLE "daemon/AutomaticLoginEnable"
 #define GDM_KEY_AUTO_LOGIN_USER "daemon/AutomaticLogin"
 #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable"
diff -Naur gdm-2.26.1.orig/daemon/gdm-server.c gdm-2.26.1/daemon/gdm-server.c
--- gdm-2.26.1.orig/daemon/gdm-server.c	2009-05-12 16:52:49.697174894 +0200
+++ gdm-2.26.1/daemon/gdm-server.c	2009-05-12 20:32:56.127640378 +0200
@@ -43,7 +43,9 @@
 
 #include "gdm-common.h"
 #include "gdm-signal-handler.h"
-
+#include "gdm-settings.h"
+#include "gdm-settings-direct.h"
+#include "gdm-settings-keys.h"
 #include "gdm-server.h"
 
 extern char **environ;
@@ -79,7 +81,7 @@
         char    *parent_display_name;
         char    *parent_auth_file;
         char    *chosen_hostname;
-
+        char    *vt;
         guint    child_watch_id;
 };
 
@@ -676,7 +678,7 @@
         gboolean res;
 
         /* fork X server process */
-        res = gdm_server_spawn (server, NULL);
+        res = gdm_server_spawn (server, server->priv->vt);
 
         return res;
 }
@@ -927,6 +929,8 @@
 static void
 gdm_server_init (GdmServer *server)
 {
+        int vt;
+        gboolean has_vt;
 
         server->priv = GDM_SERVER_GET_PRIVATE (server);
 
@@ -934,6 +938,11 @@
         server->priv->command = g_strdup (X_SERVER " -br -verbose");
         server->priv->log_dir = g_strdup (LOGDIR);
 
+        has_vt =  gdm_settings_direct_get_int (GDM_KEY_VT, &vt);
+        if (has_vt) {
+                server->priv->vt = g_strdup_printf ("vt %d", vt);
+        }
+
         add_ready_handler (server);
 }
 
diff -Naur gdm-2.26.1.orig/data/gdm.schemas.in.in gdm-2.26.1/data/gdm.schemas.in.in
--- gdm-2.26.1.orig/data/gdm.schemas.in.in	2009-05-12 16:52:49.703840966 +0200
+++ gdm-2.26.1/data/gdm.schemas.in.in	2009-05-12 17:03:42.806980552 +0200
@@ -23,6 +23,11 @@
       <default>@GDM_GROUPNAME@</default>
     </schema>
     <schema>
+      <key>daemon/VT</key>
+      <signature>i</signature>
+      <default>7</default>
+    </schema>
+    <schema>
       <key>daemon/AutomaticLoginEnable</key>
       <signature>b</signature>
       <default>false</default>