I've been running nixos with xmonad and using startx
to start the xserver. However I decided I would like to have a greeter.
I first tried sddm by disabling startx
and enabling sddm
services.xserver {
displayManager {
startx.enable = false;
sddm.enable = true;
};
};
I rebuilt nixos (nixos-rebuild switch
) and the sddm appeared to work fine but when I entered my password correctly nothing happened. So being lazy and not commited to sddm, I decided rather than try and fix the issue I would just switch to another display manager, so I switched to lightdm
services.xserver {
displayManager {
startx.enable = false;
lightdm.enable = true;
};
};
And when I rebuilt a similar thing happened, lightdm starts fine but when I tried to log in it informs me "failed to login". So I checked the logs in /var/log/lightdm/lightdm.log
.
The log is fairly long so here is a selection after I logged on
[+15.51s] DEBUG: Authenticate result for user ww: Success
[+15.51s] DEBUG: User ww authorized
[+15.51s] DEBUG: Greeter requests default session
[+15.56s] DEBUG: Seat seat0: Failed to find session configuration default
[+15.56s] DEBUG: Seat seat0: Can't find session 'default'
[+31.69s] DEBUG: Seat seat0 changes active session to
[+68.26s] DEBUG: Seat seat0 changes active session to 2
[+701.81s] DEBUG: Got signal 15 from process 1
[+701.81s] DEBUG: Caught Terminated signal, shutting down
[+701.81s] DEBUG: Stopping display manager
[+701.81s] DEBUG: Seat seat0: Stopping
[+701.81s] DEBUG: Seat seat0: Stopping display server
[+701.81s] DEBUG: Sending signal 15 to process 997
[+701.81s] DEBUG: Seat seat0: Stopping session
[+701.81s] DEBUG: Terminating login1 session c1
[+701.87s] DEBUG: Session pid=1043: Sending SIGTERM
[+701.87s] DEBUG: Seat seat0: Stopping session
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
[+701.87s] WARNING: Session pid=1061: Error writing to session: Broken pipe
So it looks like it cant' find the "default session". And after looking around a bit I create /usr/share/sessions/xmonad.desktop
with the contents:
[Desktop Entry]
Encoding=UTF-8
Name=xmonad
Comment=This session starts xmonad
Exec=/home/ww/.local/bin/xmonad
Type=Application
Based on the xmonad faq. To reference this file I also create /usr/share/lightdm/lightdm.conf.d
with the contents:
[SeatDefaults]
user-session=xmonad
Based on the lightdm page from the Ubuntu wiki.
However on reboot this does not solve the problem or meaningfully change the error logs.
How can I bridge the gap so that lightdm will start xmonad properly? I feel that I have a conceptual failing in understanding what is currently going on and what should be going on.