NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.11k stars 14.15k forks source link

xscreensaver 6.00 no longer shows the "New Login" button #125420

Open obadz opened 3 years ago

obadz commented 3 years ago

Issue description

xscreensaver 5.44 used to have a "New Login" button that a user can use to login in a separate session while my screen is locked.

(I run ${pkgs.xorg.xrdb}/bin/xrdb -merge <(echo xscreensaver\*newLoginCommand: ${pkgs.lightdm}/bin/dm-tool switch-to-greeter) in my displayManager.sessionCommands to select the greeter)

Since #119189, this button is no longer there. (It comes back when I revert 56490749add178fbcdb319eeb1081af761430f2e).

Upstream does not seem to indicate that this feature has been removed.

7c6f434c commented 3 years ago

Issue description

xscreensaver 5.44 used to have a "New Login" button that a user can use to login in a separate session while my screen is locked.

(I run ${pkgs.xorg.xrdb}/bin/xrdb -merge <(echo xscreensaver\*newLoginCommand: ${pkgs.lightdm}/bin/dm-tool switch-to-greeter) in my displayManager.sessionCommands to select the greeter)

Since #119189, this button is no longer there. (It comes back when I revert 56490749add178fbcdb319eeb1081af761430f2e).

Upstream does not seem to indicate that this feature has been removed.

It now autodetects the login manager at build time and presumably finds none…

obadz commented 3 years ago

It now autodetects the login manager at build time and presumably finds none…

What do you base this on?

The only upstream diff I could find is massive so it's hard to find the culprit in there: https://github.com/Zygo/xscreensaver/commit/a7be2fd2981da28322be0872b11e1059d6571e6d#diff-530fbc6b5b68181323187e3c46b37f107ea455d04fea2476924b3d456031bdefR1503-R1514

7c6f434c commented 3 years ago

It now autodetects the login manager at build time and presumably finds none… What do you base this on?

Skimming the configure script

obadz commented 3 years ago

(Still an issue with 6.01)

obadz commented 3 years ago

I got tired of this issue and switched to light-locker (https://github.com/the-cavalry/light-locker) and it's so much nicer. No faf, not even a password screen, it reuses nicely the lightdm login screen (that had become inaccessible due to xscreensaver bug) for ALL password inputs.

NixOS setup can look something like this:

{ config, pkgs, ... }:

{
  services = {
    xserver = {
      displayManager = {
        lightdm.enable = true;
        sessionCommands = ''
          ${pkgs.xorg.xset}/bin/xset s 300 300
          ${pkgs.xorg.xset}/bin/xset s noexpose
          ${pkgs.lightlocker}/bin/light-locker --lock-on-suspend --lock-on-lid --lock-after-screensaver=30 &
        '';
      };
    };
  };

  environment.systemPackages = with pkgs; [ lightlocker ];
}

Then configure your WM to invoke light-locker-command --lock on the appropriate short cut and your movie players can call light-locker-command --poke periodically.

nixos-discourse commented 3 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/help-please-firefox-seems-to-need-catchup-time-after-unlocking-screen-using-light-locker-lightdm/15188/1