summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot2011-06-03 16:57:04 +0200
committerroot2011-06-03 16:57:04 +0200
commit695131bd3f9b749fbcd7f6467eafdfa736fe6f68 (patch)
treeb33b9f2b8bdb094dabac23da6863b1de8b88bac1
parent[PVSGUI] Disable screensaver on connection (diff)
downloadpvs-695131bd3f9b749fbcd7f6467eafdfa736fe6f68.tar.gz
pvs-695131bd3f9b749fbcd7f6467eafdfa736fe6f68.tar.xz
pvs-695131bd3f9b749fbcd7f6467eafdfa736fe6f68.zip
[PVS] VNCpasswd bug fixed
-rwxr-xr-xmisc/pvs-vncsrv12
-rw-r--r--src/core/pvsConnectionManager.cpp2
2 files changed, 8 insertions, 6 deletions
diff --git a/misc/pvs-vncsrv b/misc/pvs-vncsrv
index fa00303..4d0a0de 100755
--- a/misc/pvs-vncsrv
+++ b/misc/pvs-vncsrv
@@ -20,17 +20,19 @@
# -----------------------------------------------------------------------------
# parameters for x11vnc
-X11VNC_PARAMS="-bg -forever -repeat -display :0 -passwdfile rm:$HOME/.pvs/vncpasswd -o $HOME/.pvs/log.vncsrv -shared"
+X11VNC_PARAMS="-bg -forever -repeat -display :0 -passwdfile rm:/tmp/vncpasswd -o $HOME/.pvs/log.vncsrv -shared"
X11VNC_X11="0"
# at the moment the poolVSClient is expected to use the ~/.pvs directory
[ -d ~/.pvs ] || mkdir ~/.pvs
# write the password file
+touch /tmp/vncpasswd
+chmod 600 /tmp/vncpasswd
if [ -z "$4" ]; then
- echo -e "__BEGIN_VIEWONLY__\n$3" > ~/.pvs/vncpasswd
+ echo -e "__BEGIN_VIEWONLY__\n$3" > /tmp/vncpasswd
else
- echo -e "$4\n__BEGIN_VIEWONLY__\n$3" > ~/.pvs/vncpasswd
+ echo -e "$4\n__BEGIN_VIEWONLY__\n$3" > /tmp/vncpasswd
fi
# find xauthority file
@@ -74,8 +76,8 @@ case "$1" in
[ -z "$2" -o -z "$3" ] && echo " Port and/or Password not set" \
>>~/.pvs/log.vncsrv
echo "$2 $3" >>~/.pvs/log.test
- if [ ! -f ~/.pvs/vncpasswd ]; then
- echo " Start FAILED (~/.pvs/vncpasswd not found)" >>~/.pvs/log.vncsrv
+ if [ ! -f /tmp/vncpasswd ]; then
+ echo " Start FAILED (/tmp/vncpasswd not found)" >>~/.pvs/log.vncsrv
echo " Create it manualy and retry starting x11vnc" >>~/.pvs/log.vncsrv
exit 2;
fi
diff --git a/src/core/pvsConnectionManager.cpp b/src/core/pvsConnectionManager.cpp
index 703d1c4..7aa7233 100644
--- a/src/core/pvsConnectionManager.cpp
+++ b/src/core/pvsConnectionManager.cpp
@@ -211,7 +211,7 @@ void PVSConnectionManager::onCommand(PVSMsg command)
ConsoleLog writeError("[Client: " + id + ", VNCSRV] Server returned general error");
break;
case 2:
- ConsoleLog writeError("[Client: " + id + ", VNCSRV] ~/.pvs/vncpasswd not found");
+ ConsoleLog writeError("[Client: " + id + ", VNCSRV] /tmp/vncpasswd not found");
break;
case 3:
ConsoleLog writeError("[Client: " + id + ", VNCSRV] VNC-Script not found");