--- osdep.c.default     2014-05-12 22:00:49 +0200
+++ osdep.c     2014-05-12 22:00:37 +0200
@@ -344,6 +344,24 @@
 int getXmingPort(int firstfree)
 {
     while (firstfree >= 6000) {
+        // Start with x and count down until you find an a server.
+        //  by default vcxsrv.exe is running on 6000
+        //  Test for the active port and return.
+        int fd;
+        int val;
+        struct sockaddr_in dest;
+        fd = socket(AF_INET, SOCK_STREAM,0);
+        memset(&dest, 0, sizeof(dest));
+        dest.sin_family = AF_INET;
+        dest.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+        dest.sin_port = htons(firstfree);                /* set destination port number */
+        if ( connect(fd, (struct sockaddr *)&dest, sizeof(dest)) >= 0){
+            printf("getXmingPort: Connected to %d\n",  firstfree);
+            return firstfree;
+        } else {
+            //printf("getXmingPort:Failed to connect to %d\n", firstfree);
+        }
+            
         int dpy = firstfree - 6000;
         char name[MAX_PATH];
         snprintf(name, sizeof(name), "Global\\XMING_DISPLAY:%d", dpy);

When applied, the above patch will allow opennx to use vcxsrv.  This prevents issue when running x2go from the same window box.   



I still can not get the full project to build.  I have a work around that allows me to work for now. 
I need to document the patches so I will have a full write up when I get a chance.
for now, If it put the pulse header files in the package path. I can make opennx.exe and tracelog.exe.

patch
make opennx.exe

to fix the following:
c:/opennx/tmp/729/opennx/osdep.c:353: undefined reference to `_socket@12'
c:/opennx/tmp/729/opennx/osdep.c:356: undefined reference to `_htonl@4'
c:/opennx/tmp/729/opennx/osdep.c:357: undefined reference to `_htons@4'
c:/opennx/tmp/729/opennx/osdep.c:358: undefined reference to `_connect@12

add -lws2_32

 /bin/sh ./libtool --tag=CXX --silent  --mode=link g++ -I/usr/lib/wx/include/msw-unicode-debug-2.8 -I/usr/include/wx-2.8 -D__WXDEB
UG__ -DWXUSINGDLL -D__WXMSW__ -mthreads -g -O2  -L/usr/lib -L/usr/lib -o opennx.exe opennx-AboutDialog.o opennx-AsyncProcess.o open
nx-LibOpenSC.o opennx-CardWaiterDialog.o opennx-ConnectDialog.o opennx-ExtHtmlWindow.o opennx-ForeignFrame.o opennx-Icon.o opennx-L
ogDialog.o opennx-KeyDialog.o opennx-LibUSB.o opennx-LoginDialog.o opennx-mylog.o opennx-md5.o opennx-MyIPC.o opennx-MyDynlib.o ope
nnx-MySession.o opennx-MyValidator.o opennx-MyWizard.o opennx-MyXmlConfig.o opennx-opennxApp.o opennx-osdep.o opennx-PanicDialog.o 
opennx-pwcrypt.o opennx-ProxyPasswordDialog.o opennx-PulseAudio.o opennx-QuitDialog.o opennx-RdpImageSettingsDialog.o opennx-RdpPro
pertyDialog.o opennx-ResumeDialog.o opennx-ProxyPropertyDialog.o opennx-SessionAdmin.o opennx-SessionList.o opennx-SessionPropertie
s.o opennx-SimpleXauth.o opennx-ShareProperties.o opennx-TextViewer.o opennx-UnixImageSettingsDialog.o opennx-UsbFilterDetailsDialo
g.o opennx-UsbIp.o opennx-VncImageSettingsDialog.o opennx-VncPropertyDialog.o opennx-wxprec.o opennx-WinShare.o opennx-X11PropertyD
ialog.o opennx-xh_richtext.o opennx-MacOSX.o opennx-WrappedStatic.o opennx-SupressibleMessageDialog.o opennx-XdmPropertyDialog.o op
ennx.o -mthreads  -Wl,--subsystem,windows -mwindows -lwx_mswud_xrc-2.8 -lwx_baseud_xml-2.8 -lwx_mswud_richtext-2.8 -lwx_mswud_html-
2.8 -lwx_mswud_adv-2.8 -lwx_mswud_core-2.8 -lwx_baseud_net-2.8 -lwx_baseud-2.8     -lole32 -luuid -lversion -lws2_32


start  tracelog.exe and then run the following:
opennx --trace=SessionProperties --trace=MySession --verbose
 


--

Nicholas.A.Schembri
Pittsburgh PA, USA