[X2Go-Commits] [nx-libs] 32/53: doc/examples/run-nxproxy2nxproxy-test: Create NX_COOKIE dynamically using the mcookie tool.

git-admin at x2go.org git-admin at x2go.org
Tue Sep 22 15:10:45 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit e7f3187eef55e4aadb38bbd87af2fa382c09e334
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jun 25 05:04:12 2015 +0200

    doc/examples/run-nxproxy2nxproxy-test: Create NX_COOKIE dynamically using the mcookie tool.
---
 doc/examples/run-nxproxy2nxproxy-test |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/examples/run-nxproxy2nxproxy-test b/doc/examples/run-nxproxy2nxproxy-test
index b7bf64d..fd4d6e3 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.

--
Alioth's /srv/git/code.x2go.org/nx-libs.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list