2

I am running Lubuntu with LXDE and xfce power manager. I have set lock screen when going to sleep (suspend/hibernate) and I like it this way. However, I'd like that the screen does not get locked when I, for example, am running play whatever mp3s or have set an alarm (which won't be audible with a locked screen).

This "do not lock screen" works fine when I am watching films (with SMPlayer), so I know it's possible. However, I'd like a command for that.

2

I use Fedora but I believe that Lubuntu/LXDE still uses xscreensaver. If so take a look at xscreensaver-command, which lets you do a number of things with its remote interface.

For example --deactivate simulates user activity, so you could run that in a loop in the background once every minute or so with a script like this:

#!/bin/sh
while true; do
    sleep 60
    xscreensaver-command --deactivate >/dev/null
done

Or, you could simply use --exit before whatever period you want to suspend locks, and then start it manually when you'd like it running again.

| improve this answer | |
  • I am using xautolock, but yes, this will work. – Quora Feans May 28 '14 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.