Package: lightdm Version: 1.4.0-1 Severity: normal Tags: patch Hello,
I have digging into the lightdm code for some time to address several issues regarding storing and restoring the information about the default session and language. While I did that, I already discovered that lightdm does not consistently store the session and language to ${HOME}/.dmrc [1] and also filed a wishlist bug report to be able to choose between the mechanisms of ${HOME}/.dmrc and AccountsService [2]. Today I stumbled over another incosistency regarding the handling of the default session and language similar to #690899 ([1]) which is the fact that lightdm always restores the default session from AccountsService when available but never restores the default language from AccountsService while it does restore both default session and language from .dmrc when used. I'm not sure whether this is intentional or not, but it's surely incosistent. If lightdm decides to restore the default session through AccountsService it should also do so for the default language. I have written a patch which addresses this and also reported the bug upstream [3]. Cheers, Adrian > [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690899 > [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690898 > [3] https://bugs.launchpad.net/lightdm/+bug/1071417 -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing'), (100, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.5-trunk-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages lightdm depends on: ii adduser 3.113+nmu3 ii consolekit 0.4.5-3.1 ii dbus 1.6.8-1 ii debconf [debconf-2.0] 1.5.46 ii libc6 2.13-35 ii libglib2.0-0 2.33.12+really2.32.4-2 ii libpam0g 1.1.3-7.1 ii libxcb1 1.8.1-1 ii libxdmcp6 1:1.1.1-1 ii lightdm-gtk-greeter [lightdm-greeter] 1.1.6-2 Versions of packages lightdm recommends: ii xserver-xorg 1:7.7+1 Versions of packages lightdm suggests: ii accountsservice 0.6.21-6 ii upower 0.9.17-1 -- debconf information excluded
=== modified file 'src/accounts.c' --- src/accounts.c 2012-01-13 13:05:33 +0000 +++ src/accounts.c 2012-10-25 17:49:14 +0000 @@ -335,11 +335,21 @@ const gchar * user_get_locale (User *user) { + GVariant *result; + g_return_val_if_fail (user != NULL, NULL); g_free (user->priv->locale); if (user->priv->proxy) - user->priv->locale = NULL; + { + if (get_property (user->priv->proxy, "Language", "s", &result)) + { + g_variant_get (result, "s", &user->priv->locale); + g_variant_unref (result); + } + else + user->priv->locale = NULL; + } else user->priv->locale = get_string_from_dmrc (user->priv->name, "Desktop", "Language");