Preventing the Screensaver from Running in Lubuntu

For some reason, my 2nd Lubuntu machine just won’t play ball when it comes to stopping the screensaver from running. Of course, I’ve tried all the usual stuff and mostly it isn’t a problem, except, that is, when watching films.

At approximately every 10 minutes after no activity, the screensaver comes on but is there anything we can do about it?

We could move the mouse or touch a key – that works, but even that is a pain because if you are lying in bed, you don’t really want to get up to do that. And if you don’t quite make it in time…grrrr…password time.

There is a better way; an automated way:

Step 1: Install xautomation

Step 2: Type this into your terminal

Let’s break that down a little to explain what’s happening.

Firstly, we’re running a loop which will never end: while true. True is always true, so it will always execute. Next, we run the mousermove command of xte. You can find out more about xte by typing “man xte”, but basically, we’re asking the mouse to move one pixel to the right. Then we sleep for 600 seconds, which is 10 minutes and finally, end the loop.

You can easily change how long it sleeps for and to be honest, at 600, I notice a flicker which I wouldn’t if I just set it to be something slightly smaller.

Hope that helps and happy film watching!


Written by Stephen Moon
email: stephen at

Hey! Did you enjoy reading this? If you did and would like an email when I add new content, just subscribe to my list. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *