Overview of changes in lightdm 1.1.3
+ * Actually return the system default keyboard layout, not just 'us'
+ * Add keyboard layout variants to list of keyboard layouts
+ * Check accountsservice as well as .dmrc for users' layouts
* Add Lock D-Bus method that locks the seat and provides a hint to the
greeter to be in lock mode.
-/*
+/* -*- Mode: C; indent-tabs-mode:nil; tab-width:4 -*-
+ *
* Copyright (C) 2010 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
*
static XklEngine *xkl_engine = NULL;
static XklConfigRec *xkl_config = NULL;
static GList *layouts = NULL;
+static LightDMLayout *default_layout = NULL;
+
+static gchar *
+make_layout_string (const gchar *layout, const gchar *variant)
+{
+ if (!layout || layout[0] == 0)
+ return NULL;
+ else if (!variant || variant[0] == 0)
+ return g_strdup (layout);
+ else
+ return g_strdup_printf ("%s\t%s", layout, variant);
+}
+
+static void
+parse_layout_string (const gchar *name, gchar **layout, gchar **variant)
+{
+ gchar **split;
+
+ *layout = NULL;
+ *variant = NULL;
+
+ if (!name)
+ return;
+
+ split = g_strsplit (name, "\t", 2);
+ if (split[0])
+ {
+ *layout = g_strdup (split[0]);
+ if (split[1])
+ *variant = g_strdup (split[1]);
+ }
+ g_strfreev (split);
+}
+
+static void
+variant_cb (XklConfigRegistry *config,
+ const XklConfigItem *item,
+ gpointer data)
+{
+ LightDMLayout *layout;
+ gchar *full_name;
+
+ full_name = make_layout_string (data, item->name);
+
+ layout = g_object_new (LIGHTDM_TYPE_LAYOUT, "name", full_name, "short-description", item->short_description, "description", item->description, NULL);
+ layouts = g_list_append (layouts, layout);
+
+ g_free (full_name);
+}
static void
layout_cb (XklConfigRegistry *config,
layout = g_object_new (LIGHTDM_TYPE_LAYOUT, "name", item->name, "short-description", item->short_description, "description", item->description, NULL);
layouts = g_list_append (layouts, layout);
+
+ xkl_config_registry_foreach_layout_variant (config, item->name, variant_cb, (gpointer) item->name);
}
/**
* Set the layout for this session.
**/
void
-lightdm_set_layout (LightDMLayout *layout)
+lightdm_set_layout (LightDMLayout *dmlayout)
{
XklConfigRec *config;
+ gchar *layout, *variant;
- g_return_if_fail (layout != NULL);
+ g_return_if_fail (dmlayout != NULL);
- g_debug ("Setting keyboard layout to %s", lightdm_layout_get_name (layout));
+ g_debug ("Setting keyboard layout to '%s'", lightdm_layout_get_name (dmlayout));
+
+ parse_layout_string (lightdm_layout_get_name (dmlayout), &layout, &variant);
config = xkl_config_rec_new ();
config->layouts = g_malloc (sizeof (gchar *) * 2);
+ config->variants = g_malloc (sizeof (gchar *) * 2);
config->model = g_strdup (xkl_config->model);
- config->layouts[0] = g_strdup (lightdm_layout_get_name (layout));
+ config->layouts[0] = layout;
config->layouts[1] = NULL;
+ config->variants[0] = variant;
+ config->variants[1] = NULL;
if (!xkl_config_rec_activate (config, xkl_engine))
g_warning ("Failed to activate XKL config");
g_object_unref (config);
lightdm_get_layout (void)
{
lightdm_get_layouts ();
- if (layouts)
- return (LightDMLayout *) g_list_first (layouts)->data;
- else
- return NULL;
+
+ if (layouts && xkl_config && !default_layout)
+ {
+ gchar *full_name;
+ GList *item;
+
+ full_name = make_layout_string (xkl_config->layouts ? xkl_config->layouts[0] : NULL,
+ xkl_config->variants ? xkl_config->variants[0] : NULL);
+
+ for (item = layouts; item; item = item->next)
+ {
+ LightDMLayout *iter_layout = (LightDMLayout *) item->data;
+ if (g_strcmp0 (lightdm_layout_get_name (iter_layout), full_name) == 0)
+ {
+ default_layout = iter_layout;
+ break;
+ }
+ }
+
+ g_free (full_name);
+ }
+
+ return default_layout;
}
/**
-/*
+/* -*- Mode: C; indent-tabs-mode:nil; tab-width:4 -*-
+ *
* Copyright (C) 2010 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
*
LightDMUserListPrivate *list_priv = GET_LIST_PRIVATE (priv->user_list);
UserAccountObject *account = NULL;
GList *iter;
+ gchar *value;
/* First, find AccountObject proxy */
for (iter = list_priv->user_account_objects; iter; iter = iter->next)
g_free (priv->session);
priv->session = get_string_property (account->proxy, "XSession");
+ value = get_string_property (account->proxy, "XKeyboardLayout");
+ if (value)
+ {
+ g_free (priv->layout);
+ priv->layout = value;
+ }
+
return TRUE;
}
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
"Language: sr\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2012-01-30 04:59+0000\n"
-"X-Generator: Launchpad (build 14727)\n"
+"X-Launchpad-Export-Date: 2012-02-07 05:00+0000\n"
+"X-Generator: Launchpad (build 14747)\n"
#: ../greeters/gtk/lightdm-gtk-greeter.c:409
msgid "Are you sure you want to close all programs and restart the computer?"
test-autologin-guest-logout \
test-keyboard-layout \
test-no-keyboard-layout \
+ test-default-keyboard-layout \
+ test-keyboard-variants \
test-language \
test-no-language \
test-language-no-accounts-service \
--- /dev/null
+#
+# Check returns correct layout for a user
+#
+
+[LightDM]
+minimum-display-number=50
+
+[test-xserver-config]
+keyboard-layout=ara
+keyboard-variant=azerty
+
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER :50 START
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 CONNECT-XSERVER
+#?GREETER :50 CONNECT-TO-DAEMON
+#?GREETER :50 CONNECTED-TO-DAEMON
+
+# Correct layout is found
+#?*GREETER :50 LOG-LAYOUT USERNAME=%DEFAULT%
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 LOG-LAYOUT USERNAME=%DEFAULT% LAYOUT='ara azerty'
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
# Correct layout is found
#?*GREETER :50 LOG-LAYOUT USERNAME=bob
-#?GREETER :50 LOG-LAYOUT USERNAME=bob LAYOUT=us
+#?GREETER :50 LOG-LAYOUT USERNAME=bob LAYOUT='us'
+#?*GREETER :50 LOG-LAYOUT USERNAME=carol
+#?GREETER :50 LOG-LAYOUT USERNAME=carol LAYOUT='fr oss'
# Cleanup
#?*STOP-DAEMON
--- /dev/null
+#
+# Check returns variants as well as normal layouts
+#
+
+[LightDM]
+minimum-display-number=50
+
+#?RUNNER DAEMON-START
+
+# X server starts
+#?XSERVER :50 START
+#?XSERVER :50 INDICATE-READY
+
+# LightDM connects to X server
+#?XSERVER :50 ACCEPT-CONNECT
+
+# Greeter starts
+#?GREETER :50 START
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 CONNECT-XSERVER
+#?GREETER :50 CONNECT-TO-DAEMON
+#?GREETER :50 CONNECTED-TO-DAEMON
+
+# Correct layouts are found
+#?*GREETER :50 LOG-VARIANTS LAYOUT=fr
+#?XSERVER :50 ACCEPT-CONNECT
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr nodeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr sundeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr oss'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr oss_latin9'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr oss_nodeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr oss_sundeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr latin9'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr latin9_nodeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr latin9_sundeadkeys'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr bepo'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr bepo_latin9'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr dvorak'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr mac'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr bre'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr oci'
+#?GREETER :50 LOG-VARIANTS LAYOUT='fr geo'
+
+# Cleanup
+#?*STOP-DAEMON
+# Don't know what order they will terminate
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?(GREETER :50 TERMINATE SIGNAL=15|XSERVER :50 TERMINATE SIGNAL=15)
+#?RUNNER DAEMON-EXIT STATUS=0
# Correct layout is found
#?*GREETER :50 LOG-LAYOUT USERNAME=alice
-#?GREETER :50 LOG-LAYOUT USERNAME=alice LAYOUT=
+#?GREETER :50 LOG-LAYOUT USERNAME=alice LAYOUT=''
# Cleanup
#?*STOP-DAEMON
libsystem_la_SOURCES = libsystem.c
libsystem_la_CFLAGS = $(GLIB_CFLAGS)
-libsystem_la_LIBADD = -ldl
+libsystem_la_LIBADD = -ldl $(GLIB_LIBS)
# This is required to have autotools generate a library that is not installed
# but produces a shared library (instead of just a static library)
x_server_set_listen_unix (xserver, listen_unix);
x_server_set_listen_tcp (xserver, listen_tcp);
+ /* Add fake screen so that libx11 calls don't freak out when they can't find a screen */
+ x_server_add_screen (xserver, 0xffffff, 0x000000, 0, 1024, 768, 1000, 1000);
+
status_notify ("XSERVER :%d START", display_number);
config = g_key_file_new ();
+/* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*- */
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
const gchar *username, *layout;
username = request + strlen (r);
- user = lightdm_user_list_get_user_by_name (lightdm_user_list_get_instance (), username);
- layout = lightdm_user_get_layout (user);
- status_notify ("GREETER %s LOG-LAYOUT USERNAME=%s LAYOUT=%s", getenv ("DISPLAY"), username, layout ? layout : "");
+ if (g_strcmp0 (username, "%DEFAULT%") == 0) /* Grab system default layout */
+ layout = lightdm_layout_get_name (lightdm_get_layout ());
+ else
+ {
+ user = lightdm_user_list_get_user_by_name (lightdm_user_list_get_instance (), username);
+ layout = lightdm_user_get_layout (user);
+ }
+
+ status_notify ("GREETER %s LOG-LAYOUT USERNAME=%s LAYOUT='%s'", getenv ("DISPLAY"), username, layout ? layout : "");
+ }
+ g_free (r);
+
+ r = g_strdup_printf ("GREETER %s LOG-VARIANTS LAYOUT=", getenv ("DISPLAY"));
+ if (g_str_has_prefix (request, r))
+ {
+ GList *layouts, *iter;
+ gchar *layout_prefix;
+
+ layout_prefix = request + strlen (r);
+ layouts = lightdm_get_layouts ();
+
+ for (iter = layouts; iter; iter = iter->next)
+ {
+ LightDMLayout *layout;
+ const gchar *name;
+
+ layout = (LightDMLayout *) iter->data;
+ name = lightdm_layout_get_name (layout);
+
+ if (g_str_has_prefix (name, layout_prefix))
+ status_notify ("GREETER %s LOG-VARIANTS LAYOUT='%s'", getenv ("DISPLAY"), name);
+ }
}
g_free (r);
#include <ctype.h>
#include <errno.h>
#include <glib.h>
+#include <glib/gstdio.h>
#include <glib-unix.h>
#include <gio/gio.h>
#include <gio/gunixsocketaddress.h>
guint id;
gchar *language;
gchar *xsession;
+ gchar *layout;
} AccountsUser;
static GList *accounts_users = NULL;
static void handle_user_call (GDBusConnection *connection,
*c = '\0';
}
user->xsession = g_key_file_get_string (dmrc_file, "Desktop", "Session", NULL);
+ user->layout = g_key_file_get_string (dmrc_file, "X-Accounts", "Layout", NULL);
user->path = g_strdup_printf ("/org/freedesktop/Accounts/User%d", uid);
user->id = g_dbus_connection_register_object (accounts_connection,
user->path,
return g_variant_new_string (user->language ? user->language : "");
else if (strcmp (property_name, "XSession") == 0)
return g_variant_new_string (user->xsession ? user->xsession : "");
+ else if (strcmp (property_name, "XKeyboardLayout") == 0)
+ return g_variant_new_string (user->layout ? user->layout : "");
return NULL;
}
" <property name='BackgroundFile' type='s' access='read'/>"
" <property name='Language' type='s' access='read'/>"
" <property name='XSession' type='s' access='read'/>"
+ " <property name='XKeyboardLayout' type='s' access='read'/>"
" </interface>"
"</node>";
GError *error = NULL;
g_source_attach (status_source, NULL);
/* Run from a temporary directory */
- temp_dir = g_build_filename (cwd, "lightdm-test-XXXXXX", NULL);
+ temp_dir = g_build_filename (g_get_tmp_dir (), "lightdm-test-XXXXXX", NULL);
if (!mkdtemp (temp_dir))
{
g_warning ("Error creating temporary directory: %s", strerror (errno));
quit (EXIT_FAILURE);
}
+ g_chmod (temp_dir, 0755);
/* Set up a skeleton file system */
g_mkdir_with_parents (g_strdup_printf ("%s/etc", temp_dir), 0755);
gboolean have_home_dir;
gchar *real_name;
gchar *xsession;
- gchar *layout;
+ gchar *dmrc_layout;
+ gchar *dbus_layout;
gchar *language;
gint uid;
} users[] =
{
- {"root", "", TRUE, "root", NULL, NULL, NULL, 0},
- {"lightdm", "", TRUE, "", NULL, NULL, NULL, 100},
- {"alice", "password", TRUE, "Alice User", NULL, NULL, NULL, 1000},
- {"bob", "", TRUE, "Bob User", NULL, "us", "en_AU.utf8", 1001},
- {"carol", "", TRUE, "Carol User", "alternative", "fr", "fr_FR.UTF-8", 1002},
- {"dave", "", FALSE, "Dave User", NULL, NULL, NULL, 1003},
- {NULL, NULL, FALSE, NULL, NULL, NULL, NULL, 0}
+ {"root", "", TRUE, "root", NULL, NULL, NULL, NULL, 0},
+ {"lightdm", "", TRUE, "", NULL, NULL, NULL, NULL, 100},
+ {"alice", "password", TRUE, "Alice User", NULL, NULL, NULL, NULL, 1000},
+ {"bob", "", TRUE, "Bob User", NULL, "us", NULL, "en_AU.utf8", 1001},
+ {"carol", "", TRUE, "Carol User", "alternative", "ru", "fr\toss", "fr_FR.UTF-8", 1002},
+ {"dave", "", FALSE, "Dave User", NULL, NULL, NULL, NULL, 1003},
+ {NULL, NULL, FALSE, NULL, NULL, NULL, NULL, NULL, 0}
};
passwd_data = g_string_new ("");
int i;
{
path = g_build_filename (home_dir, users[i].user_name, NULL);
g_mkdir_with_parents (path, 0755);
+ if (chown (path, users[i].uid, users[i].uid) < 0)
+ g_debug ("chown (%s) failed: %s", path, strerror (errno));
g_free (path);
}
g_key_file_set_string (dmrc_file, "Desktop", "Session", users[i].xsession);
save_dmrc = TRUE;
}
- if (users[i].layout)
+ if (users[i].dmrc_layout)
{
- g_key_file_set_string (dmrc_file, "Desktop", "Layout", users[i].layout);
+ g_key_file_set_string (dmrc_file, "Desktop", "Layout", users[i].dmrc_layout);
+ save_dmrc = TRUE;
+ }
+ if (users[i].dbus_layout)
+ {
+ g_key_file_set_string (dmrc_file, "X-Accounts", "Layout", users[i].dbus_layout);
save_dmrc = TRUE;
}
if (users[i].language)
+/* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*- */
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <glib.h>
#include <gio/gio.h>
#include <gio/gunixsocketaddress.h>
enum
{
+ Error = 0,
Reply = 1,
};
+enum
+{
+ InternAtom = 16,
+ GetProperty = 20,
+ QueryExtension = 98,
+ kbUseExtension = 200
+};
+
+enum
+{
+ BadAtom = 5,
+ BadImplementation = 17
+};
+
enum {
X_SERVER_CLIENT_CONNECTED,
X_SERVER_CLIENT_DISCONNECTED,
guint8 byte_order;
gboolean connected;
guint16 sequence_number;
+ GHashTable *atoms;
};
struct XScreenPrivate
send (g_io_channel_unix_get_fd (client->priv->channel), buffer, n_written, 0);
}
+void
+x_client_send_error (XClient *client, int type, int major, int minor)
+{
+ guint8 buffer[MAXIMUM_REQUEST_LENGTH];
+ gsize n_written = 0;
+
+ write_card8 (buffer, MAXIMUM_REQUEST_LENGTH, Error, &n_written);
+ write_card8 (buffer, MAXIMUM_REQUEST_LENGTH, type, &n_written);
+ write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, client->priv->sequence_number, &n_written);
+ write_card32 (buffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* resourceID */
+ write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, minor, &n_written);
+ write_card8 (buffer, MAXIMUM_REQUEST_LENGTH, major, &n_written);
+ write_padding (buffer, MAXIMUM_REQUEST_LENGTH, 21, &n_written);
+
+ send (g_io_channel_unix_get_fd (client->priv->channel), buffer, n_written, 0);
+}
+
void
x_client_disconnect (XClient *client)
{
{
client->priv = G_TYPE_INSTANCE_GET_PRIVATE (client, x_client_get_type (), XClientPrivate);
client->priv->sequence_number = 1;
+ client->priv->atoms = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
}
static void
x_client_finalize (GObject *object)
{
+ XClient *client = (XClient *) object;
+
+ g_hash_table_unref (client->priv->atoms);
+ client->priv->atoms = NULL;
}
static void
g_free (message);
}
+static void
+process_intern_atom (XClient *client, const guint8 *buffer, gssize buffer_length)
+{
+ /* Decode */
+
+ gsize offset = 0;
+ guint8 onlyIfExists;
+ guint16 n;
+ gchar *name;
+ int atom;
+
+ read_padding (1, &offset); /* reqType */
+ onlyIfExists = read_card8 (buffer, buffer_length, &offset);
+ read_padding (2, &offset); /* length */
+ n = read_card16 (buffer, buffer_length, client->priv->byte_order, &offset);
+ read_padding (2, &offset);
+ name = read_padded_string (buffer, buffer_length, n, &offset);
+
+ /* Process */
+
+ atom = g_str_hash (name);
+
+ if (onlyIfExists)
+ {
+ g_free (name);
+ if (!g_hash_table_contains (client->priv->atoms, GINT_TO_POINTER (atom)))
+ {
+ x_client_send_error (client, BadAtom, InternAtom, 0);
+ return;
+ }
+ }
+ else
+ g_hash_table_insert (client->priv->atoms, GINT_TO_POINTER (atom), name);
+
+ /* Reply */
+
+ guint8 outBuffer[MAXIMUM_REQUEST_LENGTH];
+ gsize n_written = 0;
+
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, Reply, &n_written);
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 1, &n_written);
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, client->priv->sequence_number, &n_written);
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* length */
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, atom, &n_written);
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 20, &n_written);
+
+ send (g_io_channel_unix_get_fd (client->priv->channel), outBuffer, n_written, 0);
+}
+
+static void
+process_get_property (XClient *client, const guint8 *buffer, gssize buffer_length)
+{
+ /* Decode */
+
+ gsize offset = 0;
+ guint8 delete;
+ guint32 property;
+ guint32 type;
+
+ read_padding (1, &offset); /* reqType */
+ delete = read_card8 (buffer, buffer_length, &offset);
+ read_padding (2, &offset); /* length */
+ read_padding (4, &offset); /* window */
+ property = read_card32 (buffer, buffer_length, client->priv->byte_order, &offset);
+ type = read_card32 (buffer, buffer_length, client->priv->byte_order, &offset);
+ read_padding (4, &offset); /* longOffset */
+ read_padding (4, &offset); /* longLength */
+
+ /* Process */
+
+ gchar *name = g_hash_table_lookup (client->priv->atoms, GINT_TO_POINTER (property));
+ GString *reply = NULL;
+ guint8 format = 8;
+
+ if (g_strcmp0 (name, "_XKB_RULES_NAMES") == 0)
+ {
+ GKeyFile *config;
+
+ config = g_key_file_new ();
+ if (g_getenv ("LIGHTDM_TEST_CONFIG"))
+ g_key_file_load_from_file (config, g_getenv ("LIGHTDM_TEST_CONFIG"), G_KEY_FILE_NONE, NULL);
+
+ reply = g_string_new ("");
+
+ g_string_append (reply, "evdev"); /* rules file */
+ g_string_append_c (reply, 0); /* embedded null byte */
+
+ g_string_append (reply, "pc105"); /* model name */
+ g_string_append_c (reply, 0); /* embedded null byte */
+
+ if (g_key_file_has_key (config, "test-xserver-config", "keyboard-layout", NULL))
+ g_string_append (reply, g_key_file_get_string (config, "test-xserver-config", "keyboard-layout", NULL));
+ else
+ g_string_append (reply, "us");
+ g_string_append_c (reply, 0); /* embedded null byte */
+
+ if (g_key_file_has_key (config, "test-xserver-config", "keyboard-variant", NULL))
+ g_string_append (reply, g_key_file_get_string (config, "test-xserver-config", "keyboard-variant", NULL));
+ g_string_append_c (reply, 0); /* embedded null byte */
+
+ /* no xkb options */
+ g_string_append_c (reply, 0); /* embedded null byte */
+
+ g_key_file_free (config);
+ }
+
+ if (name && delete)
+ g_hash_table_remove (client->priv->atoms, GINT_TO_POINTER (property));
+
+ /* Reply */
+
+ if (!reply)
+ {
+ x_client_send_error (client, BadImplementation, GetProperty, 0);
+ return;
+ }
+
+ guint8 outBuffer[MAXIMUM_REQUEST_LENGTH];
+ gsize n_written = 0, length_offset, packet_start;
+
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, Reply, &n_written);
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, format, &n_written);
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, client->priv->sequence_number, &n_written);
+ length_offset = n_written;
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* length */
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, type, &n_written);
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* bytesAfter */
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, reply->len, &n_written);
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 12, &n_written);
+ packet_start = n_written;
+
+ write_string8 (outBuffer, MAXIMUM_REQUEST_LENGTH, (guint8 *) reply->str, reply->len, &n_written);
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, pad (reply->len), &n_written);
+
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, (n_written - packet_start) / 4, &length_offset);
+
+ send (g_io_channel_unix_get_fd (client->priv->channel), outBuffer, n_written, 0);
+
+ /* Cleanup */
+
+ g_string_free (reply, TRUE);
+}
+
+static void
+process_query_extension (XClient *client, const guint8 *buffer, gssize buffer_length)
+{
+ /* Decode */
+
+ gsize offset = 0;
+ guint8 n;
+ gchar *name;
+
+ read_padding (1, &offset); /* reqType */
+ read_padding (1, &offset); /* pad */
+ read_padding (2, &offset); /* length */
+ n = read_card16 (buffer, buffer_length, client->priv->byte_order, &offset);
+ read_padding (2, &offset); /* pad */
+ name = read_padded_string (buffer, buffer_length, n, &offset);
+
+ /* Process */
+
+ guint8 present = 0;
+ if (g_strcmp0 (name, "XKEYBOARD") == 0)
+ present = 1;
+
+ /* Reply */
+
+ guint8 outBuffer[MAXIMUM_REQUEST_LENGTH];
+ gsize n_written = 0;
+
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, Reply, &n_written);
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 1, &n_written);
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, client->priv->sequence_number, &n_written);
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* length */
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, present, &n_written);
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, kbUseExtension, &n_written); /* major_opcode */
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, 0, &n_written); /* first_event */
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, 0, &n_written); /* first_error */
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 20, &n_written);
+
+ send (g_io_channel_unix_get_fd (client->priv->channel), outBuffer, n_written, 0);
+
+ /* Cleanup */
+
+ g_free (name);
+}
+
+static void
+process_kb_use_extension (XClient *client, const guint8 *buffer, gssize buffer_length)
+{
+ /* Nothing to decode, we don't care about parameters */
+
+ /* Reply */
+
+ guint8 outBuffer[MAXIMUM_REQUEST_LENGTH];
+ gsize n_written = 0;
+
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, Reply, &n_written);
+ write_card8 (outBuffer, MAXIMUM_REQUEST_LENGTH, 1, &n_written); /* supported */
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, client->priv->sequence_number, &n_written);
+ write_card32 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* length */
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 1, &n_written); /* serverMajor */
+ write_card16 (outBuffer, MAXIMUM_REQUEST_LENGTH, client->priv->byte_order, 0, &n_written); /* serverMinor */
+ write_padding (outBuffer, MAXIMUM_REQUEST_LENGTH, 20, &n_written);
+
+ send (g_io_channel_unix_get_fd (client->priv->channel), outBuffer, n_written, 0);
+}
+
static void
decode_request (XClient *client, const guint8 *buffer, gssize buffer_length)
{
guint16 length;
start_offset = offset;
- client->priv->sequence_number++;
opcode = read_card8 (buffer, buffer_length, &offset);
read_card8 (buffer, buffer_length, &offset);
length = read_card16 (buffer, buffer_length, client->priv->byte_order, &offset) * 4;
g_debug ("Got opcode=%d length=%d", opcode, length);
offset = start_offset + length;
+
+ switch (opcode)
+ {
+ case InternAtom:
+ process_intern_atom (client, buffer + start_offset, length);
+ break;
+ case GetProperty:
+ process_get_property (client, buffer + start_offset, length);
+ break;
+ case QueryExtension:
+ process_query_extension (client, buffer + start_offset, length);
+ break;
+ case kbUseExtension:
+ process_kb_use_extension (client, buffer + start_offset, length);
+ break;
+ default:
+ /* Send an error because we don't understand the opcode yet */
+ x_client_send_error (client, BadImplementation, opcode, 0);
+ break;
+ }
+
+ client->priv->sequence_number++;
}
}
void x_client_send_success (XClient *client);
+void x_client_send_error (XClient *client, int type, int major, int minor);
+
void x_client_disconnect (XClient *client);
G_END_DECLS
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner default-keyboard-layout test-gobject-greeter
--- /dev/null
+#!/bin/sh
+./src/dbus-env ./src/test-runner keyboard-variants test-gobject-greeter