From cd0da096ab2f5d5de4c88f8690a14b2ec1701a8e Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 6 Oct 2016 12:59:25 +0200 Subject: run-nxproxy2nxagent-over-network: New test script that tests nxproxy/nxagent connectivity between networked hosts. --- testscripts/run-nxproxy2nxagent-over-network | 149 +++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100755 testscripts/run-nxproxy2nxagent-over-network (limited to 'testscripts/run-nxproxy2nxagent-over-network') diff --git a/testscripts/run-nxproxy2nxagent-over-network b/testscripts/run-nxproxy2nxagent-over-network new file mode 100755 index 000000000..3b80f3a01 --- /dev/null +++ b/testscripts/run-nxproxy2nxagent-over-network @@ -0,0 +1,149 @@ +#!/bin/bash + +#/**************************************************************************/ +#/* */ +#/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */ +#/* Copyright (c) 2015-2016 Mike Gabriel */ +#/* */ +#/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ +#/* are copyright of NoMachine. Redistribution and use of the present */ +#/* software is allowed according to terms specified in the file LICENSE */ +#/* which comes in the source distribution. */ +#/* */ +#/* Check http://www.nomachine.com/licensing.html for applicability. */ +#/* */ +#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* */ +#/* All rights reserved. */ +#/* */ +#/**************************************************************************/ + +# +# Uncomment this to enable echo. +# +#set -x +# + +ulimit -c unlimited + +NXPROXYBIN=nxproxy +NXAGENTBIN=nxagent + +### +### Adapt to your needs: NXAGENT_HOST, NXPROXY_HOST +### +### This script has to run on the NXAGENT_HOST on the NXPROXY_HOST you +### have to execute code by copy+pasting command lines... +### +### (Instructions for copy+pasting are given when this script has been launched). +### +NXAGENT_HOST=127.0.0.1 # (e.g. 192.168.1.1, this scripts is launched on this machine) +NXPROXY_HOST=127.0.0.1 # (e.g. 192.168.1.2, you want to connect nxproxy -> nxagent from this machine) + +NX_PORT=9 + +NX_SYSTEM=${HOME}/.nx + +NX_ROOT=${HOME}/.nx + +# +# This should be randlomly generated. +# +#NX_COOKIE=`xauth list |grep "${HOSTNAME}/unix:\<${NX_PORT}\>" | grep MIT | cut -f 5 -d ' '` +NX_COOKIE=123efa980d2cba234ef6f73deac810ff + +# +# Create the directories for the NX session. +# + +rm -rf ${NX_ROOT}/C-${NX_PORT} || exit +mkdir -p ${NX_ROOT}/C-${NX_PORT} || exit + +rm -rf ${HOME}/.nx/S-${NX_PORT} || exit +mkdir -p ${HOME}/.nx/S-${NX_PORT} || exit + +# +# Set the path to libraries and NX executables. +# + +LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${HOME}/NX/nxcomp:${HOME}/NX/nxcompext:${HOME}/NX/nx-X11/exports/lib" +export LD_LIBRARY_PATH + +PATH="${PATH}:${HOME}/NX/nxclient/nxclient:${HOME}/NX/nx-X11/programs/Xserver/" +export PATH + +# +# Create the fake cookie for this display. +# + +echo -ne "Creating the X authorization cookie.\n" + +xauth add ${NXPROXY_HOST}/unix:${NX_PORT} MIT-MAGIC-COOKIE-1 ${NX_COOKIE} +xauth add ${NXPROXY_HOST}:${NX_PORT} MIT-MAGIC-COOKIE-1 ${NX_COOKIE} + +# +# Options are written in a file 'options' in the session +# directory. The agent will use the DISPLAY settings, so +# we pass in the DISPLAY the name of the options file. +# +# cache=8M,images=32M,link=modem,type=unix-kde,cleanup=0, +# accept=62.98.198.1,cookie=$NX_COOKIE, +# id=giulietta.nomachine.com-1098-6A4649FD0FCA57FAC275AF3F1C45B10F, +# media=1:1098 +# + +NX_HOST=nx/nx,cache=8192k,link=modem,menu=1,keybd=1,samba=0,cups=0,limit=0,\ +accept=$NXPROXY_HOST,cookie=$NX_COOKIE,errors=${NX_ROOT}/C-${NX_PORT}/session + +echo "${NX_HOST}:${NX_PORT}" >${NX_ROOT}/C-${NX_PORT}/options + +# +# Run the agent. if you don't have a font server running, +# remove the argument "-fp unix/:7100" +# + +NX_AGENT=:${NX_PORT} + +echo -ne "Running the X client side NX agent.\n" + +SAVED_DISPLAY=$DISPLAY + +DISPLAY=nx/nx,options=${NX_ROOT}/C-${NX_PORT}/options:${NX_PORT} +export DISPLAY + +#valgrind -v --num-callers=8 --error-limit=no --trace-children=no \ +#valgrind --num-callers=8 --tool=memcheck --leak-check=yes --show-reachable=yes --track-fds=yes \ +#ldd ${NXAGENTBIN} +${NXAGENTBIN} -name 'NX' -geometry 800x600+100+100 "$@" \ +${NX_AGENT} 2>>${NX_ROOT}/C-${NX_PORT}/session & + +# +# The X server side proxy will forward the connection +# to the original DISPLAY. +# + +DISPLAY=$SAVED_DISPLAY +export DISPLAY + +# +# These are the nxproxy options used to run a typical session. +# +# cookie=$NX_COOKIE,root=/home/pinzari/.nx,media=32824, +# session=kde_on_giulietta,id=giulietta.nomachine.com-1098-6A4649FD0FCA57FAC275AF3F1C45B10F, +# connect=giulietta.nomachine.com:1098 +# + +echo +echo Now... COPY+PASTE the below lines to your local system +echo +echo "--------------8<---------" +#echo NX_HOST=nx/nx,keybd=1,samba=1,cups=1,connect=$NXAGENT_HOST,cookie=$NX_COOKIE,errors=${NX_ROOT}/S-${NX_PORT}/session + +NX_HOST=nx/nx,keybd=1,samba=0,cups=0,connect=tcp:$NXAGENT_HOST:4009,cookie=$NX_COOKIE,errors=${NX_ROOT}/S-${NX_PORT}/session +echo "NX_HOST=$NX_HOST" + +echo "echo \"${NX_HOST}:${NX_PORT}\" >${NX_ROOT}/S-${NX_PORT}/options" + +echo "${NXPROXYBIN} -S nx/nx,options=${NX_ROOT}/S-${NX_PORT}/options:${NX_PORT} 2>>${HOME}/.nx/S-${NX_PORT}/session" +echo "-------------->8---------" +echo -- cgit v1.2.3 From 168c063dcaa8b60a3b6e3e1132416841d48419ea Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Thu, 6 Oct 2016 13:04:25 +0200 Subject: run-nxproxy2nxagent-over-network: Improve comment that describes script usage. Fix commented-out NX_HOST assignment. --- testscripts/run-nxproxy2nxagent-over-network | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'testscripts/run-nxproxy2nxagent-over-network') diff --git a/testscripts/run-nxproxy2nxagent-over-network b/testscripts/run-nxproxy2nxagent-over-network index 3b80f3a01..5ea4b2dc6 100755 --- a/testscripts/run-nxproxy2nxagent-over-network +++ b/testscripts/run-nxproxy2nxagent-over-network @@ -32,13 +32,14 @@ NXAGENTBIN=nxagent ### ### Adapt to your needs: NXAGENT_HOST, NXPROXY_HOST ### -### This script has to run on the NXAGENT_HOST on the NXPROXY_HOST you -### have to execute code by copy+pasting command lines... +### This script launches nxagent and has to be executed on the NXAGENT_HOST. +### On the NXPROXY_HOST you will have to execute nxproxy by copy+pasting +### some command lines... ### ### (Instructions for copy+pasting are given when this script has been launched). ### -NXAGENT_HOST=127.0.0.1 # (e.g. 192.168.1.1, this scripts is launched on this machine) -NXPROXY_HOST=127.0.0.1 # (e.g. 192.168.1.2, you want to connect nxproxy -> nxagent from this machine) +NXAGENT_HOST=127.0.0.1 # (e.g. 192.168.1.1, this scripts is launched on the NXAGENT_HOST machine) +NXPROXY_HOST=127.0.0.1 # (e.g. 192.168.1.2, you want to connect nxproxy -> nxagent from the NXPROXY_HOST machine) NX_PORT=9 @@ -137,8 +138,8 @@ echo echo Now... COPY+PASTE the below lines to your local system echo echo "--------------8<---------" -#echo NX_HOST=nx/nx,keybd=1,samba=1,cups=1,connect=$NXAGENT_HOST,cookie=$NX_COOKIE,errors=${NX_ROOT}/S-${NX_PORT}/session +#NX_HOST=nx/nx,keybd=1,samba=1,cups=1,connect=$NXAGENT_HOST,cookie=$NX_COOKIE,errors=${NX_ROOT}/S-${NX_PORT}/session NX_HOST=nx/nx,keybd=1,samba=0,cups=0,connect=tcp:$NXAGENT_HOST:4009,cookie=$NX_COOKIE,errors=${NX_ROOT}/S-${NX_PORT}/session echo "NX_HOST=$NX_HOST" -- cgit v1.2.3 From 00725f16a64b6e4c61c39d252d656b26dc80a9d2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 7 Nov 2016 12:32:09 +0100 Subject: testscripts: Use non-NoMachine file headers for our testscripts. --- testscripts/run-nxproxy2nxagent-on-localhost | 15 +++++++++------ testscripts/run-nxproxy2nxagent-over-network | 15 +++++++++------ testscripts/run-nxproxy2nxagent-over-sockets | 15 +++++++++------ testscripts/run-nxproxy2nxproxy | 15 +++++++++------ testscripts/run-nxproxy2nxproxy-over-sockets | 15 +++++++++------ testscripts/slave-agent | 15 +++++++++------ testscripts/slave-client | 16 +++++++++------- 7 files changed, 63 insertions(+), 43 deletions(-) (limited to 'testscripts/run-nxproxy2nxagent-over-network') diff --git a/testscripts/run-nxproxy2nxagent-on-localhost b/testscripts/run-nxproxy2nxagent-on-localhost index bb16dfd3c..c7533c711 100755 --- a/testscripts/run-nxproxy2nxagent-on-localhost +++ b/testscripts/run-nxproxy2nxagent-on-localhost @@ -6,16 +6,19 @@ #/* Copyright (c) 2015-2016 Mike Gabriel */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # diff --git a/testscripts/run-nxproxy2nxagent-over-network b/testscripts/run-nxproxy2nxagent-over-network index 5ea4b2dc6..35b67d41d 100755 --- a/testscripts/run-nxproxy2nxagent-over-network +++ b/testscripts/run-nxproxy2nxagent-over-network @@ -6,16 +6,19 @@ #/* Copyright (c) 2015-2016 Mike Gabriel */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # diff --git a/testscripts/run-nxproxy2nxagent-over-sockets b/testscripts/run-nxproxy2nxagent-over-sockets index 651e71b83..8e57db570 100755 --- a/testscripts/run-nxproxy2nxagent-over-sockets +++ b/testscripts/run-nxproxy2nxagent-over-sockets @@ -6,16 +6,19 @@ #/* Copyright (c) 2015-2016 Mike Gabriel */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # diff --git a/testscripts/run-nxproxy2nxproxy b/testscripts/run-nxproxy2nxproxy index 952fb3e96..305d921c2 100755 --- a/testscripts/run-nxproxy2nxproxy +++ b/testscripts/run-nxproxy2nxproxy @@ -8,16 +8,19 @@ set -e #/* Copyright (c) 2015-2016 Mike Gabriel */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # diff --git a/testscripts/run-nxproxy2nxproxy-over-sockets b/testscripts/run-nxproxy2nxproxy-over-sockets index ae9642681..0cc209377 100755 --- a/testscripts/run-nxproxy2nxproxy-over-sockets +++ b/testscripts/run-nxproxy2nxproxy-over-sockets @@ -8,16 +8,19 @@ set -ex #/* Copyright (c) 2015-2016 Mike Gabriel */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # diff --git a/testscripts/slave-agent b/testscripts/slave-agent index e3ce220f2..2f22c187a 100755 --- a/testscripts/slave-agent +++ b/testscripts/slave-agent @@ -4,16 +4,19 @@ #/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ # This is a test script for the slave channel feature. While there are no diff --git a/testscripts/slave-client b/testscripts/slave-client index b1599cd2f..4ce75f45f 100755 --- a/testscripts/slave-client +++ b/testscripts/slave-client @@ -4,18 +4,20 @@ #/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ #/* */ #/* NXSCRIPTS, NX protocol compression and NX extensions to this software */ -#/* are copyright of NoMachine. Redistribution and use of the present */ -#/* software is allowed according to terms specified in the file LICENSE */ -#/* which comes in the source distribution. */ +#/* are copyright of the aforementioned persons and companies. */ #/* */ -#/* Check http://www.nomachine.com/licensing.html for applicability. */ -#/* */ -#/* NX and NoMachine are trademarks of Medialogic S.p.A. */ +#/* Redistribution and use of the present software is allowed according */ +#/* to terms specified in the file LICENSE.nxcomp which comes in the */ +#/* source distribution. */ #/* */ #/* All rights reserved. */ #/* */ +#/* NOTE: This software has received contributions from various other */ +#/* contributors, only the core maintainers and supporters are listed as */ +#/* copyright holders. Please contact us, if you feel you should be listed */ +#/* as copyright holder, as well. */ +#/* */ #/**************************************************************************/ -# use strict; use Getopt::Long; -- cgit v1.2.3