aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-06-25 05:04:12 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-09-28 07:53:07 +0200
commit8365e22bb3b5de16389adf0509889b6c65ec5940 (patch)
treeedf376bb6f3e499376e198016deb7736e3de7220
parent7dc263333f7e5e7f10c782ed0852c38dc9a8fc62 (diff)
downloadnx-libs-8365e22bb3b5de16389adf0509889b6c65ec5940.tar.gz
nx-libs-8365e22bb3b5de16389adf0509889b6c65ec5940.tar.bz2
nx-libs-8365e22bb3b5de16389adf0509889b6c65ec5940.zip
doc/examples/run-nxproxy2nxproxy-test: Create NX_COOKIE dynamically using the mcookie tool.
-rwxr-xr-xdoc/examples/run-nxproxy2nxproxy-test7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/examples/run-nxproxy2nxproxy-test b/doc/examples/run-nxproxy2nxproxy-test
index b7bf64d0f..fd4d6e373 100755
--- a/doc/examples/run-nxproxy2nxproxy-test
+++ b/doc/examples/run-nxproxy2nxproxy-test
@@ -40,9 +40,10 @@ mkdir -p "${NX_ROOT}"
# This should be randlomly generated.
#
-#NX_COOKIE=`xauth list |grep "${HOSTNAME}/unix:\<${NX_PORT}\>" | grep MIT | cut -f 5 -d ' '`
-NX_COOKIE=123efa980d2cba234ef6f73deac810ff
-
+NX_COOKIE=`xauth -n list |grep "${HOSTNAME}/unix:${NX_PORT}" | grep MIT | cut -f 5 -d ' ' | head -n1`
+if [ -z "$NX_COOKIE" ]; then
+ NX_COOKIE=`mcookie`
+fi
#
# Create the directories for the NX session.