This commit is contained in:
parent
7573a6cbe3
commit
f9899d2713
@ -1,15 +0,0 @@
|
|||||||
Index: gdm-2.23.92/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
|
||||||
===================================================================
|
|
||||||
--- gdm-2.23.92.orig/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
|
||||||
+++ gdm-2.23.92/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
|
||||||
@@ -1,8 +1,8 @@
|
|
||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
_Name=GNOME Settings Daemon
|
|
||||||
-TryExec=@LIBEXECDIR@/gnome-settings-daemon
|
|
||||||
-Exec=@LIBEXECDIR@/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
|
|
||||||
+TryExec=/usr/lib/gnome-settings-daemon/gnome-settings-daemon
|
|
||||||
+Exec=/usr/lib/gnome-settings-daemon/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
|
|
||||||
OnlyShowIn=GNOME;
|
|
||||||
X-GNOME-Autostart-Phase=Initialization
|
|
||||||
X-GNOME-Autostart-Notify=true
|
|
@ -1,14 +0,0 @@
|
|||||||
--- configure.ac
|
|
||||||
+++ configure.ac
|
|
||||||
@@ -987,6 +987,11 @@
|
|
||||||
X_SERVER="/usr/X11R6/bin/X"
|
|
||||||
GDM_USER_PATH="$GDM_USER_PATH:/usr/X11R6/bin"
|
|
||||||
X_CONFIG_OPTIONS="-audit 0"
|
|
||||||
+elif test -x /usr/bin/X; then
|
|
||||||
+ X_PATH="/usr/bin"
|
|
||||||
+ X_SERVER_PATH="/usr/bin"
|
|
||||||
+ X_SERVER="/usr/bin/X"
|
|
||||||
+ X_CONFIG_OPTIONS="-audit 0"
|
|
||||||
elif test -x /usr/bin/Xorg; then
|
|
||||||
X_PATH="/usr/bin"
|
|
||||||
X_SERVER_PATH="/usr/bin"
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -upr gdm-2.22.0-pre/daemon/gdm-server.c gdm-2.22.0-post/daemon/gdm-server.c
|
|
||||||
--- gdm-2.22.0-pre/daemon/gdm-server.c 2008-04-17 22:29:28.000000000 -0500
|
|
||||||
+++ gdm-2.22.0-post/daemon/gdm-server.c 2008-07-31 00:35:53.000000000 -0500
|
|
||||||
@@ -125,7 +125,7 @@ _gdm_server_query_ck_for_display_device
|
|
||||||
g_return_val_if_fail (GDM_IS_SERVER (server), NULL);
|
|
||||||
|
|
||||||
error = NULL;
|
|
||||||
- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s",
|
|
||||||
+ command = g_strdup_printf ("/usr/lib/ConsoleKit/ck-get-x11-display-device --display %s",
|
|
||||||
server->priv->display_name);
|
|
||||||
|
|
||||||
g_debug ("GdmServer: Running helper %s", command);
|
|
90
gdm-helper-directory.patch
Normal file
90
gdm-helper-directory.patch
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 8cd83c6..915b532 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -982,6 +982,22 @@ fi
|
||||||
|
AC_SUBST(GDM_CUSTOM_CONF)
|
||||||
|
AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf')
|
||||||
|
|
||||||
|
+AC_ARG_WITH(gnome-settings-daemon-directory,
|
||||||
|
+ [AC_HELP_STRING([--with-gnome-settings-daemon-directory],
|
||||||
|
+ [Specify the directory of gnome-settings-daemon @<:@default=libexecdir@:>@])],,
|
||||||
|
+ [with_gnome_settings_daemon_directory="\${libexecdir}"])
|
||||||
|
+
|
||||||
|
+GNOME_SETTINGS_DAEMON_DIR=$with_gnome_settings_daemon_directory
|
||||||
|
+AC_SUBST(GNOME_SETTINGS_DAEMON_DIR)
|
||||||
|
+
|
||||||
|
+AC_ARG_WITH(consolekit-directory,
|
||||||
|
+ [AC_HELP_STRING([--with-consolekit-directory],
|
||||||
|
+ [Specify the directory of ck-get-x11-display-device @<:@default=libexecdir@:>@])],,
|
||||||
|
+ [with_consolekit_directory="\${libexecdir}"])
|
||||||
|
+
|
||||||
|
+CONSOLEKIT_DIR=$with_consolekit_directory
|
||||||
|
+AC_SUBST(CONSOLEKIT_DIR)
|
||||||
|
+
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
dnl - Check for XEvIE extension support
|
||||||
|
dnl ---------------------------------------------------------------------------
|
||||||
|
@@ -1386,6 +1402,8 @@ echo "
|
||||||
|
dmconfdir: ${dmconfdir}
|
||||||
|
localstatedir: ${localstatedir}
|
||||||
|
datadir: ${datadir}
|
||||||
|
+ g-s-d location: ${with_gnome_settings_daemon_directory}
|
||||||
|
+ consolekit location: ${with_consolekit_directory}
|
||||||
|
source code location: ${srcdir}
|
||||||
|
compiler: ${CC}
|
||||||
|
cflags: ${CFLAGS}
|
||||||
|
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
|
||||||
|
index 3daf924..10b0bd8 100644
|
||||||
|
--- a/daemon/Makefile.am
|
||||||
|
+++ b/daemon/Makefile.am
|
||||||
|
@@ -16,6 +16,7 @@ AM_CPPFLAGS = \
|
||||||
|
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
|
||||||
|
-DGDM_XAUTH_DIR=\"$(GDM_XAUTH_DIR)\" \
|
||||||
|
-DGDM_SESSION_DEFAULT_PATH=\"$(GDM_SESSION_DEFAULT_PATH)\" \
|
||||||
|
+ -DCONSOLEKIT_DIR=\"$(CONSOLEKIT_DIR)\" \
|
||||||
|
$(DISABLE_DEPRECATED_CFLAGS) \
|
||||||
|
$(DAEMON_CFLAGS) \
|
||||||
|
$(XLIB_CFLAGS) \
|
||||||
|
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
|
||||||
|
index ba10386..d3476e7 100644
|
||||||
|
--- a/daemon/gdm-server.c
|
||||||
|
+++ b/daemon/gdm-server.c
|
||||||
|
@@ -127,7 +127,7 @@ _gdm_server_query_ck_for_display_device (GdmServer *server)
|
||||||
|
g_return_val_if_fail (GDM_IS_SERVER (server), NULL);
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
- command = g_strdup_printf (LIBEXECDIR "/ck-get-x11-display-device --display %s",
|
||||||
|
+ command = g_strdup_printf (CONSOLEKIT_DIR "/ck-get-x11-display-device --display %s",
|
||||||
|
server->priv->display_name);
|
||||||
|
|
||||||
|
g_debug ("GdmServer: Running helper %s", command);
|
||||||
|
diff --git a/data/greeter-autostart/Makefile.am b/data/greeter-autostart/Makefile.am
|
||||||
|
index 2f45a74..ea90455 100644
|
||||||
|
--- a/data/greeter-autostart/Makefile.am
|
||||||
|
+++ b/data/greeter-autostart/Makefile.am
|
||||||
|
@@ -5,7 +5,8 @@ edit = sed \
|
||||||
|
-e 's|@SYSCONFDIR[@]|$(sysconfdir)|g' \
|
||||||
|
-e 's|@LIBDIR[@]|$(libdir)|g' \
|
||||||
|
-e 's|@LIBEXECDIR[@]|$(libexecdir)|g' \
|
||||||
|
- -e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g'
|
||||||
|
+ -e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g' \
|
||||||
|
+ -e 's|@GNOME_SETTINGS_DAEMON_DIR[@]|$(GNOME_SETTINGS_DAEMON_DIR)|g'
|
||||||
|
|
||||||
|
%.desktop.in: %.desktop.in.in Makefile
|
||||||
|
$(edit) $< >$@
|
||||||
|
diff --git a/data/greeter-autostart/gnome-settings-daemon.desktop.in.in b/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
||||||
|
index b4b31e1..45131c9 100644
|
||||||
|
--- a/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
||||||
|
+++ b/data/greeter-autostart/gnome-settings-daemon.desktop.in.in
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
_Name=GNOME Settings Daemon
|
||||||
|
-TryExec=@LIBEXECDIR@/gnome-settings-daemon
|
||||||
|
-Exec=@LIBEXECDIR@/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
|
||||||
|
+TryExec=@GNOME_SETTINGS_DAEMON_DIR@/gnome-settings-daemon
|
||||||
|
+Exec=@GNOME_SETTINGS_DAEMON_DIR@/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
|
||||||
|
OnlyShowIn=GNOME;
|
||||||
|
X-GNOME-Autostart-Phase=Initialization
|
||||||
|
X-GNOME-Autostart-Notify=true
|
121
gdm-keyboard-from-hal.patch
Normal file
121
gdm-keyboard-from-hal.patch
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
diff -up gdm-2.25.2/configure.ac.system-keyboard gdm-2.25.2/configure.ac
|
||||||
|
--- gdm-2.25.2/configure.ac.system-keyboard 2009-02-24 22:51:00.058815966 -0500
|
||||||
|
+++ gdm-2.25.2/configure.ac 2009-02-24 22:51:00.154816109 -0500
|
||||||
|
@@ -69,6 +69,7 @@ AC_SUBST(COMMON_LIBS)
|
||||||
|
PKG_CHECK_MODULES(DAEMON,
|
||||||
|
dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
|
||||||
|
gobject-2.0 >= $GLIB_REQUIRED_VERSION
|
||||||
|
+ hal
|
||||||
|
)
|
||||||
|
AC_SUBST(DAEMON_CFLAGS)
|
||||||
|
AC_SUBST(DAEMON_LIBS)
|
||||||
|
diff -up gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard gdm-2.25.2/daemon/gdm-session-direct.c
|
||||||
|
--- gdm-2.25.2/daemon/gdm-session-direct.c.system-keyboard 2008-08-26 15:04:00.000000000 -0400
|
||||||
|
+++ gdm-2.25.2/daemon/gdm-session-direct.c 2009-02-24 22:55:02.656566009 -0500
|
||||||
|
@@ -45,6 +45,8 @@
|
||||||
|
#include <dbus/dbus-glib.h>
|
||||||
|
#include <dbus/dbus-glib-lowlevel.h>
|
||||||
|
|
||||||
|
+#include <libhal.h>
|
||||||
|
+
|
||||||
|
#include "gdm-session-direct.h"
|
||||||
|
#include "gdm-session.h"
|
||||||
|
#include "gdm-session-private.h"
|
||||||
|
@@ -595,14 +597,66 @@ get_default_language_name (GdmSessionDir
|
||||||
|
return setlocale (LC_MESSAGES, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static char *
|
||||||
|
+get_system_default_layout (GdmSessionDirect *session)
|
||||||
|
+{
|
||||||
|
+ DBusConnection *connection;
|
||||||
|
+ LibHalContext *ctx;
|
||||||
|
+ char **devices;
|
||||||
|
+ int n_devices;
|
||||||
|
+ char *layout;
|
||||||
|
+ char *result;
|
||||||
|
+
|
||||||
|
+ result = NULL;
|
||||||
|
+
|
||||||
|
+ connection = dbus_g_connection_get_connection (session->priv->connection);
|
||||||
|
+ ctx = libhal_ctx_new ();
|
||||||
|
+ libhal_ctx_set_dbus_connection (ctx, connection);
|
||||||
|
+
|
||||||
|
+ if (!libhal_ctx_init (ctx, NULL)) {
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ devices = libhal_find_device_by_capability (ctx,
|
||||||
|
+ "input.keyboard",
|
||||||
|
+ &n_devices,
|
||||||
|
+ NULL);
|
||||||
|
+ if (n_devices > 0) {
|
||||||
|
+ layout = libhal_device_get_property_string (ctx,
|
||||||
|
+ devices[0],
|
||||||
|
+ "input.x11_options.XkbLayout",
|
||||||
|
+ NULL);
|
||||||
|
+ if (!layout) {
|
||||||
|
+ layout = libhal_device_get_property_string (ctx,
|
||||||
|
+ devices[0],
|
||||||
|
+ "input.xkb.layout",
|
||||||
|
+ NULL);
|
||||||
|
+ }
|
||||||
|
+ result = g_strdup (layout);
|
||||||
|
+ libhal_free_string (layout);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ libhal_free_string_array (devices);
|
||||||
|
+
|
||||||
|
+ libhal_ctx_shutdown (ctx, NULL);
|
||||||
|
+ libhal_ctx_free (ctx);
|
||||||
|
+
|
||||||
|
+out:
|
||||||
|
+ if (!result) {
|
||||||
|
+ result = g_strdup ("us");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static const char *
|
||||||
|
get_default_layout_name (GdmSessionDirect *session)
|
||||||
|
{
|
||||||
|
- if (session->priv->saved_layout != NULL) {
|
||||||
|
- return session->priv->saved_layout;
|
||||||
|
+ if (!session->priv->saved_layout) {
|
||||||
|
+ session->priv->saved_layout = get_system_default_layout (session);
|
||||||
|
}
|
||||||
|
|
||||||
|
- return "us";
|
||||||
|
+ return session->priv->saved_layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *
|
||||||
|
@@ -1971,9 +2025,10 @@ setup_session_environment (GdmSessionDir
|
||||||
|
"GDM_LANG",
|
||||||
|
get_language_name (session));
|
||||||
|
|
||||||
|
- gdm_session_direct_set_environment_variable (session,
|
||||||
|
- "GDM_KEYBOARD_LAYOUT",
|
||||||
|
- get_layout_name (session));
|
||||||
|
+ if (g_strcmp0 (get_layout_name (session), get_system_default_layout (session)) != 0)
|
||||||
|
+ gdm_session_direct_set_environment_variable (session,
|
||||||
|
+ "GDM_KEYBOARD_LAYOUT",
|
||||||
|
+ get_layout_name (session));
|
||||||
|
|
||||||
|
gdm_session_direct_set_environment_variable (session,
|
||||||
|
"DISPLAY",
|
||||||
|
diff -up gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard gdm-2.25.2/daemon/gdm-session-settings.c
|
||||||
|
--- gdm-2.25.2/daemon/gdm-session-settings.c.system-keyboard 2008-08-26 15:04:00.000000000 -0400
|
||||||
|
+++ gdm-2.25.2/daemon/gdm-session-settings.c 2009-02-24 22:51:00.158815919 -0500
|
||||||
|
@@ -149,8 +149,7 @@ gdm_session_settings_set_layout_name (Gd
|
||||||
|
{
|
||||||
|
g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
|
||||||
|
|
||||||
|
- if (settings->priv->layout_name == NULL ||
|
||||||
|
- strcmp (settings->priv->layout_name, layout_name) != 0) {
|
||||||
|
+ if (g_strcmp0 (settings->priv->layout_name, layout_name) != 0) {
|
||||||
|
settings->priv->layout_name = g_strdup (layout_name);
|
||||||
|
g_object_notify (G_OBJECT (settings), "layout-name");
|
||||||
|
}
|
||||||
|
|
116
gdm-keyboard-from-sysconfig.patch
Normal file
116
gdm-keyboard-from-sysconfig.patch
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
|
||||||
|
index 75a1cec..15ea4e3 100644
|
||||||
|
--- a/daemon/gdm-session-direct.c
|
||||||
|
+++ b/daemon/gdm-session-direct.c
|
||||||
|
@@ -45,6 +45,8 @@
|
||||||
|
#include <dbus/dbus-glib.h>
|
||||||
|
#include <dbus/dbus-glib-lowlevel.h>
|
||||||
|
|
||||||
|
+#include "gdm-sysconfig.h"
|
||||||
|
+
|
||||||
|
#include "gdm-session-direct.h"
|
||||||
|
#include "gdm-session.h"
|
||||||
|
#include "gdm-session-private.h"
|
||||||
|
@@ -600,8 +602,21 @@ get_default_language_name (GdmSessionDirect *session)
|
||||||
|
static const char *
|
||||||
|
get_default_layout_name (GdmSessionDirect *session)
|
||||||
|
{
|
||||||
|
- if (session->priv->saved_layout != NULL) {
|
||||||
|
- return session->priv->saved_layout;
|
||||||
|
+ if (!session->priv->saved_layout)
|
||||||
|
+ session->priv->saved_layout = gdm_sysconfig_load_value ("/etc/sysconfig/keyboard", "KEYTABLE");
|
||||||
|
+
|
||||||
|
+ if (session->priv->saved_layout) {
|
||||||
|
+ if (g_str_has_suffix (session->priv->saved_layout, ".gz"))
|
||||||
|
+ *(session->priv->saved_layout + strlen (session->priv->saved_layout) - strlen (".gz")) = '\0';
|
||||||
|
+ if (g_str_has_suffix (session->priv->saved_layout, ".map"))
|
||||||
|
+ *(session->priv->saved_layout + strlen (session->priv->saved_layout) - strlen (".map")) = '\0';
|
||||||
|
+
|
||||||
|
+ /* Lame attempt to make it map correctly from some console keymaps, e.g.
|
||||||
|
+ * fr-latin1, no-latin1 -> fr, no */
|
||||||
|
+ if (strchr (session->priv->saved_layout, '-'))
|
||||||
|
+ *(strchr (session->priv->saved_layout, '-')) = '\0';
|
||||||
|
+
|
||||||
|
+ return session->priv->saved_layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "us";
|
||||||
|
diff --git a/gui/simple-greeter/gdm-layouts.c b/gui/simple-greeter/gdm-layouts.c
|
||||||
|
index 479d5ea..fba3147 100644
|
||||||
|
--- a/gui/simple-greeter/gdm-layouts.c
|
||||||
|
+++ b/gui/simple-greeter/gdm-layouts.c
|
||||||
|
@@ -70,14 +70,35 @@ xci_desc_to_utf8 (XklConfigItem * ci)
|
||||||
|
g_locale_to_utf8 (sd, -1, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static gchar *
|
||||||
|
+canonicalize_layout_name (const gchar *name)
|
||||||
|
+{
|
||||||
|
+ gchar *canon_name;
|
||||||
|
+
|
||||||
|
+ if (!name)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ canon_name = g_strdup (name);
|
||||||
|
+
|
||||||
|
+ if (g_str_has_suffix (canon_name, ".gz"))
|
||||||
|
+ *(canon_name + strlen (canon_name) - strlen (".gz")) = '\0';
|
||||||
|
+ if (g_str_has_suffix (canon_name, ".map"))
|
||||||
|
+ *(canon_name + strlen (canon_name) - strlen (".map")) = '\0';
|
||||||
|
+
|
||||||
|
+ return canon_name;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
add_variant (XklConfigRegistry *config,
|
||||||
|
const XklConfigItem *item,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
LayoutData *ldata = data;
|
||||||
|
+ gchar *name;
|
||||||
|
|
||||||
|
- ldata->list = g_slist_prepend (ldata->list, g_strdup_printf ("%s\t%s", ldata->layout, item->name));
|
||||||
|
+ name = canonicalize_layout_name (item->name);
|
||||||
|
+ ldata->list = g_slist_prepend (ldata->list, g_strdup_printf ("%s\t%s", ldata->layout, name));
|
||||||
|
+ g_free (name);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -86,11 +107,16 @@ add_layout (XklConfigRegistry *config,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
LayoutData *ldata = data;
|
||||||
|
+ gchar *name;
|
||||||
|
|
||||||
|
- ldata->layout = item->name;
|
||||||
|
- ldata->list = g_slist_prepend (ldata->list, g_strdup (item->name));
|
||||||
|
- xkl_config_registry_foreach_layout_variant (config, item->name, add_variant, data);
|
||||||
|
+ name = canonicalize_layout_name (item->name);
|
||||||
|
+
|
||||||
|
+ ldata->layout = name;
|
||||||
|
+ ldata->list = g_slist_prepend (ldata->list, g_strdup (name));
|
||||||
|
+ xkl_config_registry_foreach_layout_variant (config, name, add_variant, data);
|
||||||
|
ldata->layout = NULL;
|
||||||
|
+
|
||||||
|
+ g_free (name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -108,7 +134,7 @@ gdm_get_layout_from_name (const char *name)
|
||||||
|
|
||||||
|
init_xkl ();
|
||||||
|
|
||||||
|
- id1 = g_strdup (name);
|
||||||
|
+ id1 = canonicalize_layout_name (name);
|
||||||
|
p = strchr (id1, '\t');
|
||||||
|
|
||||||
|
if (p != NULL) {
|
||||||
|
@@ -207,7 +233,7 @@ gdm_layout_activate (const char *layout)
|
||||||
|
config->options = g_strdupv (initial_config->options);
|
||||||
|
} else {
|
||||||
|
config->layouts = g_new0 (char *, 2);
|
||||||
|
- config->layouts[0] = g_strdup (layout);
|
||||||
|
+ config->layouts[0] = canonicalize_layout_name (layout);
|
||||||
|
|
||||||
|
p = strchr (config->layouts[0], '\t');
|
||||||
|
if (p != NULL) {
|
@ -991,114 +991,3 @@ index 0000000..9bc21ec
|
|||||||
+G_END_DECLS
|
+G_END_DECLS
|
||||||
+
|
+
|
||||||
+#endif /* __GDM_SYSCONFIG_H */
|
+#endif /* __GDM_SYSCONFIG_H */
|
||||||
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
|
|
||||||
index 75a1cec..886e7e8 100644
|
|
||||||
--- a/daemon/gdm-session-direct.c
|
|
||||||
+++ b/daemon/gdm-session-direct.c
|
|
||||||
@@ -45,6 +45,8 @@
|
|
||||||
#include <dbus/dbus-glib.h>
|
|
||||||
#include <dbus/dbus-glib-lowlevel.h>
|
|
||||||
|
|
||||||
+#include "gdm-sysconfig.h"
|
|
||||||
+
|
|
||||||
#include "gdm-session-direct.h"
|
|
||||||
#include "gdm-session.h"
|
|
||||||
#include "gdm-session-private.h"
|
|
||||||
@@ -600,8 +602,16 @@ get_default_language_name (GdmSessionDirect *session)
|
|
||||||
static const char *
|
|
||||||
get_default_layout_name (GdmSessionDirect *session)
|
|
||||||
{
|
|
||||||
- if (session->priv->saved_layout != NULL) {
|
|
||||||
- return session->priv->saved_layout;
|
|
||||||
+ if (!session->priv->saved_layout)
|
|
||||||
+ session->priv->saved_layout = gdm_sysconfig_load_value ("/etc/sysconfig/keyboard", "KEYTABLE");
|
|
||||||
+
|
|
||||||
+ if (session->priv->saved_layout) {
|
|
||||||
+ if (g_str_has_suffix (session->priv->saved_layout, ".gz"))
|
|
||||||
+ *(session->priv->saved_layout + strlen (session->priv->saved_layout) - strlen (".gz")) = '\0';
|
|
||||||
+ if (g_str_has_suffix (session->priv->saved_layout, ".map"))
|
|
||||||
+ *(session->priv->saved_layout + strlen (session->priv->saved_layout) - strlen (".map")) = '\0';
|
|
||||||
+
|
|
||||||
+ return session->priv->saved_layout;
|
|
||||||
}
|
|
||||||
|
|
||||||
return "us";
|
|
||||||
diff --git a/gui/simple-greeter/gdm-layouts.c b/gui/simple-greeter/gdm-layouts.c
|
|
||||||
index 479d5ea..fba3147 100644
|
|
||||||
--- a/gui/simple-greeter/gdm-layouts.c
|
|
||||||
+++ b/gui/simple-greeter/gdm-layouts.c
|
|
||||||
@@ -70,14 +70,35 @@ xci_desc_to_utf8 (XklConfigItem * ci)
|
|
||||||
g_locale_to_utf8 (sd, -1, NULL, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
+static gchar *
|
|
||||||
+canonicalize_layout_name (const gchar *name)
|
|
||||||
+{
|
|
||||||
+ gchar *canon_name;
|
|
||||||
+
|
|
||||||
+ if (!name)
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
+ canon_name = g_strdup (name);
|
|
||||||
+
|
|
||||||
+ if (g_str_has_suffix (canon_name, ".gz"))
|
|
||||||
+ *(canon_name + strlen (canon_name) - strlen (".gz")) = '\0';
|
|
||||||
+ if (g_str_has_suffix (canon_name, ".map"))
|
|
||||||
+ *(canon_name + strlen (canon_name) - strlen (".map")) = '\0';
|
|
||||||
+
|
|
||||||
+ return canon_name;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
add_variant (XklConfigRegistry *config,
|
|
||||||
const XklConfigItem *item,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
LayoutData *ldata = data;
|
|
||||||
+ gchar *name;
|
|
||||||
|
|
||||||
- ldata->list = g_slist_prepend (ldata->list, g_strdup_printf ("%s\t%s", ldata->layout, item->name));
|
|
||||||
+ name = canonicalize_layout_name (item->name);
|
|
||||||
+ ldata->list = g_slist_prepend (ldata->list, g_strdup_printf ("%s\t%s", ldata->layout, name));
|
|
||||||
+ g_free (name);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -86,11 +107,16 @@ add_layout (XklConfigRegistry *config,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
LayoutData *ldata = data;
|
|
||||||
+ gchar *name;
|
|
||||||
|
|
||||||
- ldata->layout = item->name;
|
|
||||||
- ldata->list = g_slist_prepend (ldata->list, g_strdup (item->name));
|
|
||||||
- xkl_config_registry_foreach_layout_variant (config, item->name, add_variant, data);
|
|
||||||
+ name = canonicalize_layout_name (item->name);
|
|
||||||
+
|
|
||||||
+ ldata->layout = name;
|
|
||||||
+ ldata->list = g_slist_prepend (ldata->list, g_strdup (name));
|
|
||||||
+ xkl_config_registry_foreach_layout_variant (config, name, add_variant, data);
|
|
||||||
ldata->layout = NULL;
|
|
||||||
+
|
|
||||||
+ g_free (name);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -108,7 +134,7 @@ gdm_get_layout_from_name (const char *name)
|
|
||||||
|
|
||||||
init_xkl ();
|
|
||||||
|
|
||||||
- id1 = g_strdup (name);
|
|
||||||
+ id1 = canonicalize_layout_name (name);
|
|
||||||
p = strchr (id1, '\t');
|
|
||||||
|
|
||||||
if (p != NULL) {
|
|
||||||
@@ -207,7 +233,7 @@ gdm_layout_activate (const char *layout)
|
|
||||||
config->options = g_strdupv (initial_config->options);
|
|
||||||
} else {
|
|
||||||
config->layouts = g_new0 (char *, 2);
|
|
||||||
- config->layouts[0] = g_strdup (layout);
|
|
||||||
+ config->layouts[0] = canonicalize_layout_name (layout);
|
|
||||||
|
|
||||||
p = strchr (config->layouts[0], '\t');
|
|
||||||
if (p != NULL) {
|
|
||||||
|
26
gdm.changes
26
gdm.changes
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 15 11:04:57 CEST 2009 - vuntz@novell.com
|
||||||
|
|
||||||
|
- Add gdm-keyboard-from-hal.patch to read the default keyboard
|
||||||
|
layout from hal on 11.2, should fix bnc#478083 and bnc#492284.
|
||||||
|
- Split the keyboard part of gdm-sysconfig-settings.patch in
|
||||||
|
gdm-keyboard-from-sysconfig.patch, and only applit on 11.1 and
|
||||||
|
earlier. Also update the patch to strip some console keymaps part
|
||||||
|
of the layout that won't work in X (eg, fr-latin1 -> fr).
|
||||||
|
- Based on work from claes.backstrom@fsfe.org and hpj@novell.com.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 12 14:46:04 CEST 2009 - vuntz@novell.com
|
||||||
|
|
||||||
|
- Drop gdm-X_SERVER.patch: it's not needed anymore since
|
||||||
|
/usr/bin/Xorg is the only supported X now.
|
||||||
|
- Add gdm-helper-directory.patch to replace
|
||||||
|
gdm-2.23.92-gsd-path.patch and
|
||||||
|
gdm-consolekit-helper-subdir.patch: this new patch should be
|
||||||
|
suitable for upstream inclusion. Pass
|
||||||
|
--with-gnome-settings-daemon-directory and
|
||||||
|
--with-consolekit-directory to configure.
|
||||||
|
- Tag gdm-2.21.9-no-fatal-warnings.patch,
|
||||||
|
gdm-vt-allocation-hack.patch, gdm-domain-logon.patch,
|
||||||
|
gdm-selinux.patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 20 13:41:41 CEST 2009 - vuntz@novell.com
|
Mon Apr 20 13:41:41 CEST 2009 - vuntz@novell.com
|
||||||
|
|
||||||
|
45
gdm.spec
45
gdm.spec
@ -42,7 +42,7 @@ BuildRequires: zenity
|
|||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
Version: 2.26.1
|
Version: 2.26.1
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: The GNOME 2.x Display Manager
|
Summary: The GNOME 2.x Display Manager
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Source1: gdm.pamd
|
Source1: gdm.pamd
|
||||||
@ -50,14 +50,17 @@ Source2: gdm-autologin.pamd
|
|||||||
# FIXME: See FIXME in the script.
|
# FIXME: See FIXME in the script.
|
||||||
Source3: SuSEconfig.gdm
|
Source3: SuSEconfig.gdm
|
||||||
Source5: sysconfig.displaymanager-gdm
|
Source5: sysconfig.displaymanager-gdm
|
||||||
Patch1: gdm-consolekit-helper-subdir.patch
|
# PATCH-FIX-UPSTREAM gdm-helper-directory.patch bgo582320 vuntz@novell.com -- Add --with-gnome-settings-daemon-directory and --with-consolekit-directory
|
||||||
|
Patch1: gdm-helper-directory.patch
|
||||||
|
# PATCH-FIX-OPENSUSE gdm-2.21.9-no-fatal-warnings.patch -- Do not accept fatal warnings in development version: gdm is too critical
|
||||||
Patch2: gdm-2.21.9-no-fatal-warnings.patch
|
Patch2: gdm-2.21.9-no-fatal-warnings.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gdm-vt-allocation-hack.patch bgo511168 hpj@novell.com -- Needed for user switching
|
||||||
Patch4: gdm-vt-allocation-hack.patch
|
Patch4: gdm-vt-allocation-hack.patch
|
||||||
Patch5: gdm-2.23.92-gsd-path.patch
|
|
||||||
# PATCH-FIX-OPENSUSE gdm-desktop-session-env-pam.patch bnc427744 vuntz@novell.com -- Sets a PAM environment variable to let the pam gnome-keyring module know which session is started
|
# PATCH-FIX-OPENSUSE gdm-desktop-session-env-pam.patch bnc427744 vuntz@novell.com -- Sets a PAM environment variable to let the pam gnome-keyring module know which session is started
|
||||||
Patch6: gdm-desktop-session-env-pam.patch
|
Patch6: gdm-desktop-session-env-pam.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts
|
# PATCH-FIX-OPENSUSE gdm-suse-xsession.patch vuntz@novell.com -- Use the /etc/X11/xdm/* scripts
|
||||||
Patch7: gdm-suse-xsession.patch
|
Patch7: gdm-suse-xsession.patch
|
||||||
|
# PATCH-FEATURE-SLED gdm-domain-logon.patch hpj@novell.com -- Add UI to log in a specific domain
|
||||||
Patch8: gdm-domain-logon.patch
|
Patch8: gdm-domain-logon.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager
|
# PATCH-FIX-OPENSUSE gdm-sysconfig-settings.patch bnc432360 hpj@novell.com -- Read autologin options from /etc/sysconfig/displaymanager
|
||||||
Patch13: gdm-sysconfig-settings.patch
|
Patch13: gdm-sysconfig-settings.patch
|
||||||
@ -77,12 +80,15 @@ Patch23: gdm-accreditation-failed-log.patch
|
|||||||
Patch24: gdm-session-worker-check-states.patch
|
Patch24: gdm-session-worker-check-states.patch
|
||||||
# PATCH-FIX-UPSTREAM gdm-fix-locale-listing.patch bnc446446 vuntz@novell.com -- Fix locale listing so that all locales are listed in the language chooser
|
# PATCH-FIX-UPSTREAM gdm-fix-locale-listing.patch bnc446446 vuntz@novell.com -- Fix locale listing so that all locales are listed in the language chooser
|
||||||
Patch26: gdm-fix-locale-listing.patch
|
Patch26: gdm-fix-locale-listing.patch
|
||||||
Patch28: gdm-X_SERVER.patch
|
|
||||||
# PATCH-FIX-UPSTREAM gdm-dbus-allow-introspection.patch bnc473880 bgo572214 vuntz@novell.com -- Patch by thoenig to allow introspection of the dbus service
|
# PATCH-FIX-UPSTREAM gdm-dbus-allow-introspection.patch bnc473880 bgo572214 vuntz@novell.com -- Patch by thoenig to allow introspection of the dbus service
|
||||||
Patch30: gdm-dbus-allow-introspection.patch
|
Patch30: gdm-dbus-allow-introspection.patch
|
||||||
# PATCH-FIX-OPENSUSE gdm-gconf-path.patch vuntz@novell.com -- Fix gconf paths to be consistent with the ones used in openSUSE
|
# PATCH-FIX-OPENSUSE gdm-gconf-path.patch vuntz@novell.com -- Fix gconf paths to be consistent with the ones used in openSUSE
|
||||||
Patch31: gdm-gconf-path.patch
|
Patch31: gdm-gconf-path.patch
|
||||||
# PATCH-SUSE: enable SELinux
|
# PATCH-FIX-OPENSUSE gdm-keyboard-from-hal.patch bnc492284 bnc478083 vuntz@novell.com -- Read the keyboard layout from hal
|
||||||
|
Patch32: gdm-keyboard-from-hal.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gdm-keyboard-from-sysconfig.patch bnc432360 bnc478083 hpj@novell.com -- Read keyboard options from sysconfig (for openSUSE <= 11.1, since keyboard layout wasn't in hal)
|
||||||
|
Patch33: gdm-keyboard-from-sysconfig.patch
|
||||||
|
# PATCH-FIX-OPENSUSE gdm-selinux.patch -- Small changes to make it compile fine with SELinux
|
||||||
Patch60: gdm-selinux.patch
|
Patch60: gdm-selinux.patch
|
||||||
Url: http://www.gnome.org/
|
Url: http://www.gnome.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -151,7 +157,6 @@ gnome-patch-translation-prepare
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
@ -164,9 +169,13 @@ gnome-patch-translation-prepare
|
|||||||
%patch23 -p1
|
%patch23 -p1
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
%patch26 -p1
|
%patch26 -p1
|
||||||
%patch28
|
|
||||||
%patch30 -p1
|
%patch30 -p1
|
||||||
%patch31 -p1
|
%patch31 -p1
|
||||||
|
%if %suse_version > 1110
|
||||||
|
%patch32 -p1
|
||||||
|
%else
|
||||||
|
%patch33 -p1
|
||||||
|
%endif
|
||||||
%patch60
|
%patch60
|
||||||
gnome-patch-translation-update
|
gnome-patch-translation-update
|
||||||
|
|
||||||
@ -177,6 +186,8 @@ autoreconf -f -i
|
|||||||
--libexecdir=%{_prefix}/lib/gdm \
|
--libexecdir=%{_prefix}/lib/gdm \
|
||||||
--localstatedir=%{_localstatedir} \
|
--localstatedir=%{_localstatedir} \
|
||||||
--with-at-spi-registryd-directory=%{_prefix}/lib/at-spi \
|
--with-at-spi-registryd-directory=%{_prefix}/lib/at-spi \
|
||||||
|
--with-gnome-settings-daemon-directory=%{_prefix}/lib/gnome-settings-daemon \
|
||||||
|
--with-consolekit-directory=%{_prefix}/lib/ConsoleKit \
|
||||||
--with-selinux \
|
--with-selinux \
|
||||||
--enable-ipv6\
|
--enable-ipv6\
|
||||||
--disable-scrollkeeper
|
--disable-scrollkeeper
|
||||||
@ -273,6 +284,26 @@ fi
|
|||||||
%files lang -f %{name}.lang
|
%files lang -f %{name}.lang
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 15 2009 vuntz@novell.com
|
||||||
|
- Add gdm-keyboard-from-hal.patch to read the default keyboard
|
||||||
|
layout from hal on 11.2, should fix bnc#478083 and bnc#492284.
|
||||||
|
- Split the keyboard part of gdm-sysconfig-settings.patch in
|
||||||
|
gdm-keyboard-from-sysconfig.patch, and only applit on 11.1 and
|
||||||
|
earlier. Also update the patch to strip some console keymaps part
|
||||||
|
of the layout that won't work in X (eg, fr-latin1 -> fr).
|
||||||
|
- Based on work from claes.backstrom@fsfe.org and hpj@novell.com.
|
||||||
|
* Tue May 12 2009 vuntz@novell.com
|
||||||
|
- Drop gdm-X_SERVER.patch: it's not needed anymore since
|
||||||
|
/usr/bin/Xorg is the only supported X now.
|
||||||
|
- Add gdm-helper-directory.patch to replace
|
||||||
|
gdm-2.23.92-gsd-path.patch and
|
||||||
|
gdm-consolekit-helper-subdir.patch: this new patch should be
|
||||||
|
suitable for upstream inclusion. Pass
|
||||||
|
--with-gnome-settings-daemon-directory and
|
||||||
|
--with-consolekit-directory to configure.
|
||||||
|
- Tag gdm-2.21.9-no-fatal-warnings.patch,
|
||||||
|
gdm-vt-allocation-hack.patch, gdm-domain-logon.patch,
|
||||||
|
gdm-selinux.patch.
|
||||||
* Mon Apr 20 2009 vuntz@novell.com
|
* Mon Apr 20 2009 vuntz@novell.com
|
||||||
- Update to version 2.26.1:
|
- Update to version 2.26.1:
|
||||||
+ Use O_APPEND when opening log files
|
+ Use O_APPEND when opening log files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user