diff --git a/libgnome-desktop/gnome-xkb-info.c b/libgnome-desktop/gnome-xkb-info.c index 0e6c69e..2e2c2c6 100644 --- a/libgnome-desktop/gnome-xkb-info.c +++ b/libgnome-desktop/gnome-xkb-info.c @@ -128,12 +128,22 @@ free_option_group (gpointer data) } static gchar * +get_xkb_config_root () +{ + if (getenv("XKB_CONFIG_ROOT") != NULL) + { + return getenv("XKB_CONFIG_ROOT"); + } + return XKB_BASE; +} + +static gchar * get_xml_rules_file_path (const gchar *suffix) { gchar *rules_file; gchar *xml_rules_file; - rules_file = g_build_filename (XKB_BASE, "rules", XKB_RULES_FILE, NULL); + rules_file = g_build_filename (get_xkb_config_root(), "rules", XKB_RULES_FILE, NULL); xml_rules_file = g_strdup_printf ("%s%s", rules_file, suffix); g_free (rules_file);