Nixpkgs: Proposal: Change the default display manager

Created on 21 Jan 2016  Â·  25Comments  Â·  Source: NixOS/nixpkgs

NixOS version: 15.09.919.b3bba00 (Dingo)


SLiM has a few issues that make it a suboptimal choice for being the default display manager.

User-unfriendly behavior

if a user wants to enable Xfce, he could think that adding the following to configuration.nix is enough as mentioned in the manual:

  services.xserver.desktopManager.xfce.enable = true;

But SLiM will propose a Xterm session by default.

To start Xfce, the user can:

  • push F1 to change to almost invisible "session: xterm" to "session:xfce", not documented on the github mirror (and the official site is down).
  • disable xterm so SLiM sees only the xfce session
  services.xserver.desktopManager.xfce.enable = true;
  services.xserver.desktopManager.xterm.enable = false;

It is abandoned

The official homepage is down, its development is abandonned since 2013, there is no available documentation and it is not fully compatible with systemd.


Proposition

Change NixOS default display manager to something else.

  • It should be lightweight, user-friendly and up to date.
  • Users desiring to still use SLiM could enable it in configuration.nix.

Also, a mention in services.xserver.displayManager.slim.enable should be added to explain to set services.xserver.desktopManager.xterm.enable = false; if SLiM is not starting the desired desktop manager by default.

Candidates

It is hard to find lightweight, user-friendly and up to date DM, and none of the following candidates feels like a perfect replacement for SLiM (specially regarding being lightweight and the dependencies).
But they sure bring advantages that are worth to considering.
The following list is not definitive and if better alternatives exists they should be considered.

LightDM

homepage

  • Cross-desktop - supports different desktop technologies.
  • Supports different display technologies (X, Mir, ...).
  • Lightweight - low memory usage and fast performance.
  • Guest sessions.
  • Supports remote login (incoming - XDMCP, VNC, outgoing - XDMCP, pluggable).
  • Comprehensive test suite.
  • Low code complexity.

Cons:

  • The default greeter we have in nix, lightdm-gtk-greeter, has GTK dependencies.
  • There are no greeter as lightweight as slim at the moment.

SDDM

homepage

SDDM is a modern display manager for X11 and Wayland aiming to be fast, simple and beautiful. It uses modern technologies like QtQuick, which in turn gives the designer the ability to create smooth, animated user interfaces.

Pros:

  • support X11 and wayland
  • seems easier to customize than LightDM

Cons:

  • has Qt dependencies

This kind of proposition can easily turn into a debate about personal preferences.
I hope the goal of this proposition, that is improving usability and being nice with first time NixOS users, is clear enough that we can avoid that.


related issue: #4300


updates:

  • fixed desktop manager / display manager inversions
  • fixed lightdm homepage broken link
enhancement nixos

Most helpful comment

I would be ok with no login manager at all, in fact I have never used one prior to NixOS.
What about an option (not the default obviously) to disable login managers and set up startx? I have never figured out how to do it.

All 25 comments

Well, yes, slim is a bit problematic.

Agreed, I think LightDM would be a good default. SDDM, not so much.

Well, I don't think we can blame slim for arbitrarily choosing the xterm session, IMHO we should disable the xterm desktop manager by default. But I agree on the other points.

Just to note, lightdm-gtk-greeter has a hard dependency on X.Org, and only supports cairo compiled with GLX. Cairo can be compiled with GLX, a X.Org specific OpenGL implementation, or GL ES which is a display server agnostic implementation (can't be compiled with both). If you want to support wayland or any display server other than X.Org, lighdm is not the best choice at the moment.

Maybe one of the alternative lightdm greeters doesn't have a dependency on X.Org, but I haven't checked. I am also not sure on lightdm itself; I believe it also has a hard dependency on X.Org.

From what I have experienced of sddm; I can say that it could be a good candidate. However, I think that maybe making the default display manager selection as of right now is a little pre-mature.
The current live cd offerings are console and kde based and the recommended display manager for kde 5 is sddm. There is no value in changing the kde 4 cd to use anything other than kdm because it just worksâ„¢ (and there are other areas of nixpkgs which need attention. )
The question of what display manager to use will likely come up if a decision is made to transition to kde 5 by default. At the moment kde 5 looks good, however there are a few small creases still to iron out (such as the bluetooth widget.)

What really concerns me about sddm are bug reports such as https://github.com/sddm/sddm/issues/575 https://github.com/sddm/sddm/issues/551 and https://github.com/sddm/sddm/issues/537
the reports expose that sddm does not yet make enough proper checks when starting and does not error out properly when it falters.

So what I am trying to communicate is that I think it may be a bit too early to come to a decision about sddm as a default display manager because currently it would appear that features which would make it a robust enough default are yet to be added to the code base.

Slim also depends on Xorg (and I don't see anyone getting rid of Xorg for a few more years anyway), SDDM is just not ready for prime time yet. GDM often doesn't work and is also quite outdated, KDM is dead. That leaves us with LightDM and LXDM; I strongly prefer LightDM because it supports multiple greeters.

That leaves us with LightDM and LXDM

lxde was forked to lxqt. I think the focus of the lxde people is lxqt and not lxde any more. lxdm also depends on gtk2 iirc.
The recommended display manager for lxqt is sddm.

A display manager which has not been mentioned is https://github.com/linuxmint/mdm which is a fork of gdm by the linux mint people.

I submitted a PR to make lightdm the default display manager as it seemed the best choice at the moment and it is a freedesktop project.
Thanks for all the inputs!

It's not my experience thrat slim+xfce boots into xterm by default. But maybe somebody broke that recently. In any case, that would be a bug orthogonal to a decision whether to switch to another display manage.

100% agree with @edolstra. If there is low hanging fruit there which retains the current default then lets address that.
Changing the default dm because of a bug would be a knee jerk reaction.

@edolstra @tony Sorry for not being clear with this one, the main issue here is that slim is a dead project with a dead documentation.
The issues slim has with systemd will never be solved. Any issue that will ever be found from now or that has been found since 2013 will never be officially documented or addressed as there is no issue tracker or no documentation.
Do we want to use a dead project as a default is the main concern of this issue.
People aware of that should use slim at their own risk, but what about people that are not?
Even archlinux advise to not use slim.

Yes, I don't disagree we should switch to another default display manager.

Could you please be more specific about issues in slim concerning systemd. I am unaware.
It makes little sense to stop using a piece of working software (to whatever degree) as the result of an abandonment by it's developers.
I do not think that the slim documentation or tracker is a new issue.
Lets not reason that making an important decision within nixpkgs should be made to follow (with all due respect) what another distribution is doing.

On a side note, it looks like @edolstra commited something which fixed something or other related to slim.

At this point I would like to see sddm as the default display manager. It is just not robust enough yet imho. If Plasma workspaces 5 becomes the default desktop; sddm really should be the default due to the fact that the kde developers are recommending it. From my experience, I think that Plasma work spaces 5 is about one release away from being feature complete enough to become a suitable replacement for the current default kde version 4 in NixOS.
As far as sddm. I do not think it should be proposed yet. And I guess that in the interim lightdm is a good choice as a replacement for slim.

It makes little sense to stop using a piece of working software (to whatever degree) as the result of an abandonment by it's developers.

That makes a lot of sense. If a project has no maintainers anymore, it is us who have to make sure it keeps working. But slim also has a horrible UX, it hides the selected desktop, with no indication how to change it.

@jgillich Maybe I should have placed a little more emphasis on _working_ :) And I mean that definitively. Future possible negative connotations are not generally found in scope for me when I find that something is definitively _working_.

@heydojo Slim is not compatible with logind.
More details can be found at archlinux wiki:

The SliM project has been abandoned (the project homepage is down, leaving a github mirror), and is not fully compatible with systemd, including logind sessions. Consider using a different Display manager or Xinitrc.

@ericsagnes iirc logind is not required to start any desktop afaik. Unless someone knows of a desktop which does require it.

Just to add, I was an early adopter of systemd and used Fedora for quite a few years whilst I was studying RHCSA. So I know systemd well enough to be interested by :

not fully compatible with systemd

specifics would be helpful. Because as far as I can see logind is the only blocker.

@heydojo Well, that is the heart of the problem. How can we know the specifics of slim incompatibilities/issues when there is no place like an official bugtracker to get that information?
After some googling it seems that it is related to how slim use pam sessions.
Debian bugtracker list about 30 slim bugs, 6 classified important, that might never be addressed. (the confirmed important bug was reported in 2009)

Like I've seen in any other distro, it would be more sensible to choose a DM based on the DE. E.g., GDM if GNOME, KDM if KDE, LightDM for everything else.
So you have no extra closure size, and you actually get a decent default depending on the situation.

@ericsagnes thanks for the link. I actually looked at the specifics of the majority of the reports and :

a) I can't see one which is relevant or has been flagged here (maybe you see one or two?)
b) A good amount of the reports appear slightly pedantic in nature.

No disrespect to the debian community but some of them would ask you for 39764 grains of sugar in their coffee if you offered to serve them a free one and would continue to watch you while you then went and counted each one out, to make sure you did it right..

I do admire and respect the patience and attention to detail the debian people put into their work but what they think are issues is really not a yard stick I would use. It was nice to see the specifics though.

I think I may have the final word on this issue:

  1. Every desktop environment already have defined its own Display Managers. (Gnome = GDM, KDE4 = KDM, KDE5 = SDDM, etc) so it is obvious that if somebody chooses to use KDE4, he should enable KDM, for example.
  2. Thus, the Desktop Managers already have choosen Display Manager defaults by upstream.
  3. What is left to be choosen? Well, there are people who do not use desktop environments, only window managers.
  4. Thus, we should provide the most barebones Display Manager of all, to be used when people do not use Desktop Environments. Examples: XDM, CDM, nodm, Console TDM

Like many said having a default display manager make little sense, we should automatically enable the display manager that fits the chosed desktop manager when no explicit choice is made.

Also after more experience with Nix, I tend to to think the .enable = true approach for options where multiple exclusive choices are available like displayManager.something is wrong.
It is treating related settings as totally unrelated and, in my opinion, a better approach would be to have a displayManager.enabled that type would be a sum type of all available display managers.
For reference, I use something similar for input methods.

For now I will just close this issue, thanks for all the comments!

Just a quick note regarding the conclusion here -- it looks like NixOS does currently have SLiM set as the default display manager. If you configure NixOS without a desktop environment and with no services.xserver.displayManager set then it will default to SLiM.

I'm not sure if that's what we want though given the concerns with SLiM mentioned in this thread.

Note that for users with non-ASCII characters in their password (and with a corresponding localized keyboard), currently neither SLiM nor GDM are usable due to #29802 & #14318, respectively. LightDM however _does_ work for them.

IMHO, for the default, usability (as in "Can it be used _at all_?", not just "How easy is it to use?") should be valued higher than number and size of dependencies.

As a new user, I should not have to try all available display managers to find out which one(s) are working for me and which ones aren't. Those aiming for minimal (yet graphical) installations are likely to be more advanced (and maybe more patient) users.

I would be ok with no login manager at all, in fact I have never used one prior to NixOS.
What about an option (not the default obviously) to disable login managers and set up startx? I have never figured out how to do it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

domenkozar picture domenkozar  Â·  3Comments

tomberek picture tomberek  Â·  3Comments

copumpkin picture copumpkin  Â·  3Comments

langston-barrett picture langston-barrett  Â·  3Comments

edolstra picture edolstra  Â·  3Comments