Bug 22345 - Wrong display manager is run, in contradiction with the one selected in drakdm (eg: gdm run instead of lightdm)
Summary: Wrong display manager is run, in contradiction with the one selected in drakd...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 19:12 CET by Luis Menina
Modified: 2020-08-14 16:23 CEST (History)
2 users (show)

See Also:
Source RPM: initscripts-9.55-24.mga6.src.rpm
CVE:
Status comment:


Attachments
Add lightdm support on prefdm (736 bytes, patch)
2018-01-10 12:40 CET, Luis Menina
Details | Diff

Description Luis Menina 2018-01-07 19:12:55 CET
Description of problem:
From what I understand, initscripts 9.55-24 is supposed to have /etc/X11/prefdm and /etc/X11/lookupdm removed. See http://svnweb.mageia.org/packages/cauldron/initscripts/releases/9.55/24.mga6/SOURCES/0105-Kill-off-prefdm-lookupdm.patch?revision=1092597&view=markup&pathrev=1188129 

This is the last version released to this day. However those scripts seem to still be in the final rpm: http://ftp.proxad.net/mirrors/mageia.org/distrib/6/x86_64/media/core/release/initscripts-9.55-24.mga6.x86_64.rpm

Now the problem I have is that when setting the DM I want to use with drakautologin, it writes in /etc/sysconfig/desktop the following string:

DISPLAYMANAGER=lightdm

However /et/X11/prefdm tests that variable but uses an if statement to change test for multiple lower/upper cases to detect the display manager. If it doesn't find it in the list, it stores it verbatim. The bug happens lightdm is not in the list, and so is stored as "lightdm" in lower case.

Later in the script, /etc/X11/lookupdm is called with that lowercase value. It will try to find a DM with that name in /usr/share/X11/dm.d . If it can't, it will fallback on the first DM available. So it searches for "lightdm" instead of "LIGHTDM", which fails, and falls back on gdm on my system, which is before in /usr/share/X11/dm.d/

Version-Release number of selected component (if applicable):
initscripts-9.55-24.mga6

How reproducible:
always

Steps to Reproduce:
1. Install lightdm and gdm
2. Run drakautologin and select lightdm as the display manager to run at startup

Expected result:
Lightdm is displayed at boot

Actual result:
GDM is run instead (and doesn't show up for me because of bug #22342)
Comment 1 Luis Menina 2018-01-07 19:19:46 CET
A workaround for me was to put the DM name in upper case in /etc/sysconfig/desktop:
DISPLAYMANAGER=LIGHTDM

This way it is found by /etc/X11/lookupdm. The real fix would be to not test DISPLAYMANAGER but the uppercased value of DISPLAYMANAGER: 

DISPLAYMANAGER=`echo $DISPLAYMANAGER | tr 'a-z' 'A-Z'`

Of course if those files are absolete and are supposed to be removed, then that's even better.
Comment 2 Luis Menina 2018-01-08 10:36:39 CET
Adding ngompa in CC as it seems he worked on this.

CC: (none) => ngompa13

Comment 3 Luis Menina 2018-01-08 10:39:55 CET
(In reply to Luis Menina from comment #0)
> Description of problem:
> From what I understand, initscripts 9.55-24 is supposed to have
> /etc/X11/prefdm and /etc/X11/lookupdm removed.

Let me correct myself: the patch was added but not enabled, so that's normal:
http://svnweb.mageia.org/packages/cauldron/initscripts/releases/9.55/24.mga6/SPECS/initscripts.spec?revision=1092597&view=markup&pathrev=1188129#l26
Luis Menina 2018-01-08 10:43:45 CET

Summary: lightdm not run at boot even if selected in drakautologin, and gdm installed => Wrong display manager is run, in contradiction with the one selected in drakautologin (ex: gdm run instead of lightdm)

Comment 4 Luis Menina 2018-01-08 14:36:23 CET
Adding Colin in CC as he has worked on that prefdm move too.

CC: (none) => mageia

Comment 5 Marja Van Waes 2018-01-08 20:29:08 CET
In Mageia 6, the display manager is set with drakdm (see
http://doc.mageia.org/mcc/6/en/content/drakedm.html )

With drakautologin, you cannot set the display manager, but only with which user to autologin to which DE, see http://doc.mageia.org/mcc/6/en/content/drakautologin.html

If you really tried to switch DM with drakautologin, then this report is invalid.

Neal's work on dropping prefdm was done in Cauldron and Colin had to stop contributing, so removing them from the CC.

CC: mageia, ngompa13 => marja11
Keywords: (none) => NEEDINFO

Luis Menina 2018-01-09 16:36:02 CET

Summary: Wrong display manager is run, in contradiction with the one selected in drakautologin (ex: gdm run instead of lightdm) => Wrong display manager is run, in contradiction with the one selected in drakautologin (eg: gdm run instead of lightdm)

Comment 6 Luis Menina 2018-01-09 16:42:08 CET
Yeah sorry, was my mistake, that was using drakdm, not drakautologin. The bug really is 2 lines to change in prefdm. The fix would be only for Mageia 6 as prefdm is gone in cauldron.

Keywords: NEEDINFO => (none)

Marja Van Waes 2018-01-10 09:59:06 CET

Source RPM: initscripts-9.55-24.mga6.src.rpm => drakxtools
Assignee: bugsquad => mageiatools
Summary: Wrong display manager is run, in contradiction with the one selected in drakautologin (eg: gdm run instead of lightdm) => Wrong display manager is run, in contradiction with the one selected in drakdm (eg: gdm run instead of lightdm)

Comment 7 Luis Menina 2018-01-10 12:40:03 CET
Created attachment 9891 [details]
Add lightdm support on prefdm

Here's a patch to fix the issue. I'm not sure about the git version on which apply this because the way the history is handled in that specific looks unusual, and I couldn't find the exact version released in mageia6, but prefdm hasn't been changed since 2012 it seems so that should apply.

This is only for mageia 6 as prefdm has since then been killed in cauldron in this commit:
http://gitweb.mageia.org/software/forks/initscripts/commit/?h=distro/mga&id=b56f7375726b4fc2a0dd6380e00638a9803ca574

I'm not sure about the plymouth bit though, but it worked when I tested the last 'else' codepath in which lightdm was falling, so that should be ok.
Comment 8 Luis Menina 2018-01-10 12:41:07 CET
The problem *really* is in prefdm, which is in the initscripts package.

Source RPM: drakxtools => initscripts-9.55-24.mga6.src.rpm

Comment 9 Aurelien Oudelet 2020-08-14 16:23:54 CEST
This message is a reminder that Mageia 6 is end of life.

Mageia stopped maintaining and issuing updates for Mageia 6. At that time this bug will be closed as OLD (EOL).

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version prior to Mageia 6's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we cannot 
be able to fix it before Mageia 6 was end of life.
If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

--
Mageia Bugsquad

Resolution: (none) => OLD
CC: (none) => ouaurelien
Status: NEW => RESOLVED


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