aboutsummaryrefslogtreecommitdiff
path: root/doc/examples
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples')
-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.