diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-12-14 01:42:49 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2007-12-14 01:42:49 +0800 |
commit | a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328 (patch) | |
tree | c9adc2dbbe69097676059f93e317a1ed80bde4f3 | |
parent | fb26a5348ffbd301ac1b1a4225d6ab12db40478e (diff) | |
download | marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar.gz marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar.bz2 marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar.lz marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar.xz marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.tar.zst marcuscom-ports-a15b2f79b4cbb6f2dd6f55a8af4a5d40e2f4e328.zip |
Allow gdm to be started from rc.d.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@9964 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | x11/gdm/Makefile | 4 | ||||
-rw-r--r-- | x11/gdm/files/patch-common_gdm-settings-keys.h | 10 | ||||
-rw-r--r-- | x11/gdm/files/patch-daemon-gdm-server.c | 65 | ||||
-rw-r--r-- | x11/gdm/files/patch-data_gdm.schemas.in.in | 14 |
4 files changed, 89 insertions, 4 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index 2a5151b6e..3eeb6b981 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/x11/gdm/Makefile,v 1.86 2007/11/15 21:30:53 marcus Exp $ +# $MCom: ports/x11/gdm/Makefile,v 1.87 2007/11/23 06:47:21 marcus Exp $ # PORTNAME= gdm PORTVERSION= 2.21.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} diff --git a/x11/gdm/files/patch-common_gdm-settings-keys.h b/x11/gdm/files/patch-common_gdm-settings-keys.h new file mode 100644 index 000000000..abf349edc --- /dev/null +++ b/x11/gdm/files/patch-common_gdm-settings-keys.h @@ -0,0 +1,10 @@ +--- common/gdm-settings-keys.h.orig 2007-12-13 12:12:17.000000000 -0500 ++++ common/gdm-settings-keys.h 2007-12-13 12:12:47.000000000 -0500 +@@ -27,6 +27,7 @@ G_BEGIN_DECLS + + #define GDM_KEY_USER "daemon/User" + #define GDM_KEY_GROUP "daemon/Group" ++#define GDM_KEY_VT "daemon/VT" + + #define GDM_KEY_XDMCP "xdmcp/Enable" + #define GDM_KEY_MAX_PENDING "xdmcp/MaxPending" diff --git a/x11/gdm/files/patch-daemon-gdm-server.c b/x11/gdm/files/patch-daemon-gdm-server.c index 80d18a14d..551d6a1e7 100644 --- a/x11/gdm/files/patch-daemon-gdm-server.c +++ b/x11/gdm/files/patch-daemon-gdm-server.c @@ -1,5 +1,5 @@ ---- daemon/gdm-server.c.orig 2007-11-01 09:55:49.964708363 -0400 -+++ daemon/gdm-server.c 2007-11-01 09:56:08.940482938 -0400 +--- daemon/gdm-server.c.orig 2007-11-09 10:40:03.000000000 -0500 ++++ daemon/gdm-server.c 2007-12-13 12:35:56.000000000 -0500 @@ -32,6 +32,7 @@ #include <pwd.h> #include <grp.h> @@ -8,3 +8,64 @@ #include <glib.h> #include <glib/gi18n.h> +@@ -43,6 +44,10 @@ + #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; +@@ -76,6 +81,7 @@ struct GdmServerPrivate + char *parent_display_name; + char *parent_auth_file; + char *chosen_hostname; ++ char *vt; + + guint child_watch_id; + }; +@@ -662,7 +668,7 @@ gdm_server_start (GdmServer *server) + gboolean res; + + /* fork X server process */ +- res = gdm_server_spawn (server, NULL); ++ res = gdm_server_spawn (server, server->priv->vt); + + return res; + } +@@ -889,12 +895,32 @@ static void + gdm_server_init (GdmServer *server) + { + ++ int vt; ++ gboolean has_vt; ++ GdmSettings *settings = NULL; + server->priv = GDM_SERVER_GET_PRIVATE (server); + ++ settings = gdm_settings_new (); ++ if (settings == NULL) { ++ g_assert ("Unable to initialize settings"); ++ } ++ ++ if (! gdm_settings_direct_init (settings, GDMCONFDIR "/gdm.schemas", "/")) { ++ g_assert ("Unable to initialize settings"); ++ } ++ ++ has_vt = gdm_settings_direct_get_int (GDM_KEY_VT, &vt); ++ ++ g_object_unref (settings); ++ + server->priv->pid = -1; + server->priv->command = g_strdup (X_SERVER " -br -verbose"); + server->priv->log_dir = g_strdup (LOGDIR); + ++ if (has_vt) { ++ server->priv->vt = g_strdup_printf ("vt %d", vt); ++ } ++ + add_ready_handler (server); + } + diff --git a/x11/gdm/files/patch-data_gdm.schemas.in.in b/x11/gdm/files/patch-data_gdm.schemas.in.in new file mode 100644 index 000000000..ae5572ddd --- /dev/null +++ b/x11/gdm/files/patch-data_gdm.schemas.in.in @@ -0,0 +1,14 @@ +--- data/gdm.schemas.in.in.orig 2007-12-13 12:14:19.000000000 -0500 ++++ data/gdm.schemas.in.in 2007-12-13 12:15:05.000000000 -0500 +@@ -11,6 +11,11 @@ + <signature>s</signature> + <default>gdm</default> + </schema> ++ <schema> ++ <key>daemon/VT</key> ++ <signature>i</signature> ++ <default>9</default> ++ </schema> + + <schema> + <key>xdmcp/Enable</key> |