Bug 17616 - autologin cannot be disabled with LXDM
Summary: autologin cannot be disabled with LXDM
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords: 6sta1, PATCH
Depends on: 17617
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-25 11:02 CET by Nicolas Salguero
Modified: 2016-12-01 18:00 CET (History)
3 users (show)

See Also:
Source RPM: drakxtools
CVE:
Status comment: Fixed, needs testing


Attachments
A patch to add support for configuring /etc/lxdm/lxdm.conf (1.78 KB, patch)
2016-02-02 13:39 CET, Nicolas Salguero
Details | Diff
Improved version of the patch (2.76 KB, patch)
2016-02-04 14:14 CET, Nicolas Salguero
Details | Diff
Real improved version (2.80 KB, patch)
2016-02-04 14:28 CET, Nicolas Salguero
Details | Diff
rebased on master + pass perl_checker (2.55 KB, patch)
2016-08-13 02:27 CEST, Thierry Vignaud
Details | Diff
same as previous but use find () (2.52 KB, patch)
2016-08-13 02:28 CEST, Thierry Vignaud
Details | Diff
A patch to allow disabling autologin in LXDM (616 bytes, patch)
2016-11-07 09:54 CET, Nicolas Salguero
Details | Diff

Description Nicolas Salguero 2016-01-25 11:02:28 CET
Hi,

When I try to configure autologin from MCC, it does not work anymore with LXDM.  The only autologin method that works is by editing the file /etc/lxdm/lxdm.conf and adding a line "autologin=<a_user>".

Best regards,

Nico.
Comment 1 Nicolas Salguero 2016-01-26 10:08:23 CET
After more tests:

1) It appears that autologin succeeds but the user's session is closed just after (from what I see with the command "journalctl -b -0 -o verbose").

2) The problem does not seem to come from the Cauldron version of LXDM because, in a Mga5 VM, I rebuilt and installed the package coming from Cauldron and I had no problem with autologin.

So I think that it may be a side effect of bug 17617.
Marja Van Waes 2016-01-26 10:15:55 CET

CC: (none) => marja11
Depends on: (none) => 17617
Assignee: bugsquad => thierry.vignaud
Source RPM: (none) => drakxtools

Comment 2 Nicolas Salguero 2016-02-02 13:39:29 CET
Created attachment 7399 [details]
A patch to add support for configuring /etc/lxdm/lxdm.conf

I saw this in /var/log/autologin.log:
"""
X: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Impossible d'obtenir le descripteur de fichier faisant référence à la console
"""

This is why the "direct method" using startx is not working anymore.

But, with the file /etc/lxdm/lxdm.conf, it is possible to configure autologin so I wrote a patch that add support for configuring /etc/lxdm/lxdm.conf in drakautologin.
Comment 3 Nicolas Salguero 2016-02-04 14:14:11 CET
Created attachment 7405 [details]
Improved version of the patch

I improved the patch:
- lxdm is removed from "is_standalone_autologin_needed"
- lxdm use, for autologin, the session which was chosen in drakautologin

Attachment 7399 is obsolete: 0 => 1

Comment 4 Nicolas Salguero 2016-02-04 14:28:37 CET
Created attachment 7406 [details]
Real improved version

I forgot a correction in "get_autologin()"

Attachment 7405 is obsolete: 0 => 1

Rémi Verschelde 2016-02-04 14:30:02 CET

Keywords: (none) => PATCH

Thierry Vignaud 2016-08-04 11:47:18 CEST

Status: NEW => ASSIGNED

Comment 5 Thierry Vignaud 2016-08-13 02:27:56 CEST
Created attachment 8342 [details]
rebased on master + pass perl_checker

Attachment 7406 is obsolete: 0 => 1

Comment 6 Thierry Vignaud 2016-08-13 02:28:16 CEST
Created attachment 8343 [details]
same as previous but use find ()

Can you test those patches?
Comment 7 Thierry Vignaud 2016-08-13 02:29:28 CEST
I guess lxdm expect the filename of the desktop file in /usr/share/xsessions, without the extension?
Comment 8 Thierry Vignaud 2016-08-13 02:48:33 CEST
Note that I wrongly commented one line
BTW why do you set lang=?

Sadly, whereas it works fine for Plasma & GNOME, it doesn't for GNOME Classic
Comment 9 Thierry Vignaud 2016-08-13 02:58:04 CEST
GNOME Classic might be a chksession issue (we probably have to release a 6.3 bugfix to the pending 6.2 release)
Comment 10 Mageia Robot 2016-08-13 03:00:38 CEST
commit 11ae13b95669baae4bff3364bcd53a3dd05a75a8
Author: Nicolas Salguero <nicolas.salguero@...>
Date:   Sat Aug 13 02:58:42 2016 +0200

    add support for LXDM (mga#17616)
    
    need desktop-common-data-6.2+
    perl_checker cleanups by Thierry Vignaud
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=11ae13b95669baae4bff3364bcd53a3dd05a75a8
Comment 11 Thierry Vignaud 2016-08-13 03:02:59 CEST
Fixed in git.
Note that the bug really is that the autologin package doesn't work anymore (for unsupported DMs)...

Source RPM: drakxtools => autologin
Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 12 Nicolas Salguero 2016-09-07 11:37:46 CEST
Hi,

I found that disabling autologin does not work for LXDM because this code :
"""
    eval { update_gnomekderc($lxdm_conffile, 'base' => (
	if_($autologin->{user}, 'autologin' => '@' . $autologin->{user})
    ));
"""
lacks an "else" piece of code that should set autologin to an empty string, as in this code :
"""
    eval { update_gnomekderc($lxdm_conffile, 'base' => (
	'autologin' => $autologin->{user} ? '@' . $autologin->{user} : $autologin->{user}
    ));
"""

Best regards,

Nico.

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

Nicolas Salguero 2016-09-16 10:05:36 CEST

Keywords: (none) => 6sta1
Assignee: thierry.vignaud => mageiatools
Summary: [mga6-dev1] autologin does not work anymore with LXDM => autologin cannot be disabled with LXDM
Source RPM: autologin => drakxtools

Nicolas Salguero 2016-10-21 14:50:00 CEST

Priority: Normal => release_blocker

Comment 13 Nicolas Lécureuil 2016-10-23 10:38:19 CEST
can you provide a patch so thierry can review it please.

CC: (none) => mageia

Comment 14 Nicolas Salguero 2016-10-24 09:46:23 CEST
I proposed a solution for that problem in comment 12 (but I am not an expert of Perl so, even if it works, it may need to be reworked).
Comment 15 Nicolas Lécureuil 2016-11-06 15:10:22 CET
can you checkout http://gitweb.mageia.org/software/drakx and provide a real git patch please ?
Comment 16 Nicolas Salguero 2016-11-07 09:54:57 CET
Created attachment 8632 [details]
A patch to allow disabling autologin in LXDM

(In reply to Nicolas Lécureuil from comment #15)
> can you checkout http://gitweb.mageia.org/software/drakx and provide a real
> git patch please ?

Here it is
Comment 17 Nicolas Lécureuil 2016-11-07 10:03:45 CET
thierry, can you review it please ?

CC: (none) => thierry.vignaud

Comment 18 Thierry Vignaud 2016-11-07 10:04:25 CET
Comment on attachment 8632 [details]
A patch to allow disabling autologin in LXDM

The following looks saner:
'autologin' => $autologin->{user} ? '@' . $autologin->{user} : ''
Samuel Verschelde 2016-11-08 12:11:54 CET

Status comment: (none) => Patch being reviewed

Comment 19 Samuel Verschelde 2016-11-30 15:23:35 CET
If I understand correctly all we need now is to apply the patch. Let's do it?
Comment 20 Mageia Robot 2016-12-01 16:39:14 CET
commit b2b7472f3279ce50c5be7590522715782ad4313c
Author: Nicolas Salguero <nicolas.salguero@...>
Date:   Thu Dec 1 16:37:34 2016 +0100

    allow disabling autologin on LXDM (mga#17616)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=b2b7472f3279ce50c5be7590522715782ad4313c
Comment 21 Thierry Vignaud 2016-12-01 16:39:57 CET
I've not received any test on the reviewed patch in one month but here it goes

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

Comment 22 Samuel Verschelde 2016-12-01 16:59:40 CET
(In reply to Thierry Vignaud from comment #21)
> I've not received any test on the reviewed patch in one month but here it
> goes

In this case I'll leave the bug report open until someone confirms that the new version works. Do you plan to push a new version of drakxtools soon?

Status comment: Patch being reviewed => Fixed, needs testing
Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 23 Thierry Vignaud 2016-12-01 17:25:02 CET
Please don't reopen.
The suggested change is small and the fix is in git.
As we're discussing, it would be better to add a next step such as VERIFIED in the bz life cycle

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

Comment 24 Samuel Verschelde 2016-12-01 18:00:31 CET
(In reply to Thierry Vignaud from comment #23)
> Please don't reopen.
> The suggested change is small and the fix is in git.
> As we're discussing, it would be better to add a next step such as VERIFIED
> in the bz life cycle

Well, for most bugs I would agree with not reopening and just letting users confirm but since here it's one of the release blockers (although arguably could have been demoted) it made sense to keep the bug report open and let either testers or those who review the blockers close it once made sure. When you close it, it disappears from the list of blockers, so I would have appreciated if we could have kept it open for a few days. I would have personnally made sure it's closed quickly. However I'll not start a fight so I leave it closed.

Testers, please test and confirm or reopen if it doesn't work.

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