Skip to content

xserver.displayManager: lightdm as default#12690

Closed
ericsagnes wants to merge 1 commit intoNixOS:masterfrom
ericsagnes:dm/lightdm
Closed

xserver.displayManager: lightdm as default#12690
ericsagnes wants to merge 1 commit intoNixOS:masterfrom
ericsagnes:dm/lightdm

Conversation

@ericsagnes
Copy link
Copy Markdown
Contributor

Implementation of #12516

Description

Make lightdm the default display manager (instead of slim).

Details

slim is an suboptimal choice as default display manager for a few reasons:

Slim is a very good and light display manager and should be available.
But as it is more likely an advanced user choice and it involves some extra setting to play well with the rest, its usage should be explicit by setting services.xserver.displayManager.slim.enable to true.

As no mention of the default display manager was made in the documentation, no change or addition was made.
I can add documentation if necessary.


As it is changing a default behavior, it would be nice to have some message on upgrade or an announcement on the ML upon merging.

@mention-bot
Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @edolstra, @lethalman and @abbradar to be potential reviewers

@edolstra
Copy link
Copy Markdown
Member

How many dependencies does this add to the system closure compared to slim?

@heydojo
Copy link
Copy Markdown
Contributor

heydojo commented Jan 30, 2016

I prefer this code over the old. Nice work.

@abbradar
Copy link
Copy Markdown
Member

Offtop: if we touch those things anyway, wouldn't it be nice to have services.xserver.displayManager : enum instead? Situation with a collection of mutually exclusive flags instead of "choice" feels inelegant for both users (types should tell the story, but they confuse instead) and developers (see that ugly logical expression ...|| !sddm || !gdm || !....). This is out of scope of this PR, however.

@jagajaga
Copy link
Copy Markdown
Member

👎
slim is super lightweight and it works nicely.

@fpletz fpletz added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jan 30, 2016
@dezgeg
Copy link
Copy Markdown
Contributor

dezgeg commented Jan 30, 2016

An entry in the release notes should be added as well (nixos/doc/manual/release-notes/rl-unstable.xml)

@ericsagnes
Copy link
Copy Markdown
Contributor Author

@edolstra LightDM itself is "quite" small. On my system the slim full closure is 178M and the lightdm one is 332M (mainly due to perl and python, perl is currently required by nix).
With lightdm_gtk_greeter, it brings the closure size to 571M. It would be nice if there was a slim like lightweight greeter, but AFAIK there is no such project.
But as we can expect a display manager user to have a DE/WM also set and a few GUI applications installed, the closure size could be a "relatively" small concern (firefox and chromium are both over 700M).

@abbradar It would be nice and I would like to improve the code if possible. Please correct me if wrong, but in case services.xserver.displayManager is an enum then there can not be sub-options like now so the current sub-options like services.xserver.displayManager.auto.enable should be moved to a different namespace, right?

@jagajaga It is nice and I am a slim user. But slim has some issues that make it a bad default choice.
Arch wiki recommend to not use it:

Warning: 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.

It work nicely most of the cases, but for example slim auto login and gnome keyring seems to not going well together.
Anyway, you would still be able to use slim by setting services.xserver.displayManager.slim.enable to true.

@dezgeg Thanks! I will add a note there.

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Jan 31, 2016

  • enum: Logically we do have an enum here, as exactly one of the option needs to be chosen (if X is enabled). Maybe make services.xserver.displayManager.enable the enum? ...althoug we're used to enable being a boolean. Anyway, that issue is mostly orthogonal to this PR.
  • closure: on closure-size, lightdm + the (default) gtk3 greeter have 166 MB of closure (slim has 48 MB). Most of the paths will be present in any system with X, I believe. For SDDM comparison, gtk3 certainly seems lighter than Qt5 ATM. (The values on the closure-size branch should be closer to our long-term values. The default isn't something to be flipped lightly.)
  • choosing the default: Size of closure certainly is a valid argument but it's not the only one, I think. IMHO ease of use is rather important, and I've seen lots of people that had no idea how to switch sessions when seeing slim.

@joelmo
Copy link
Copy Markdown
Contributor

joelmo commented Feb 9, 2016

I have seen KDE based distros use SDDM. If i'm not mistaken GNOME distros use lightdm? If KDE already is used for the graphical live cd I think SDDM will be a good choice.

But is it possible to check if the user enaled a particular desktop env and then if displayManager is not set, then choose lightdm if desktop env is GNOME etc.

@heydojo
Copy link
Copy Markdown
Contributor

heydojo commented Feb 9, 2016

@joelmo sddm and lightdm are interchangeable with gnome 3 and plasma workspaces 5 iirc.
NixOS allows you to choose which one you want to use. sddm will likely succeed lightdm as the default as it matures and if a plasma workspaces 5 live cd emerges. I don't think plasma workspaces 5 by default is on the road map at the moment though. There are much bigger changes on the way for the next release which involve a major version bump of gcc.

@astsmtl
Copy link
Copy Markdown
Contributor

astsmtl commented Feb 9, 2016

+1 for switching to LightDM.

@zimbatm
Copy link
Copy Markdown
Member

zimbatm commented Feb 23, 2016

+1 for changing. Let's use maintained stuff by default

@benley
Copy link
Copy Markdown
Member

benley commented Apr 1, 2016

another +1 to shifting away from slim on account of its unmaintained status. Is this PR still live?

@jagajaga
Copy link
Copy Markdown
Member

jagajaga commented Apr 1, 2016

Well, OK, guys. It's unmaintained, but it's working as it should, what's the problem? :)

@jgillich
Copy link
Copy Markdown
Member

jgillich commented Apr 1, 2016

Well, it's unmaintained, that alone should be enough. In addition to that, it provides no indication about how to change the session. Why does it matter to you? You can keep using slim, but LightDM clearly is a better default.

@joelmo
Copy link
Copy Markdown
Contributor

joelmo commented Apr 1, 2016

This clone of SLIM looks it will be able to change session: data-modul/slim@741e439

And the slim project is not completely abandoned, there are people caring about it: https://github.com/data-modul/slim/network (last commit some week ago)
Commits to LightDM and SDDM are more frequent but I think unmaintained does't have much meaning here.

The question is: do you optimize for popularity or closure size?
And seeing which default is most popular among NixOS users is probably impossible. Having statistics from hydra would help.

@jgillich
Copy link
Copy Markdown
Member

jgillich commented Apr 1, 2016

You can absolutely change the session, there's just no indication how (F2 key iirc), which is bad for usability, especially considering no mainstream distro ships with slim.

A few people doing some light changes on GitHub doesn't equal a maintained project. There is no central location to report bugs or send patches to.

@ericsagnes
Copy link
Copy Markdown
Contributor Author

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 PR, thanks for all the comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.