Background
There are 2 solutions that were determined for this particular problem. The 1st involved launching xscreensaver
, and disabling it so that no screensaver is configured.
The 2nd method involved completely disabling the screensaver in X altogether, through the use of the xset
command.
Solution #1
A solution with a narrow scope (by cipricus) is that of adding a fourth step to those included in the answer.
- Install xscreensaver
- Remove gnome-screensaver
- Set Xscreensaver NOT to use any screensaver ('Disable screensaver')
Add xscreensaver in the startup programs list. The command to add is:
xscreensaver -no-splash
This solution was suggested by the fact that this message appeared when starting xscreensaver
before adding the fourth step:
Further instructions came from this source.
NOTE: To add a program to startup list in eOS, go to System Settings > Stertup Applications > Add
Solution #2
A solution with a wider scope by slm:
xset
Check to see what the xset
setting is for screen blanking as well. You can check using this command:
$ xset q
We're specifically interested in this section of the output from the above command:
$ xset q
...
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 600 cycle: 600
...
Disabling screensaver
You can change these settings like this:
$ xset s off
$ xset s noblank
Confirm by running xset q
again:
$ xset q
...
Screen Saver:
prefer blanking: no allow exposures: yes
timeout: 0 cycle: 600
...
DPMS
You might also need to disable power management as well, that's the DPMS settings in the xset q
output:
$ xset q
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On
...
Disable it like so:
$ xset -dpms
Confirm:
$ xset q
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Disabled
...
Re-enabling features
You can re-enable these features at any time with these commands
$ xset s blank # blanking screensaver
$ xset s 600 600 # five minute interval
$ xset +dpms # enable power management
Confirming changes:
$ xset q
...
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 600 cycle: 600
...
...
DPMS (Energy Star):
Standby: 0 Suspend: 0 Off: 0
DPMS is Enabled
Monitor is On
...
Turning off screen after a specified period of inactivity can be achieved by at least 2 methods: either using xset
DPMS features or a screensaver such as xscreensaver
or gnome-screensaver
.
Xset:
First, check whether your hardware supports DPMS:
$ xset dpms force standby
Your display should go blank. Apart from standby
you can also try suspend
and off
. If you know that your HW supports DPMS you can tell xset
to activate DPMS after a number of seconds (from man xset
):
When numerical values are given, they set the inactivity period (in
units of seconds) before the three modes are activated. The first
value given is for the standby' mode, the second is for the
suspend'
mode, and the third is for the `off' mode.
So, doing that will make your display go blank after 3 seconds of inactivity:
$ xset dpms 3 3 3
Run this command and wait for 3 seconds. This setting is not retained across reboots so if it works, you can add this line to your X startup script such as ~/.xinitrc
or your window manager startup script. Notice that turning off a display with DPMS will not lock the screen, you need to use an external screensaver for that.
screensaver
There are many screensavers to choose from and most of them has their own config file that is independent of xset
DPMS settings and can lock screens so that you need to know the password to unlock it. Some screensavers, however, may influence DPMS settings. For example, xscreensaver
can override xset
settings.
Unfortunately, I don't use gnome-screensaver
and I have no idea what screensavers are installed by default on RHEL or Debian so I can't help you here but if you're looking for a nice screensaver give xscreensaver
a try. If you also want to run some nice pictures it has a number of screensaver
themes to choose from, it can display video files and is highly customizable. Modify lock
setting in ~/.xscreensaver
by hand or run xscreensaver-demo
to set a period of inactivity after which a screensaver will lock the screen. After making this modification, run xscreensaver
daemon command and wait to see if xscreensaver
works correctly.
X screen saver
There is also an X in-built screensaver that can be activated with x set activate
. Type xset q
and see how long you will have to wait for it to start under Screen Saver
section:
Screen Saver: prefer blanking: yes allow exposures: yes
timeout: 600 cycle: 600
In this case, you would have to wait for 600 seconds.
Run it now:
$ xset s activate
If you set it with noblank
flag, it will display a pattern set with xsetroot
when activated:
$ xset s noblank
$ /usr/bin/xsetroot -solid Green
$ xset s activate
Disable it altogether:
$ xset s off
Best Answer
XServer has its own settings for power management and screen saving functions. From the man page:
Try these commands to completely disable the power management setting for X. Open a terminal and run the following:
If this works for you, to make these settings permanent in one of the files for
.xorg.conf
configuration files. Useman xorg.conf
and pick one of the config file location files.Example xorg.conf settings for these values:
Alternately you can use a
.xinitrc
file if you are usingxinit
to start your X session and just insert thexset
commands from above (my preference).