Bug 1131074 - zypper up usurped default desktop TDE and default display-manager TDM with IceWM and XDM
Summary: zypper up usurped default desktop TDE and default display-manager TDM with Ic...
Status: RESOLVED WORKSFORME
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Leap 15.0
Hardware: x86-64 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL: https://bugs.pearsoncomputing.net/sho...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-31 09:00 UTC by Felix Miata
Modified: 2019-04-01 08:27 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
.tgz of /var/log/zypp/history and /var/log/zypper.log (700.82 KB, application/x-compressed-tar)
2019-03-31 09:00 UTC, Felix Miata
Details
zypper lr -d output (2.46 KB, text/plain)
2019-03-31 09:00 UTC, Felix Miata
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Miata 2019-03-31 09:00:14 UTC
Created attachment 801741 [details]
.tgz of /var/log/zypp/history and /var/log/zypper.log

Original summary:
zypper up usurped default desktop TDE and default display-manager TDM with IceWM and XDM

zypper up inexplicably changed /etc/alternatives/ thus:
default-displaymanager -> /usr/lib/X11/displaymanagers/tdm
default-xsession.desktop -> /usr/share/xsessions/tde.desktop
to
default-displaymanager -> /usr/lib/X11/displaymanagers/xdm
default-xsession.desktop -> /usr/share/xsessions/icewm-session.desktop

Bug 1131073 has y2logs, Xorg.0.log, dmesg, journal (3 boots)
Comment 1 Felix Miata 2019-03-31 09:00:58 UTC
Created attachment 801742 [details]
zypper lr -d output
Comment 2 Stefan Dirsch 2019-03-31 12:09:50 UTC
tdm? tde?
Comment 4 Stefan Dirsch 2019-03-31 20:37:08 UTC
tdm/tde has a lower update-alternatives priority than xdm/icewm? Check with update-alternatives tool ...
Comment 5 Felix Miata 2019-03-31 23:57:58 UTC
# update-alternatives --query default-xsession
Name: default-xsession.desktop
Link: /usr/share/xsessions/default.desktop
Status: auto
Best: /usr/share/xsessions/icewm-session.desktop
Value: /usr/share/xsessions/tde.desktop

Alternative: /usr/share/xsessions/icewm-session.desktop
Priority: 15

# update-alternatives --query default-displaymanager
Name: default-displaymanager
Link: /usr/lib/X11/displaymanagers/default-displaymanager
Status: auto
Best: /usr/lib/X11/displaymanagers/tdm
Value: /usr/lib/X11/displaymanagers/tdm

Alternative: /usr/lib/X11/displaymanagers/console
Priority: 5

Alternative: /usr/lib/X11/displaymanagers/tdm
Priority: 15

Alternative: /usr/lib/X11/displaymanagers/xdm
Priority: 10

Managing priorities is not something I've been able to find instructions for in man update-alternatives, any SDB, or elsewhere. Given the history of zypp repo priorities (smallest number = highest priority), it's unclear what the numbers mean. Making a specific manual selection from YaST I can manage when necessary, but I'd like to see examples of using update-alternatives for priority management. I expect the package managment systems to set these appropriately, but sometimes when installing TDE/TDM I've found that didn't happen, so expedient to set /etc/alternatives via these old scripts based upon a mailing list or forum post:

> ls -gG fix*sh
-rw-rw-r-- 1 152 Oct 26  2017 fixkdm3.sh
-rw-rw-r-- 1 151 Oct 26  2017 fixkdm.sh
-rw-rw-r-- 1 151 Nov 28  2017 fixtdm.sh
> cat fix*.sh
/usr/sbin/update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager default-displaymanager /usr/lib/X11/displaymanagers/kdm3 15
/usr/sbin/update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager default-displaymanager /usr/lib/X11/displaymanagers/kdm 15
/usr/sbin/update-alternatives --install /usr/lib/X11/displaymanagers/default-displaymanager default-displaymanager /usr/lib/X11/displaymanagers/tdm 15

Note this is nothing new, happening to me fairly often on 15.0, 15.1 and TW since farther back than I can remember.
Comment 6 Stefan Dirsch 2019-04-01 01:02:49 UTC
Looks like you've removed /usr/share/xsessions/tde.desktop meanwhile.

Whatever. Highest number wins here. update-alternatives is in auto mode by default, means highest number wins. You should switch to manual mode.

As documentation I'm aware of "update-alternatives --help" and the manual
page.

---
When using the --config option, update-alternatives will list all of the choices for the link group of which given name is the master alternative name.  The current choice is marked  with a  ‘*’.   You  will then be prompted for your choice regarding this link group.  Depending on the choice made, the link group might no longer be in auto mode. You will  need  to  use  the --auto  option in order to return to the automatic mode (or you can rerun --config and select
the entry marked as automatic).
--

This is what you want for surviving the next "zypper up".
Comment 7 Stefan Dirsch 2019-04-01 01:14:27 UTC
Closing as WORKSFORME.
Comment 8 Felix Miata 2019-04-01 05:59:46 UTC
(In reply to Stefan Dirsch from comment #6)
> Looks like you've removed /usr/share/xsessions/tde.desktop meanwhile.

Looks like that to update-alternatives, but it looks like it's there to ls:

# ls -l /etc/alternatives/default-displaymanager
lrwxrwxrwx 1 root root 32 Mar 31 03:44 /etc/alternatives/default-displaymanager -> /usr/lib/X11/displaymanagers/tdm
# ls -l /etc/alternatives/default-xsession.desktop
lrwxrwxrwx 1 root root 32 Mar 31 03:43 /etc/alternatives/default-xsession.desktop -> /usr/share/xsessions/tde.desktop
# ls -l /usr/share/xsessions/
lrwxrwxrwx 1 root root   42 Sep 21  2018 default.desktop -> /etc/alternatives/default-xsession.desktop
lrwxrwxrwx 1 root root   13 Sep 21  2018 icewm-session.desktop -> icewm.desktop
-rw-r--r-- 1 root root 2498 Sep 21  2018 icewm.desktop
-rw-r--r-- 1 root root 4083 Mar 18 16:52 tde.desktop

# update-alternatives --config default-displaymanager
There are 3 choices for the alternative default-displaymanager (providing /usr/lib/X11/displaymanagers/default-displaymanager).
  Selection    Path                                  Priority   Status
------------------------------------------------------------
* 0            /usr/lib/X11/displaymanagers/tdm       15        auto mode
  1            /usr/lib/X11/displaymanagers/console   5         manual mode
  2            /usr/lib/X11/displaymanagers/tdm       15        manual mode
  3            /usr/lib/X11/displaymanagers/xdm       10        manual mode

Press <enter> to keep the current choice[*], or type selection number: There is 1 choice for the alternative default-xsession.desktop (providing /usr/share/xsessions/default.desktop).

# update-alternatives --config default-xsession.desktop
  Selection    Path                                        Priority   Status
------------------------------------------------------------
  0            /usr/share/xsessions/icewm-session.desktop   15        auto mode
  1            /usr/share/xsessions/icewm-session.desktop   15        manual mode

Press <enter> to keep the current choice[*], or type selection number

/usr/share/xsessions/tde.desktop and
/usr/lib/X11/disaplaymangers/tdm
are owned by package trinity.tdm.
# zypper ref
# zypper -v in -f trinity-tdm
The rebooting produced:
# update-alternatives --config default-displaymanager
There are 3 choices for the alternative default-displaymanager (providing /usr/lib/X11/displaymanagers/default-displaymanager).
  Selection    Path                                  Priority   Status
------------------------------------------------------------
* 0            /usr/lib/X11/displaymanagers/tdm       30       auto mode
  1            /usr/lib/X11/displaymanagers/console   5         manual mode
  2            /usr/lib/X11/displaymanagers/tdm       30        manual mode
  3            /usr/lib/X11/displaymanagers/xdm       10        manual mode
...
# update-alternatives --config default-xsession.desktop
  Selection    Path                                        Priority   Status
------------------------------------------------------------
  0            /usr/share/xsessions/icewm-session.desktop   15        auto mode
  1            /usr/share/xsessions/icewm-session.desktop   15        manual mode
... 
> This is what you want for surviving the next "zypper up".

Looks like I'm set for TDM, but since tde-session.desktop is not found by update-alternatives, what to do for tde-session.desktop to survive I'm at at loss. Is this a bug that needs to be reported to TDE's bug tracker, or a bug in update-alternatives not finding a file that clearly exists?
Comment 9 Stefan Dirsch 2019-04-01 08:14:39 UTC
Please report to TDE's bug tracker.
Comment 10 Felix Miata 2019-04-01 08:27:28 UTC
Turns out I did that last October. It hasn't been touched except by me.