kanotix.com

Installation, Einstellungen, Systempflege - Screensaver not working

pinkfloydfan - 30.05.2013, 03:54 Uhr
Titel: Screensaver not working
Great job on this distribution. best so far I have tried and believe me I have tried just about all of them. I just have one minor inconvenience. I cannot get the screensaver to activate. Would some one plkease assist me. THANK YOU!
Kano - 30.05.2013, 08:01 Uhr
Titel: Screensaver not working
There is no screensaver preinstalled. The only way to save energy is a blank screen. But you can certainly install kscreensaver{-xsaver} later.
MarcusMoeller - 31.05.2013, 07:35 Uhr
Titel: xscreensaver
I personally prefer xscreensaver, as with kscreensaver, the screen blanks even when applications like VLC are running.

Installation on KDE is a bit tricky bit here is how it goes:

As root:

Code:
apt-get install xscreensaver


As user:

create a file ~/.kde/Autostart/xscreensaver.desktop with the following content:

Code:
#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=xscreensaver -no-splash
Name=XScreenSaver
Type=Application
X-KDE-StartupNotify=false


Within the Power Management KDE systemsettings / Engergy Saving Settings disable 'Dim Display' and 'Screen Energy Saving' On AC, On Battery and On Low Battery. I personally also set Button Event Handling on Lid Close to Sleep, but that's up to you.

Within Advanced Settings disable 'Lock Screen on Resume' as we want xscreensaver to handle that.

Afterwards open xscreensaver settings. It might complain that the service is not running, as we did not start it yet. Just let it start the service for you.

I would suggest to select: Blank Screen only as mode and set Blank after and Cycle after both to 8 min. If you want your screen to be locked, you can select 'Lock Screen after' e.g. 1 minute.

Within the advanced section, enable Power Management and set e.g. Standby after 10 minutes, Suspend after 0, off after 15 minutes. These are just Best-Practice values and you can adjust them according to your needs. Disable 'Fade to black on Blanking' as that's necessary for Resume which we will configure later.

To allow Screen Locking using Ctrl+Alt+Lwith xscreensaver go to Shortcuts in KDE systemsettings, select Edit / New / Global Shortcut / Command -URL. You can define a comment (e.g. XScreenSaver) and set a trigger (e.g. Ctrl + Alt + L). I might complain that it's already assigned. Just re-assign it. As action, please set:

Code:
xscreensaver-command -lock


To finish this up, we want the screen to be locked on resume. As root: Please create a file /etc/pm/sleep.d/00lockscreen with the following content:

Code:
#!/bin/sh
# XScreensaver should be called BEFORE going to sleep to avoid the desktop
# to be shown for a few seconds when the system resumes from sleep.

IS_ACTIVE="$( pidof /usr/bin/xscreensaver )"

case "$1" in
  hibernate|suspend)
   # check if xscreensaver is running. if not, just skip on.
   if [ -z "$IS_ACTIVE" ]
      then :
   else
      # run the lock command as the user who owns xscreensaver process,
      # and not as root, which won't work.
      su "$( ps aux | grep xscreensaver | grep -v grep | grep $IS_ACTIVE | awk '{print $1}' )" \
      -c "/usr/bin/xscreensaver-command -lock" &
      sleep 1
        fi
   ;;
  *)
    exit 0;;
esac


And make it executable using chmod +x /etc/pm/sleep.d/00lockscreen

That's all. After re-login you might be promted if the startup of xscreensaver should be allowed. Please confirm it. You should have a fully working xscreensaver setup with KDE now.
Kano - 31.05.2013, 12:44 Uhr
Titel: xscreensaver
Why dont you use the kscreensaver-xsaver wrapper package?
MarcusMoeller - 31.05.2013, 18:02 Uhr
Titel: xscreensaver
The wrapper only allows to use xscreensaver savers in kscreensaver. It does not solve the power management problems.
Kano - 31.05.2013, 19:31 Uhr
Titel: xscreensaver
You can configure that inside KDE, whats the huge deal?
MarcusMoeller - 05.06.2013, 16:02 Uhr
Titel: xscreensaver
Yes, but as I mentioned in my post, the KDE power management settings do not work well with VLC. Even if 'disable screensaver' and 'disable powermanagement' is set in VLC, the screen will blank (which is not very funny while watching a movie).

Dragonplayer works fine, but I personally prefer VLC over that.
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007