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 "}". <snip> Yes, I noticed that in yours -that's why I wondered if we needed to
On Sat, 2011-12-10 at 16:50 +0100, Moritz StrĂ¼be wrote: protect against it being a space in one distro and a \t in another. But I believe the space was missing in Reinhard's suggestion. Thanks - John