Nixpkgs: login manager (slim, lightdm) does not start the window manager

Created on 21 Apr 2017  Â·  18Comments  Â·  Source: NixOS/nixpkgs

Issue description

Login from slim or lightdm won't start the window manager since the last upgrade on my system. The session is instantly closed and throws me back to the login manager.

Apparently lightdm does not find xmonad (from journalctl):

Apr 20 23:46:13 shannon systemd[1]: Started User Manager for UID 1000.
Apr 20 23:46:14 shannon xsession[1269]: /nix/store/yr6xa4hrmai4n85sg1mbjjd4r540hw68-xsession: Window manager 'xmonad'' not found.
Apr 20 23:46:14 shannon xsession[1269]: /nix/store/yr6xa4hrmai4n85sg1mbjjd4r540hw68-xsession: Desktop manager '/nix/store/yr6xa4hrmai4n85sg1mbjjd4r540hw68-xsession 'none' not found.
Apr 20 23:46:14 shannon lightdm[1118]: pam_unix(lightdm:session): session closed for user * 
Apr 20 23:46:14 shannon lightdm[858]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Apr 20 23:46:14 shannon lightdm[1327]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
Apr 20 23:46:14 shannon systemd[1]: Created slice User Slice of lightdm.

Here is the configuration I use:

services.xserver = {
  enable = true;
  synaptics.enable = false;
  displayManager.lightdm.enable = true;
  desktopManager.xterm.enable = false;
  windowManager.xmonad.enable = true;
  windowManager.xmonad.enableContribAndExtras = true;
};

Steps to reproduce

  • login via slim or lightdm
  • get kicked

Technical details

  • System: NixOS: 17.03.1016.c558d093ab (Gorilla)
  • Nix version: 1.11.8
  • Nixpkgs version: 17.03.1016.c558d093ab
regression blocker 3 - Review nixos user experience community feedback

Most helpful comment

The next upgrade on the 17.03 channel should fix this (99dfb6dce37edcd1db7cb85c2db97089d9d5f442 just passed through Hydra).
nixos-unstable wasn't affected by this (seems like the channel is stuck).

i also discovered, that the lightdm, slim, and gdm testcases are not channel-critical, and the gdm test has never passed on the 17.03 channel

That's a good point I've added an issue (#25131) in order not to forget this.

All 18 comments

I can confirm this. It happened to me just a few minutes ago. Quick fix that helped me is to create a .xsession file in home and put command for xmonad startup there:

echo xmonad > ~/.xsession
chmod +x ~/.xsession

Technical details

  • System: NixOS: 17.03.1016.c558d093ab (Gorilla)
  • Nix version: 1.11.8
  • Nixpkgs version: 17.03.1016.c558d093ab

Confirmed with Slim/XMonad, latest 17.03 channel

Gnome user here experiencing the same issue.

@aKriJcz's quick fix works with

echo gnome-shell > ~/.xsession
chmod +x ~/.xsession

However it doesn't work with

echo gnome-shell --wayland > ~/.xsession
chmod +x ~/.xsession

Something wrong with wayland?

Also experienced this with lightdm/xmonad, the .xsession fix above lets me actually log in, but xmonad --recompile does not work. I have also noticed that reboot is also no longer permitted and there is a long output from stat when logging in non-graphically, though I am unsure if it is related.

stat: unrecognized option '--printf'
BusyBox v1.26.2 () multi-call binary.

Usage: stat [OPTIONS] FILE...

 <snipped for sanity>

WARNING: bad ownership on /nix/var/nix/gcroots/per-user/john

which seems to come from: https://github.com/NixOS/nixos/blob/master/modules/programs/shell.nix

edit: the permissions thing is something else unrelated

24172 fixes this for me, without creating .xsession.

systemd.targets."multi-user".conflicts = [ "[email protected]" ]

See this comment
https://github.com/NixOS/nixpkgs/issues/24172#issuecomment-293714795

That setting didn't fix this for me at all, surely since this has happened since the 17.03 release whatever caused it can be easily reverted?

I have the same issue with lightdm and awesome.

Same issue with slim and i3. The only thing that fixes it for me is the .xsession hack (or rollback..)

ping @cleverca22, I think you found the cause of this?

yeah, a git bisect says its 6b7c5ba5353e2a81255879173de758fc5f08be62

i also discovered, that the lightdm, slim, and gdm testcases are not channel-critical, and the gdm test has never passed on the 17.03 channel

http://hydra.nixos.org/job/nixos/release-17.03/nixos.tests.gnome3-gdm.x86_64-linux

If I put a wrong password and then try again I am able to login but it creates a terminal window. If I close it, I am kicked out to the login prompt again.

Using slim and Xmonad.

The next upgrade on the 17.03 channel should fix this (99dfb6dce37edcd1db7cb85c2db97089d9d5f442 just passed through Hydra).
nixos-unstable wasn't affected by this (seems like the channel is stuck).

i also discovered, that the lightdm, slim, and gdm testcases are not channel-critical, and the gdm test has never passed on the 17.03 channel

That's a good point I've added an issue (#25131) in order not to forget this.

I confirm the window manager is now starting after loging in via lightdm or slim. Maybe we can wait for some reviews before closing the issue.

revert fixed the issue for me - lightdm/gnome-shell

I experienced a similar issue mixing i3 as the window manager, and slim as the display manager.

Still experience it on 18.09. The workaround with .xsession file works.

.xsession-errors says that Window manager xterm not found. Though my window manager is xmonad.

@d12frosted Which login manager are you using and could you post your complete configuration for services.xserver (or the relevant parts of it)?

Hi Michael,

Sorry for the late reply. Unfortunately I hat to switch to a different
machine, so I don't have reproductions steps.

Answering your question, I was using slim.

On Mon, 17 Dec 2018 at 14:57, Michael Weiss notifications@github.com
wrote:

@d12frosted https://github.com/d12frosted Which login manager are you
using and could you post your complete configuration for services.xserver
(or the relevant parts of it)?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NixOS/nixpkgs/issues/25068#issuecomment-447874130,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGNNiUg9UNAYp7v6geIhauRFrLDrbYE3ks5u57DygaJpZM4NDohm
.

--
Cheers,
Boris

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sid-kap picture sid-kap  Â·  3Comments

domenkozar picture domenkozar  Â·  3Comments

vaibhavsagar picture vaibhavsagar  Â·  3Comments

grahamc picture grahamc  Â·  3Comments

langston-barrett picture langston-barrett  Â·  3Comments