Comment 7 for bug 837002

Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Hello,

since I have been researching this issue for some time already, I've found out that there are several issues related to the handling of the last session and language of a user.

First of all, one needs to know where the information about the last session and language are stored in the filesystem. The traditional way on Unix was to use a file called .dmrc in a user's home directory which is a plain text file containing the name of the default session and language.

Recently, lightdm was modified to use the AccountsService daemon (bug #823718) instead of the traditional .dmrc file storing the information about the default session and language. While this might be a nice idea on single-desktop machines, this change is rather problematic in a networked environment since the AccountsService daemon stores its information locally in /var/lib/AccountsService/users/$USER (bug #1069494).

Furthermore, lightdm has two bugs which prevent proper handling of the last session and last language. In one case, lightdm actually never stores the information about the last language in .dmrc when AccountsService is available and running. However, it always stores the information about the last session in .dmrc, both when AccoutsService is running and when its not (bug #1068853, includes a patch).

And, secondly, lightdm actually never reads the default language from AccountsService, but does read the last language from .dmrc. So this, again, is another inconsistent behavior (bug #1071417, includes a patch).

To make things even worse, lightdm doesn't actually set the LANGUAGE or LANG environment variable to effectively changes the language for any desktop environment or window manager (bug #1019314). The latter bug report contains a work around in the form of an Xsession startup script which reads out the language from AccountsService or dmrc and sets it accordingly before the session is loaded. For the dmrc mechanism to properly work with this workaround when AccountsService is installed, the patch in bug #1068853 has to be applied.

Finally, lightdm should actually provide options to explicitly choose the last session and language (being options in the appropriate selection fields) instead of using the implicit approach proposed in bug #1031421. The proper behavior is actually the way gdm 2.20 handles it (asking whether the new choice of session and language should be default or be used for this session only).

To conclude, there are many bugs which need to be fixed first before lightdm will be fully useful in this regard, being independent of the desktop or window manager being used.

Cheers,

Adrian