Prevent Ubuntu From Going to Sleep While Watching Video

ubuntu-disable-screensaver-thumbIt may be pretty annoying if the screensaver pop in to look at over the screen as you were watching video. In Mac, you can easily prevent the screen from sleeping, either which has a command or with all the Caffeine app. What if you might be using Ubuntu? What solutions would you have to steer clear of the screen from hitting the hay, or even dimming down?


Yes, this app has the same name as the Caffeine app for Mac. No, they aren't by the same developer and company whilst they are similar in functionality. This Caffeine app can be a lightweight system tray application that temporarily prevent the screen saver and power saving mode from activating.


In Ubuntu, you just need to open a terminal and type the subsequent command:

sudo add-apt-repository ppa:caffeine-developers/ppa sudo apt-get update sudo apt-get install caffeine


After the installation, you can launch the applying and it'll show up in the system tray. The usage really is easy. When you are watching a relevant video, just click on it and select “disable screensaver”.

If you check out its Preferences page, you are able to even add certain programs, like VLC, towards the list that it is activated automatically when those apps are running. You can add activate it for Flash video or Quake Live.


LightsOn script

Unless the Caffeine app, the LightsOn script is a script you must run manually. By default, it checks Mplayer, Minitube and VLC to see if it is playing any video, and Firefox or Chromium whether it can be running flash video full screen. When the check returns true, it'll disable the screensaver and power management so that it won’t get into sleep or dim the screen brightness.

There is not any installation required. All you need to do is to download the script from the Github page make the “’ script in your Home folder. Whenever you want to operate it, merely employ the command:

./ xx

where “xx” is the time in seconds you want the script to check for active video or full screen mode.

The difference between Caffeine and is the fact that Caffeine detects application by its process ID while LightsOn checks to the window class. In addition, Caffeine is activated when the app is running (regardless whether it can be playing video, or perhaps in full screen, or otherwise not) while LightsOn is just activated if this detects the application form AND it's running entirely screen mode. Nevertheless, they have got the same functionality.

Note: Ubuntu doesn’t feature any screensaver installed, so LightsOn will show a “No screensaver detected” message. It will still work to prevent the power management to help.

What alternative methods do you use to avoid your Ubuntu from sleeping?

Title Post: Prevent Ubuntu From Going to Sleep While Watching Video
Rating: 100% based on 99998 ratings. 5 user reviews.
Author: SharedTutor

Thank you for visiting, If there is criticism and suggestions please leave a comment

About The Author

Someone who always wanted to know about the beauty of the world :)