From the documentation:

Xautolock monitors console activity under the X window system, and fires up a program of your choice if nothing happens during a user configurable period of time. You can use this to automatically start up a screen locker in case you tend to forget to do so manually before having a coffee break.

My current usage:

  1. Lock Awesome WM desktop with Ctrl-Alt-l:

    { "Mod1", "Control" },
        function ()
            awful.util.spawn("xautolock -locknow")
  2. Automatically lock desktop when idle, warning the user 30 seconds before doing so:

    xautolock -time 10 -notify 30 -notifier "notify-send --urgency low --expire-time=10000 -- 'Locking screen in 30 seconds'" -locker slock &

I've found a bug in Xautolock (the timing of -time and -notify seems to be off), but the program doesn't seem to be maintained, and it doesn't seem to have an official version controlled source repository. The only "reference" is a directory. Is there an alternative, ideally compatible with Wayland?

  • Can you add a brief description of xautolock to your question? Nov 2, 2015 at 19:04
  • xautolock has way too many bugs. I'm just switching to manual screen locking. (Though, one could feasibly code their own xautolock-lite within a few minutes, which should work much more reliably.) Aug 1, 2017 at 11:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.