[X2go-Dev] [PATCH] Make sure the [...] - The right patch!

Moritz Strübe Moritz.Struebe at informatik.uni-erlangen.de
Sat Dec 10 16:50:39 CET 2011


Hi there.

Am 09.12.2011 22:05, John A. Sullivan III schrieb:
> On Fri, 2011-12-09 at 21:53 +0100, Reinhard Tartler wrote:
>> On Fr, Dez 09, 2011 at 18:58:35 (CET), Moritz Struebe wrote:
>>
>>
>> -	if  [ -e "/tmp/.X${X2GO_PORT}-lock" ] || [ -e "/tmp/.X11-unix/X${X2GO_PORT}" ]; then
>> +	#Test if the session is already in use. nxagent uses 6000+DISPLAY to open a port. Therefore this must be tested, too.
>> +	if  [ -e "/tmp/.X${X2GO_PORT}-lock" ] || [ -e "/tmp/.X11-unix/X${X2GO_PORT}" ] || `netstat -ntl | grep ":${X2GO_PORT} "` ; then
>>  		OUTPUT="XXX"

I tested this patch and it worked (opened a listen-port manually), but I
have no idea why, because I forgot to add 6000 to the port number - I
did document it, though. :/ I'll make a new version on Monday.

>>
>>
> What if X2GO_PORT is 6051 and for some reason there is a service
> listening on port 60513? Won't it erroneously match? - John
>
Nope: ":${X2GO_PORT} " <- There is a space behind the "}".

Cheers
Morty



More information about the x2go-dev mailing list