aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/run-nxproxy2nxproxy-test
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-06-25 05:04:47 +0200
commite7f3187eef55e4aadb38bbd87af2fa382c09e334 (patch)
tree27615e66b5d9af8d0afb6109c3bc1f5dbee864d5 /doc/examples/run-nxproxy2nxproxy-test
parent32bbe01ddf9e3cd8edf1ecefc72a3cc1dbfa97b8 (diff)
downloadnx-libs-e7f3187eef55e4aadb38bbd87af2fa382c09e334.tar.gz
nx-libs-e7f3187eef55e4aadb38bbd87af2fa382c09e334.tar.bz2
nx-libs-e7f3187eef55e4aadb38bbd87af2fa382c09e334.zip
doc/examples/run-nxproxy2nxproxy-test: Create NX_COOKIE dynamically using the mcookie tool.
Diffstat (limited to 'doc/examples/run-nxproxy2nxproxy-test')
-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.