Home > Media Player > Disable screensaver when XBMC starts

Disable screensaver when XBMC starts

I always got frustrated when I tried running XBMC on my ubuntu laptop and forgot to turn off the screensaver. Finally I found some information about how to solve this problem here.

The solution is to create a bash script that disables the screensaver and the power management, then it runs XBMC and when it’s complete it will re-enable the screensaver and power management.

I have been storing a bunch of custom scripts in my documents folder. You’ll have to have the folders already created and then you can make the file and edit it with the following command.

gedit ~/Documents/Scripts/xbmc.sh

Now insert the following into the xbmc.sh file.

#!/bin/sh
 
#Disable Screensaver
gconftool-2 --set /apps/gnome-screensaver/idle_activation_enabled --type bool FALSE
 
#Disable PowerManager
gconftool-2 --set /apps/gnome-powermanager/idle_activation_enabled --type bool FALSE
 
# Start XBMC
xbmc
 
# Enable ScreenSaver when XBMC closes
gconftool-2 --set /apps/gnome-screensaver/idle_activation_enabled --type bool TRUE
 
# Enable PowerManager when XBMC closes
gconftool-2 --set /apps/gnome-powermanager/idle_activation_enabled --type bool TRUE

If you share the scripts and want everyone to be able to run it, then you may want to change the permissions on it.

sudo chmod 555 /etc/xbmc/xbmc.sh
Categories: Media Player Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.