Inconsistent behavior when storing default session and language

Bug #1068853 reported by John Paul Adrian Glaubitz
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Light Display Manager
New
Undecided
Unassigned
lightdm (Debian)
Confirmed
Unknown

Bug Description

Hello,

I have already reported this bug in Debian, but I would like to create an upstream bug report as well to hopefully increase the chances of getting the code fixed quickly. I have created a patch to fix the issue. I'm shamelessly copying my own text from the Debian bug report:

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.

Adrian

Tags: patch
Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :
Revision history for this message
Psy[H[] (vovik-wfa) wrote :

Usually accountsservice is either installed/runs or not. So choosing what to use should be automatic, depending on whether accounts-daemon is running or not.
For compatibility reasons it is better to write to both .dmrc and /var/lib/AccountsService/users/$USER anyway./var/lib/AccountsService/users/$USER anyway. And choose what to read from depending on accounts-daemon existence.

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

That's not my point!

The problem is that lightdm *always* writes the last session to .dmrc - no matter if AccountsService is running or not - but the language is only saved when AccountsService is unavailable. My patches fixes that and makes sure the language is always written to .dmrc as well which is *not* the case at the moment.

Adrian

Changed in lightdm (Debian):
status: Unknown → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.