Index: configure
===================================================================
--- configure	(revision 6733)
+++ configure	(working copy)
@@ -60,6 +60,7 @@
 PROFILEFLAGS=""
 proc_opt="no"
 dvd="yes"
+xss="no"
 v4l="no"
 frontend="yes"
 backend="no"
@@ -134,6 +135,7 @@
 echo "  --disable-audio-arts     disable aRts audio support"
 echo "  --disable-audio-jack     disable JACK audio support"
 echo "  --disable-dvd            disable native DVD playback"
+echo "  --enable-xss             enable XScreenSaver support"
 echo "  --disable-frontend       disable frontend [breaks dependency checking]"
 echo "  --disable-backend        disable backend  [breaks dependency checking]"
 #echo "  --disable-audio-beos     disable BeOS audio support [default=no]"
@@ -745,6 +747,10 @@
   ;;
   --disable-dvd) dvd="no"
   ;;
+  --enable-xss) xss="yes"
+  ;;
+  --disable-xss) xss="no"
+  ;; 
   --enable-frontend) frontend="yes"
   ;;
   --disable-frontend) frontend="no"
@@ -1990,6 +1996,7 @@
 
 echo "# Misc Features"
 echo "DVD playback     $dvd"
+echo "XScreenSaver     $xss" 
 echo "Frontend         $frontend"
 echo "Backend          $backend"
 echo
@@ -2517,7 +2524,10 @@
   echo "CONFIG_DVD_LIBS=-ldvdnav" >> $MYTH_CONFIG_MAK
 fi
 
-
+if test x"$xss" = x"yes" ; then
+  CCONFIG="$CCONFIG using_xss"
+fi
+   
 if test x"$xrandr" = x"yes" ; then
   CCONFIG="$CCONFIG using_xrandr"
 fi
Index: libs/libmyth/screensaver-x11.cpp
===================================================================
--- libs/libmyth/screensaver-x11.cpp	(revision 6733)
+++ libs/libmyth/screensaver-x11.cpp	(working copy)
@@ -8,7 +8,32 @@
 }
 
 #include "mythcontext.h"
+#include "util.h"
 
+ScreenSaverXSSTimer::ScreenSaverXSSTimer() 
+{
+    resetTimer = new QTimer();
+    connect(resetTimer, SIGNAL(timeout()), this, SLOT(resetSlot()));
+}
+
+ScreenSaverXSSTimer::~ScreenSaverXSSTimer() 
+{
+    if (resetTimer)
+    {
+        delete resetTimer;
+    }
+}
+
+void ScreenSaverXSSTimer::resetXSS() 
+{
+    myth_system(QString("xscreensaver-command -deactivate >&- 2>&- &")); 
+}
+
+void ScreenSaverXSSTimer::resetSlot() 
+{
+    resetXSS();
+}
+
 class ScreenSaverX11Private 
 {
     struct 
@@ -27,11 +52,18 @@
 ScreenSaverX11::ScreenSaverX11() 
 {
     d = new ScreenSaverX11Private();
+#ifdef USE_XSS
+    t = new ScreenSaverXSSTimer();
+    t->timeoutInterval = 60000;
+#endif
 }
 
 ScreenSaverX11::~ScreenSaverX11() 
 {
     delete d;
+#ifdef USE_XSS
+    delete t;
+#endif
 }
 
 void ScreenSaverX11::Disable(void) 
@@ -63,6 +95,14 @@
             VERBOSE(VB_GENERAL, "Disable DPMS");
         }
     }
+
+#ifdef USE_XSS
+    if (t->resetTimer->isActive())
+    {
+        t->resetTimer->stop();
+    }
+    t->resetTimer->start(t->timeoutInterval, FALSE);
+#endif
 }
 
 void ScreenSaverX11::Restore(void) 
@@ -84,10 +124,19 @@
             VERBOSE(VB_GENERAL, "Enable DPMS");
         }
     }
+
+#ifdef USE_XSS
+    if (t->resetTimer->isActive())
+    {
+        t->resetTimer->stop();
+    }
+#endif
 }
 
 void ScreenSaverX11::Reset(void) 
 {
     XResetScreenSaver(qt_xdisplay());
+#ifdef USE_XSS
+    t->resetXSS();
+#endif
 }
-
Index: libs/libmyth/libmyth.pro
===================================================================
--- libs/libmyth/libmyth.pro	(revision 6733)
+++ libs/libmyth/libmyth.pro	(working copy)
@@ -138,6 +138,10 @@
     SOURCES += audiooutputdx.cpp
 }
 
+using_xss {
+    DEFINES += USE_XSS
+}
+
 using_x11 {
     HEADERS += screensaver-x11.h
     SOURCES += screensaver-x11.cpp
Index: libs/libmyth/screensaver-x11.h
===================================================================
--- libs/libmyth/screensaver-x11.h	(revision 6733)
+++ libs/libmyth/screensaver-x11.h	(working copy)
@@ -3,6 +3,24 @@
 
 #include "screensaver.h"
 
+#include <qobject.h> 
+#include <qtimer.h> 
+
+class ScreenSaverXSSTimer : public QObject
+{
+    Q_OBJECT
+public:
+    ScreenSaverXSSTimer();
+    ~ScreenSaverXSSTimer();
+    void resetXSS(void);
+    int timeoutInterval;
+    QTimer *resetTimer;
+        
+private slots:
+    void resetSlot();
+
+};
+
 class ScreenSaverX11 : public ScreenSaverControl
 {
 public:
@@ -15,6 +33,7 @@
 
 protected:
     class ScreenSaverX11Private *d;
+    class ScreenSaverXSSTimer *t;
 };
 
 #endif // MYTH_SCREENSAVER_X11_H
