Package: lightdm Version: 1.4.0-1 Severity: normal Tags: patch Hello,
as lightdm allows to select the default language and session during login, it stores these settings both in the old-fashioned .dmrc file in the home directory as well in /var/lib/AccountsService/users/$USER. However, while testing lightdm as a replacement for gdm 2.20, I figured out that lightdm writes the default language and session selection inconsistently to the aforementioned places. While both language and session are always stored in /var/lib/AccountsService/users/$USER through AccountsService, the language selection is never stored in the .dmrc file, the settings between these two locations are therefore inconsistent. I'm attaching a small patch which fixes this behaviour and which also adds an additional check for a valid pointer in user_set_xsession as it is done in user_set_language. I would also like to point out, that it would actually make more sense to be able to configure whether .dmrc or AccountsService are used to store the default session and language [1]. In this case, this patch could be discarded and the bug report closed. Cheers, Adrian > [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690898 -- 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.32.3-1 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
Description: Fix handling of .dmrc file This patch fixes the behavior of lightdm when storing the selected session and language of a user. Currently, lightdm stores the selected session into ${HOME}/.dmrc but not the selected language, which will always be set to "C". Even though language and session are correctly stored through AccountsService in /var/lib/AccountsService/users/$USER, the settings should still consistently be stored in the .dmrc file since the settings stored through AccountsService are stored locally only and therefore not available when logging in to a different machine on the network. . lightdm (1.4.0-1) experimental; urgency=low . * New upstream release. * debian/patches: - 01_set-default-path, 02_default-config and 04_dont-add-pkglibexecdir-path refreshed for new release. - 05_debianize-pam-files added, Debianize the lightdm and lightdm-autologin pam config files. * debian/control: - suggests upower. closes: #679538 - make lightdm depends on lightdm-gtk-greeter | lightdm-greeter, thanks Ralf Jung for the report. closes: #684714 - add build-dep on itstool. * debian/lightdm.install: - stop installing lightdm upstart script since it's broken. closes: #679409 - install /u/s/help.* - install PAM files * debian/rules: - stop installing own PAM files. * debian/*.pam: drop obsolete PAM files. Author: Yves-Alexis Perez <cor...@debian.org> Bug-Debian: http://bugs.debian.org/679409 Bug-Debian: http://bugs.debian.org/679538 Bug-Debian: http://bugs.debian.org/684714 --- lightdm-1.4.0.orig/src/accounts.c +++ lightdm-1.4.0/src/accounts.c @@ -360,8 +360,8 @@ user_set_language (User *user, const gch if (user->priv->proxy) call_method (user->priv->proxy, "SetLanguage", g_variant_new ("(s)", language), "()", NULL); - else - save_string_to_dmrc (user->priv->name, "Desktop", "Language", language); + + save_string_to_dmrc (user->priv->name, "Desktop", "Language", language); } void @@ -369,7 +369,9 @@ user_set_xsession (User *user, const gch { g_return_if_fail (user != NULL); - call_method (user->priv->proxy, "SetXSession", g_variant_new ("(s)", xsession), "()", NULL); + if (user->priv->proxy) + call_method (user->priv->proxy, "SetXSession", g_variant_new ("(s)", xsession), "()", NULL); + save_string_to_dmrc (user->priv->name, "Desktop", "Session", xsession); }