Oct 16


Please see the article “Build a Linux-based Infrastructure Solution Demonstration Series” (http://blogs.czapski.id.au/2016/10/build-a-linux-based-infrastructure-solution-demonstration-series) for rationale, introduction and links to articles in this series.

In this article we are creating a script to disable the screen saver and other delays in the CentOS 6.8 desktop, and appending it to the initial create configuration script which we are incrementally building for the second and subsequent images.


This article assumes that

  1. The work is done in the Virtual Box Machine Image created in accordance with the instructions in the blog article to be found at http://blogs.czapski.id.au/2016/10/configure-virtual-box-virtual-machine-and-install-centos-6-8-base-image.

The instructions should work in other RedHat 6-like OS’ and OS versions.

Disable screensaver and other delays

The commands in the script below will disable screensaver and other delays in the Gnome 2 desktop.

Remember that all this can be done using the relevant UIs but my objective is to create configuration scripts which I can execute and have the demo image configured without having to tediously manipulate various UIs.

mkdir -p /media/sf_distros/scripts
cat <<-'EODECK' > /media/sf_distros/scripts/002_disable_screen_saver_and_delays.sh
# disable screen saver and other delays
gconftool-2 -s -t bool /apps/gnome-screensaver/idle_activation_enabled false
gconftool-2 -s -t bool /apps/gnome-screensaver/lock_enabled false
gconftool-2 -s -t int /apps/gnome-screensaver/idle_delay 0
gconftool-2 -s -t int /apps/gnome-screensaver/logout_delay 0
gconftool-2 -s -t int /apps/gnome-screensaver/cycle_delay 0

chmod ug+x /media/sf_distros/scripts/002_disable_screen_saver_and_delays.sh

Execute the commands


Append “disable screensaver and other delays” script execution commands to the initial bulk configuration script. This script is intended to collect all automated configuration commands and scripts so that they can be all executed in one go on a brand new image if one gets to do this the second and subsequent times.

Don’t actually execute this script while you are building the first image.

cat <<-'EODECK' >> /media/sf_distros/scripts/000_initial_bulk_configuration.sh
# disable screen saver and other delays

chmod ug+x /media/sf_distros/scripts/000_initial_bulk_configuration.sh
preload preload preload