[Nix-dev] Automatically locking the screen with xautolock
James Cook
james.cook at utoronto.ca
Sun Feb 8 21:36:42 CET 2015
If you're comfortable having it suid, you could set security.suidPrograms =
[ "xautolock" ]; in configuration.nix. Then if xautolock is installed
globally it will hopefully work without sudo.
On 8 February 2015 at 10:07, Nikita Karetnikov <nikita at karetnikov.org>
wrote:
> How do I automatically lock the screen in NixOS? I've installed
> xautolock and slock. And tested
>
> sudo xautolock -time 1 -locker slock
>
> in the shell, which works fine. Can I make it work without sudo?
>
> It's a problem because these lines in configuration.nix:
>
> displayManager.sessionCommands =
> ''
> sudo xautolock -time 1 -locker slock &
> '';
>
> result in
>
> sudo: no tty present and no askpass program specified
>
> So it fails to start.
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150208/b824ab40/attachment-0001.html
More information about the nix-dev
mailing list