Bug 14622 - autologin and layouts issues in LXDE
Summary: autologin and layouts issues in LXDE
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: IN_ERRATA advisory MGA5-32-OK MGA5-64-OK
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2014-11-20 21:21 CET by Alex Loginov
Modified: 2016-02-17 20:21 CET (History)
4 users (show)

See Also:
Source RPM: lxde-common-0.99.0-9.3.mga5
CVE:
Status comment:


Attachments

Description Alex Loginov 2014-11-20 21:21:17 CET
Description of problem:
For LXDE I have bug with layouts if to use autologin via lxdm (or
autologin pkg). I see "TERMINATE" in tray instead of my language, but
good for EN. This bug is not present when autologin is disabled and when I manually log in with the same user.
Nicolas Salguero wrote: "I found another bug when enabling autologin for user in /etc/lxdm/lxdm.conf and using "Keep system layouts": lxpanel indicates that the keyboard is US whereas, in fact, it is FR. This bug is not present when autologin is disabled and when I manually log in with the same user."


Version-Release number of selected component (if applicable): ?


How reproducible: I see "TERMINATE" always, Nicolas see "EN" always


Steps to Reproduce:
1. enable autologin for user in /etc/lxdm/lxdm.conf
2. reboot
3. press keys for changing language or click by mouse in tray


Reproducible: 

Steps to Reproduce:
Alex Loginov 2014-11-20 21:21:36 CET

CC: (none) => nicolas.salguero

Comment 1 Nicolas Salguero 2015-01-24 10:41:37 CET
Hi Alex,

I solved my problem by adding the line "setxkbmap -option" just before the line  "@lxpanel --profile LXDE", ie at the beginning of the file /etc/xdg/lxsession/LXDE/autostart, for a new user, or the file $HOME/.config/lxsession/LXDE/autostart, for an existing one.  Now, I always see FR even when autologin is enabled.

Is this solution helps for your problem too?

I will create a patch and see with my mentor to commit it in the Mga SVN repository.

Best regards,

Nico.
Comment 2 Alex Loginov 2015-01-24 15:17:47 CET
Hello Nicolas,
Thank you for your LXDE support.

I used:
sed -i 's|@lxpanel --profile LXDE|setxkbmap -option\n@lxpanel --profile LXDE|g' /etc/xdg/lxsession/LXDE/autostart

Result for new user:
OK if to switch keyboard layouts by mouse click, but keyboard layouts cannot be switched by keyboard.
Comment 3 Alex Loginov 2015-01-29 22:56:20 CET
Remi hi,

Will you unpatch? I had only visual problems without patch, but all worked fine. Keyboard layouts cannot be switched by keyboard with patch. So it's regress now.

CC: (none) => remi

Comment 4 Nicolas Salguero 2015-01-30 15:09:44 CET
Hi Alex,

I have understood the problem that prevents keyboard layouts to be switched by keyboard: it is because lxpanel is launched before "setxkbmap -option" is finished.  So I have modified my solution and I will submit it to Remi.

Regards.

Nico.
Comment 5 Alex Loginov 2015-03-01 14:48:01 CET
Will you unpatch? I had only visual problems without patch, but all worked fine. Keyboard layouts cannot be switched by keyboard with patch. So it's regress now.
Comment 6 Rémi Verschelde 2015-03-01 21:31:38 CET
You just copy pasted comment 3 Alex, can you please state whether you saw Nicolas' comment 4 and tried the new lxpanel?
Comment 7 Alex Loginov 2015-03-01 21:51:59 CET
I tested the latest LXDE from Cauldron, lxpanel-0.7.2-1.mga5.i586.rpm
Where is new lxpanel?
Comment 8 Rémi Verschelde 2015-03-01 21:56:48 CET
Well lxpanel-0.7.2-1.mga5 is indeed the latest version, so Nicolas' fix from comment 4 is maybe not sufficient.
Comment 9 Nicolas Salguero 2015-03-02 10:00:32 CET
Hi,

The patched package is not lxpanel but lxde-common.

After some tests, I can confirm that, sometimes, the keyboard switch works and, sometimes, when you first try to switch, you have to try three times before it works.

So I should unpatch because the only corrected problem is a visual one (e.g. FR keyboard marked as US one) but the patch causes a bigger problem.

My question is: Do I have the right to unpatch and submit a new pkg during the freeze period?  If the response is positive, I will do that quickly.

Cheers,

Nico.
Comment 10 Rémi Verschelde 2015-03-02 19:07:48 CET
You can commit to SVN, but then you have to ask for a freeze push on the dev mailing list, explaining what the changes are.
Comment 11 Alex Loginov 2015-03-02 22:11:08 CET
> sometimes, when you first try to switch, you have to try three times before it works.
I tested three times, but it does not work.

> the patch causes a bigger problem.
Yes, please unpatch and report to upstream. I remember LXDE in Mageia 2 worked fine, so it's regress in upstream.

Many thanks for your works.
Comment 12 Nicolas Salguero 2015-03-03 12:10:57 CET
Hi,

I have unpatched but the result of "mgarepo rpmlog lxde-common" is rather strange: it says "0.99.0-6.mga4".  I do not understand why it is not "0.99.0-6.mga5".  Is it possible to correct that mistake?

Regarding the problem with the displayed keyboard that is wrong, after several other tests, I can confirm that:

1) The problem is not related to LXDM because it also occurs with GDM and KDM.

2) "setxkbmap -print | grep symbols" says "[...] pc+fr+[...]".

3) setxkbmap get the display with: "XkbOpenDisplay([...])".

4) Lxpanel xkb plugin only displays what the X server told it, when it is configured to keep system configuration, so symbols_string contains "[...] pc+us+[...]".

5) Lxpanel xkb plugin get the display with:
   "GDK_DISPLAY_XDISPLAY(gdk_display_get_default())"

6) With MATE and autologin:

6.1) If you configure several keyboard layouts but not US, then the chosen layout is the first of the list (normal behavior).

6.2) If you configure several keyboard layouts including US, then the chosen layout is US, even if it is not the first of the list (abnormal behavior).

As LXDE and MATE have problems and use glib/gtk+ 2, I suspect that the problem comes from querying the X server through those libraries and not directly.

Regards,

Nico.
Comment 13 Alex Loginov 2015-03-03 15:43:52 CET
I cannot confirm for MATE, it's OK for me. I have issue for LXDE only.
Comment 14 Nicolas Salguero 2015-05-27 11:21:41 CEST
I have updated the errata https://wiki.mageia.org/en/Mageia_5_Errata#LXDE concerning this problem.

Whiteboard: (none) => IN_ERRATA

Comment 15 Nicolas Salguero 2016-02-09 17:24:29 CET
Suggested advisory:
========================

The updated lxde-common package forces reloading the keyboard configuration with the "setxkbmap" command when a user logs into LXDE to be sure the keyboard displayed in lxpanel is the right one.  Otherwise, when using autologin, lxpanel always display "US" even if the configured layout is something else, like "FR", for example.
========================

Updated packages in core/updates_testing:
========================
i586:
lxde-common-0.99.0-9.3.mga5.noarch.rpm

x86_64:
lxde-common-0.99.0-9.3.mga5.noarch.rpm

Source RPMs:
lxde-common-0.99.0-9.3.mga5.src.rpm

Assignee: bugsquad => qa-bugs
Status: NEW => ASSIGNED

Nicolas Salguero 2016-02-09 17:27:40 CET

Hardware: i586 => All
Version: Cauldron => 5

Comment 16 claire robinson 2016-02-09 17:45:35 CET
Alex could you test with these new packages please, when they land on the mirror.
Thanks
claire robinson 2016-02-09 17:46:15 CET

Source RPM: LXDE => lxde-common-0.99.0-9.3.mga5

Comment 17 Alex Loginov 2016-02-09 21:23:13 CET
Hi Nicolas,
Thanks you found right solution for this issue. I'm OK with MGA5 32bit.
Sorry I cannot test 64bit, I'm 32bit only.

Whiteboard: IN_ERRATA => IN_ERRATA MGA5-32-OK

Comment 18 Lewis Smith 2016-02-10 11:15:11 CET
Testing M5 x86 real h/w with French keyboard

BEFORE update (lxde-common-0.99.0-9.2.mga5)
LXDE desktop. Without auto-login, the systray correctly showed FR k/b.
Used MCC to establish auto-login to LXDE, re-booted.
Systray INcorrectly showed US k/b.

AFTER update to: lxde-common-0.99.0-9.3.mga5
Re-booted, auto-login to LXDE desktop now correctly show FR k/b in Systray.

Update good. Thanks to Nicolas & Alex.

CC: (none) => lewyssmith
Whiteboard: IN_ERRATA MGA5-32-OK => IN_ERRATA MGA5-32-OK MGA5-64-OK

Comment 19 claire robinson 2016-02-10 18:47:32 CET
Validating. Advisory uploaded.

Please push to 5 updates, thanks.

Keywords: (none) => validated_update
Whiteboard: IN_ERRATA MGA5-32-OK MGA5-64-OK => IN_ERRATA advisory MGA5-32-OK MGA5-64-OK
CC: (none) => sysadmin-bugs

Comment 20 Mageia Robot 2016-02-17 20:21:16 CET
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2016-0022.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.