Cannot login to xfce as a normal user

I can login to xfce only as root. Trying a normal user return to login screen

configuration.nix

Well, yeah, your config says you currently don’t have any users besides root. You need to add a user for yourself using the config:

  # Define a user account. Don't forget to set a password with ‘passwd’.
  # users.users.jane = {
  #   isNormalUser = true;
  #   extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  #   packages = with pkgs; [
  #     firefox
  #     thunderbird
  #   ];
  # };

I added it after installation

[root@nixos:/]# groups m
m : users networkmanager

did you assign them a password?

yes
yes
20 characters

I replied yes to you but it doesn’t show I replied to you (forum bug)

1 Like

Could you check the logs of display-manager.service after trying to connect?

That should be possible with journalctl -u display-manager.service.

1 Like

That’s intentional, the forum doesn’t show replies to the last comment in the thread as anything special. Whether this is intuitive is a different question…

1 Like

display-manger.log

note: I had to login to xfce as root after the problem to get journalctl

does /home/m exist? (I suppose m is your user)

it seems not

1 Like

How did you add that user? It doesn’t seem to exist in your system configuration as TLATER pointed out.

And what is that users shell according to /etc/passwd?
What is in your /etc/shells?

Note you can also use e.g. Ctl+Alt+F4 to switch to a text console, and log in as your user there.

Those are a bit more robust to failure, not sure if they’ll make it through “missing home” but at least they don’t need to create xauthority files in your home dir (you can also disable that for lightdm, on a side note).

1 Like