From 36b04887d8a6930ca32d2aceed24a1f9cafc1c8f Mon Sep 17 00:00:00 2001 From: Johann Latocha Date: Thu, 2 Jun 2011 17:39:09 +0200 Subject: [PVSGUI] Disable screensaver on connection --- misc/pvs-vncsrv | 2 +- src/pvsgui.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/misc/pvs-vncsrv b/misc/pvs-vncsrv index a8e0621..fa00303 100755 --- a/misc/pvs-vncsrv +++ b/misc/pvs-vncsrv @@ -20,7 +20,7 @@ # ----------------------------------------------------------------------------- # parameters for x11vnc -X11VNC_PARAMS="-bg -forever -display :0 -passwdfile rm:$HOME/.pvs/vncpasswd -o $HOME/.pvs/log.vncsrv -shared" +X11VNC_PARAMS="-bg -forever -repeat -display :0 -passwdfile rm:$HOME/.pvs/vncpasswd -o $HOME/.pvs/log.vncsrv -shared" X11VNC_X11="0" # at the moment the poolVSClient is expected to use the ~/.pvs directory diff --git a/src/pvsgui.cpp b/src/pvsgui.cpp index 5359449..5ae3db6 100644 --- a/src/pvsgui.cpp +++ b/src/pvsgui.cpp @@ -338,6 +338,17 @@ void PVSGUI::connected(QString host) _trayIcon->setIcon(QIcon(":cam_on32.svg")); _trayIcon->setToolTip(tr("Connected to ") + host); } + + // try to disable screensaver + if (QProcess::execute("xscreensaver-command -exit") == 0) + qDebug("xscreensaver disabled"); + else + qDebug("xscreensaver NOT disabled"); + + if (QProcess::execute("gnome-screensaver-command --exit") == 0) + qDebug("gnome-screensaver disabled"); + else + qDebug("gnome-screensaver NOT disabled"); } void PVSGUI::disconnected() -- cgit v1.2.3-55-g7522