I apologize in advance if it is inappropriate to send unsolicited patches
directly to the x2go-dev list but I tried submitting this patch to
[email protected] and received the following bounce:

< [email protected] <mailto:[email protected]> > (expanded from <
[email protected] <mailto:[email protected]> >): unknown user:  "bugs"

Note, this patch is actually slightly modified from the one I attempted to
send to [email protected] in that it uses my preferred email address.  I'm
really not familiar with the Debian packaging system so I hope I got the
/etc/x2go/x2goagent.conf placement correct so that it doesn't get
overwritten on upgrades.

Regards,

Shelby Cain
From 7549e84848da5b86fd7781e766df3e9c79fffbd4 Mon Sep 17 00:00:00 2001
From: Shelby Cain <[email protected]>
Date: Fri, 20 Apr 2012 09:35:39 -0500
Subject: [PATCH] Add support for configuring SSH_PORT via
 /etc/x2go/x2goagent.conf

This patch adds support for configuring the x2go agent SSH_PORT.
Currently, without changing the SSH_PORT variable in the x2gostartagent
script directly it is impossible to connect to multiple distinct x2go
servers from multiple distinct client instances on the same machine.
---
 x2goserver/bin/x2gostartagent |    6 +++++-
 x2goserver/etc/x2goagent.conf |    1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 x2goserver/etc/x2goagent.conf

diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index 739a0c2..31d5ad2 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -25,7 +25,11 @@ X2GO_LIB_PATH=`echo -n \$(x2gobasepath)/lib/x2go`
 $X2GO_LIB_PATH/x2gosyslog "$0" "info" "$(basename $0) called with options: $@"
 
 X2GO_PORT=49 #First port for X2GO=50
-SSH_PORT=30000 #First ssh port 30001
+if [ -f /etc/x2go/x2goagent.conf ]
+then
+    SSH_PORT=`cat /etc/x2go/x2goagent.conf | awk -F= '{print $2}'`
+fi
+SSH_PORT=${SSH_PORT:-"30000"} #First ssh port 30001
 
 X2GO_ROOT="${HOME}/.x2go"
 REMOTE=localhost
diff --git a/x2goserver/etc/x2goagent.conf b/x2goserver/etc/x2goagent.conf
new file mode 100644
index 0000000..3f66ebe
--- /dev/null
+++ b/x2goserver/etc/x2goagent.conf
@@ -0,0 +1 @@
+SSH_PORT=30000
-- 
1.7.10

_______________________________________________
X2Go-Dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/x2go-dev

Reply via email to