summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohann Latocha2011-06-02 17:39:09 +0200
committerJohann Latocha2011-06-02 17:39:09 +0200
commit36b04887d8a6930ca32d2aceed24a1f9cafc1c8f (patch)
tree7a46796adeae3c0060576d7abfafb758cd839735
parentDefect #819 (diff)
downloadpvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.tar.gz
pvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.tar.xz
pvs-36b04887d8a6930ca32d2aceed24a1f9cafc1c8f.zip
[PVSGUI] Disable screensaver on connection
-rwxr-xr-xmisc/pvs-vncsrv2
-rw-r--r--src/pvsgui.cpp11
2 files changed, 12 insertions, 1 deletions
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()