[Solved] How to Lock Screen based on inactivity

Forum Forums General Software [Solved] How to Lock Screen based on inactivity

  • This topic has 5 replies, 3 voices, and was last updated Oct 24-3:53 pm by techore.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #91284
    Member
    rek769

      Hello everyone. I’m trying to get xlock to launch after X minutes of inactivity.

      Ideally, I’d like to hack the script that controls Screen Blanking to invoke xlock instead of xset as it appears to do now but attempts to do that have not worked.

      I’ve tried un-commenting and setting the LockCommand in the Icewm preferences file. But that only works if ScreenLock is invoked via Icewm menu (or CTRL-ALT-DEL).

      I’ve tried messing around with Xscreensaver but I get errors complaining about the daemon not starting (I think Xscreensaver has gotten tangled up in systemd nowadays so that may be the issue).

      I would not mind using Screen Blanking without locking but the issue is that I use a TV as my monitor and after the screen blanks, the TV turns itself off after a few minutes (with no way to change that behavior in the TV settings) and I have to turn it on again to use the computer. I’d prefer just to tap a key, type my password and go.
      Any ideas on how I could accomplish this would be greatly appreciated.

      • This topic was modified 6 months, 1 week ago by rek769.
      #91285
      Member
      oops
        Helpful
        Up
        0
        ::

        I use i3lock after 15 minutes:

        xautolock -time 15 -detectsleep -locker "i3lock -c 000000" &
        
        # + and to suspend:
        xautolock -time 15 -detectsleep -locker "i3lock -c 000000 && dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Suspend boolean:true" &
        • This reply was modified 6 months, 1 week ago by oops.
        #91291
        Member
        techore
          Helpful
          Up
          0
          ::

          You have not provided details on what you have tried, but you may want to experiment with “xset s off; xset -dpms; xset s noblank” and disable any power management and screen saver. Once you got it working, tweak until satisfied.

          I set xset, dpms, and xss-lock from ~/.xinitrc.

          #91292
          Member
          rek769
            Helpful
            Up
            0
            ::

            Excellent. Xautolock did the trick. I’m using it with xlock and it works perfectly.

            Thank you!

            #91310
            Member
            oops
              Helpful
              Up
              0
              ::

              Your are welcome.

              My old post was here with an other solution:
              https://www.antixforum.com/forums/topic/what-is-the-best-way-to-have-auto-suspend-into-antix/#post-21240

              #91318
              Member
              techore
                Helpful
                Up
                0
                ::

                Understood and thank you for sharing the old post. I’ve not use xautolock, myself, so this is informative.

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.