Feature changed by: Stefan Seyfried (seife) Feature #319432, revision 11 Title: Improve the default DM selection beahvior of xdm Requested by: Takashi Iwai (tiwai) Partner organization: openSUSE.org Description: Currently we set a fixed DM via /etc/sysconfig/displaymanager at installation time. With minimal X instalation pattern, xdm package is used, and this is set to "xdm". When user installs more DEs (e.g. Enlightment) on its top, xdm is still used even after a richer DM like lightdm is present on the system. And changing this needs the manual edition of /etc/sysconfig/displaymanager, which is hard for many users. This request tries to address this. One feasible way to fix this is to change the default DM selection behavior. In this change, we'll set the empty string to /etc/sysconfig/displaymanager $DISPLAYMANAGER variable as default in xdm package. Also, change the parser in /usr/lib/X11/display-manager script so that: 1. If $DISPLAYMANAGER is set, use it. 2. If $DISPLAYMANAGER is empty or it points to non- existing entry, fallback in either of the following: 2a. If there is other DM than xdm, use it. 2b. If there is only xdm, use xdm. Supposedly, YaST sets $DISPLAYMANAGER to an appropriate value when KDE, GNOME or other patterns are used. So for these installations, the change above should be harmless. The change takes effect only for stacked installation based on minimal X pattern or such. Discussion: #1: Takashi Iwai (tiwai) (2015-09-07 15:14:40) I checked xdm package, and found that $DISPLAYMANAGER is empty in the package level. It means that YaST writes it even for minimal X? Then we need to change YaST, too, at least for patterns that set it to xdm. #2: Simon Lees (simotek) (2015-09-08 12:46:55) Id take a guess that line 241 of https://github.com/yast/skelcd-control-openSUSE/blob/master/control/control.... is maybe responsible, though i'm not quite sure. #3: Takashi Iwai (tiwai) (2015-09-08 16:25:59) Thanks. And FWIW this is evaluated in yast2-installation. It seems that this is treated as a string, and even the default value is the empty string. So it should be possible to pass the empty value there (I hope). The current plan is like the following: - Set the default of logon to empty only for minima X installation (editing xml files above). - Make sure xdm works as a fallback if $DISPLAYAMANGER is empty. Even the current package should work as is, but we need to check. - Make xdm PreReq for other DM packages, and add post/postun to each DM package to modify /etc/sysconfig/displaymanager at installation time. It writes the value only if it is empty. So it won't break updates. Also, it deletes the value at uninstallation if it's the target package. Since the XML files contain still logon target for some patterns (gdm for GNOME), this change won't break anything. And, the demand (lightdm works automatically after installing on top of minimal X) should be fulfilled by this, too. + #6: Stefan Seyfried (seife) (2015-09-14 17:25:37) (reply to #3) + If you install multiple DMs, the first one wins this gamble. But if it + is uninstalled later, the DISPLAYMANAGER variable is empty again, even + though other, "better than xdm" alternatives are installed. + How about changing the logic in /usr/lib/X11/display-manager instead to + choose a good default, if DISPLAYMANAGER is empty? #4: Sławomir Lach (lachu) (2015-09-09 18:05:44) I'm not an OpenSUSE developer, but I have idea I could realize. There should be an option from DM to select another DM - for example by pressing session button. I think XDM doesn't have option to select DE, so we could realize both ideas. #5: Takashi Iwai (tiwai) (2015-09-09 18:19:00) (reply to #4) It's interesting, but I'm afraid that it's an overkill. Most of the installations are xdm + one anogher DM. xdm is always present because it serves the basic DM startup infrastructure, too. So, making other DM overriding the default xdm should suffice in 99% cases, I suppose. -- openSUSE Feature: https://features.opensuse.org/319432