NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.36k stars 13.59k forks source link

XFCE ignores choice of XMonad window manager on first attempt #18238

Open laMudri opened 8 years ago

laMudri commented 8 years ago

Issue description

After a reboot, choosing “xfce + xmonad” from LightDM gives a plain xfce (+ xfwm) session. A workaround is to log out and (without doing anything else) log back in again.

Steps to reproduce

Boot, choose “xfce + xmonad”, log in.

Relevant parts of configuration.nix:

{
  # ...

  services = {
    xserver = {
      enable = true;
      exportConfiguration = true;

      # ...

      windowManager = {
        default = "xmonad";
        xmonad.enable = true;
        xmonad.extraPackages = haskellPackages: with haskellPackages; [
          xmonad-contrib
          xmonad-extras
          regex-posix
          taffybar
          turtle
          #xmonad-screenshot
        ];
      };
      desktopManager = {
        default = "xfce";
        xfce = {
          enable = true;
          thunarPlugins = with pkgs.xfce;
          [ thunar_volman thunar-archive-plugin tumbler ];
        };
      };
      displayManager = {
        lightdm.enable = true;
        sessionCommands = ''
          ${pkgs.networkmanagerapplet}/bin/nm-applet &
        '';
      };

      autorun = true;
    };
  };

  # ...
}

Technical details

laMudri commented 7 years ago

I'm still having this problem on afc3bcf. It doesn't affect xfce + awesome. I'll try another desktop environment with XMonad, but I couldn't get KDE5 to work.

laMudri commented 7 years ago

Reproduced on SLiM, but only after a few reboots with the same configuration. The advice on IRC was to disable xfwm, but there currently is not an option for this.

primeos commented 7 years ago

Applying 0d726295703537c074b5a19d9b463ceca9a5cecc and 1273f414a784af87363ac440af2ce948b6a656b1 should theoretically fix this (but I'm not sure that logging out and back in again workaround sounds strange)? If you want you can tast if that works if not I'll try it with your config when I backport those commits.

primeos commented 7 years ago

@laMudri does it work by now or do you still have Problems? I did a quick test after backporting these commits and according to pgrep xmonad was running and I didn't notice any significant differences after logging out and back in again (but I cant really verify this because I don't know what to expect).

laMudri commented 7 years ago

I still have the services.xserver.desktopManager.xfce.enableXfwm = false; hack in my config, so I'll take that out and give it a try soon.

laMudri commented 7 years ago

No, it's not fixed. Same behaviour as before.

bbarker commented 5 years ago

I believe I just experienced this today on 18.09 (just downloaded last week), using a very similar config to the above.

computercam commented 4 years ago

Having the same issue but instead using bspwm instead of xmonad.

On nixos-unstable channel

Edit: I was able to make the issue disappear (not sure if this is technically a fix) by removing my user and recreating it. Fix also works on nixos 19.09 stable channel.

The thing that lead me to removing the user and readding it was that I created a new test user and the problem disappeared.

One other thing i tried that was somewhat useful to troubleshooting was that I removed all over window managers / DEs except BSPWM and then was able to login with BSPWM. However, after adding the other window managers and DEs back in, it continued to default to BSPWM. This leads me to believe there is some sort of behavior where the first "loaded" window manager is the one that gets selected by default.

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.