Skip site navigation (1)Skip section navigation (2)

ports/138830: net/linux-nx-client TCP_NODELAY problem

From:Koichiro IWAO <meta@club.kyutech.ac.jp>
Date:Tue, 15 Sep 2009 03:20:45 GMT
Subject:linux-nx-client TCP_NODELAY problem
Send-pr version:www-3.1

Number:138830
Category:ports
Synopsis:net/linux-nx-client TCP_NODELAY problem
Severity:serious
Priority:medium
Responsible:freebsd-ports-bugs@FreeBSD.org
State:open
Class:sw-bug
Arrival-Date:Tue Sep 15 03:30:06 UTC 2009
Closed-Date:
Last-Modified:Mon Nov 2 00:50:01 UTC 2009
Originator:Koichiro IWAO
Release:8.0-BETA4

Organization:
Kyushu Institute of Technology
 
Environment:
FreeBSD trueno.klab.ai.kyutech.ac.jp 8.0-BETA4 FreeBSD 8.0-BETA4 #23: Tue Sep 8 15:54:50 JST 2009 root@trueno.klab.ai.kyutech.ac.jp:/usr/obj/usr/src/sys/GENERIC i386
 
Description:
net/linux-nx-client cannot connect the FreeNX server.
This is the error message that the nxclient says,

> NXPROXY - Version 2.1.0
>
> Copyright (C) 2001, 2006 NoMachine.
> See http://www.nomachine.com/ for more information.
>
> Info: Proxy running in client mode with pid '91258'.
> Session: Starting session at 'Tue Sep 15 12:16:02 2009'.
> Error: Failed to set TCP_NODELAY flag on FD#10 to 1. Error is 22 'Invalid argument'.
> Info: Synchronizing local and remote caches.
Info: Handshaking with remote proxy completed.
> Warning: Failed to set IPTOS_LOWDELAY flag on FD#10. Error is 92 'Protocol not available'.
> Error
 
How-To-Repeat:
Just execute nxclient and try to connect the nxserver.
It does not matter that nxserver is working on Linux/FreeBSD.
 
Fix:
Release-Note:
 
Audit-Trail:
Responsible Changed
From-To:freebsd-bugs->freebsd-ports-bugs
By:linimon
When:Wed Sep 16 02:56:40 UTC 2009
Why:ports PR.

Reply via E-mail
From:=?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mikko.tyolajarvi@gmail.com>
Date:Sun, 25 Oct 2009 20:13:49 -0700 (PDT)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.




This patch to the port makes nxclient work for me (on 7.2):

--- Makefile.orig 2009-10-24 17:57:53.000000000 -0700
+++ Makefile 2009-10-24 17:59:15.000000000 -0700
@@ -27,6 +27,10 @@

PLIST_SUB+= PORTVERSION=${PORTVERSION}

+post-patch:
+ ${PERL5} -pi.orig -e 's/\x83\x3f\x5f\x75\x02/\x83\x3f\x16\x75\x02/' \
+ ${NXSRC}/lib/libXcomp.so.${PORTVERSION}
+
do-install:
${MKDIR} ${NXDST}/bin
${INSTALL_PROGRAM} ${NXSRC}/bin/* ${NXDST}/bin

Nxclient is blindly setting TCP_NODELAY on a number of sockets,
including the X11 unix domain socket and then ignores certain errors
as benign.

Linux returns a different error code (EOPNOTSUPP) than freebsd and
nxclient treats the unexpected error (EINVAL) code as fatal.

The patch massages the binary to be happy with the freebsd error code.

Btw, using display localhost:0 instead of :0 also makes nxclient work,
with some performance loss.

Cheers,
/Mikko

Download Makefile.diff
--- Makefile.orig        2009-10-24 17:57:53.000000000 -0700
+++ Makefile     2009-10-24 17:59:15.000000000 -0700
@@ -27,6 +27,10 @@
 
 PLIST_SUB+=             PORTVERSION=${PORTVERSION}
 
+post-patch:
+        ${PERL5} -pi.orig -e 's/\x83\x3f\x5f\x75\x02/\x83\x3f\x16\x75\x02/' \
+                ${NXSRC}/lib/libXcomp.so.${PORTVERSION}
+
 do-install:
         ${MKDIR} ${NXDST}/bin
         ${INSTALL_PROGRAM} ${NXSRC}/bin/* ${NXDST}/bin



Reply via E-mail
From:Kouichiro Iwao <meta@club.kyutech.ac.jp>
Date:Mon, 26 Oct 2009 23:45:02 +0900
I tried your patch (8-RC1), nxclient could get remote NX session.
However, nxclient has NOT been properly working yet. On remote desktop
in the nxclient window, I cannot click the button which I really wanted to
but somewhere else is clicked. I don't know well about X window system
but coordinates between local X and remote X seems to be mapped broken.

Should I send another PR about this problem?

--
kiwao

Reply via E-mail
From:=?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mikko.tyolajarvi@gmail.com>
Date:Sun, 1 Nov 2009 16:46:21 -0800 (PST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.


Download Makefile.diff
"yܨZ|D-gbz{\]kzj-xz"qޮ|\'4y鮊^\"zj-y׬){az|\'vq%-'jYryhnlgz[%th'VW)ݣ2צn\݊vz޷ZjUڝޚ^^Ǟhm隦n$zuKwIr^rz蹹^h"{^zw+az{jwh jx޲اz{S}az+yjjwm&j)Ȟzkzhk^-*]   (^+rjxkzڟ+ax0,j֥Z+{W柖x1{-yh}!Wz-jg^       ݲ'J.,zwZazi.bnW!.n֧ɺƧ~,Zn)گ*h/z˛+my֏F+M|.֭z^azVzoz"}҇bz{Hfo{*.nWf)޶.nWz+Xaz+yj隲%b}(j'vyhazr!&jZr+az+ʋm~+t"J


Download linux-nx-client-3.4.0.diff
diff -ruN linux-nx-client.bak/Makefile linux-nx-client/Makefile
--- linux-nx-client.bak/Makefile 2009-11-01 15:29:52.000000000 -0800
+++ linux-nx-client/Makefile     2009-11-01 15:31:40.000000000 -0800
@@ -6,11 +6,10 @@
 #
 
 PORTNAME=               linux-nx-client
-PORTVERSION=            2.1.0
-PORTREVISION=           3
+PORTVERSION=            3.4.0
 CATEGORIES=             net
 MASTER_SITES=           http://web04.nomachine.com/download/${PORTVERSION}/Linux/
-DISTNAME=               nxclient-${PORTVERSION}-17.i386
+DISTNAME=               nxclient-${PORTVERSION}-5.i386
 
 MAINTAINER=             ports@FreeBSD.org
 COMMENT=                The NoMachine NX client
@@ -27,6 +26,12 @@
 
 PLIST_SUB+=             PORTVERSION=${PORTVERSION}
 
+# Patch binary to expect EINVAL (FreeBSD) instead of EOPNOTSUPP (Linux) when
+# setting TCP_NODELAY on the X11 unix domain socket.
+post-patch:
+        ${PERL5} -pi.orig -e 's/\x83\xf8\x5f\x0f\x84/\x83\xf8\x16\x0f\x84/' \
+                ${NXSRC}/lib/libXcomp.so.${PORTVERSION}
+
 do-install:
         ${MKDIR} ${NXDST}/bin
         ${INSTALL_PROGRAM} ${NXSRC}/bin/* ${NXDST}/bin
@@ -34,7 +39,7 @@
 .for f in libXcomp libXcompsh
         ${INSTALL_DATA} ${NXSRC}/lib/${f}.so.${PORTVERSION} ${NXDST}/lib
         ${LN} -sf ${f}.so.${PORTVERSION} ${NXDST}/lib/${f}.so
-        ${LN} -sf ${f}.so.${PORTVERSION} ${NXDST}/lib/${f}.so.2
+        ${LN} -sf ${f}.so.${PORTVERSION} ${NXDST}/lib/${f}.so.3
 .endfor
         ${INSTALL_DATA} ${NXSRC}/lib/libcrypto.so.0.9.8 ${NXDST}/lib
         ${LN} -sf libcrypto.so.0.9.8 ${NXDST}/lib/libcrypto.so
@@ -46,14 +51,15 @@
         ${INSTALL_DATA} ${NXSRC}/share/images/* ${NXDST}/share/images
 
         ${MKDIR} ${LOCALBASE}/share/pixmaps
-        ${INSTALL_DATA} ${NXSRC}/share/icons/*.png ${LOCALBASE}/share/pixmaps
+        ${INSTALL_DATA} ${NXSRC}/share/icons/48x48/*.png ${LOCALBASE}/share/pixmaps
         ${MKDIR} ${LOCALBASE}/share/icons/crystalsvg/48x48 \
-                ${LOCALBASE}/share/icons/crystalsvg/32x32
-        ${INSTALL_DATA} ${NXSRC}/share/icons/nx-desktop.png \
-                ${LOCALBASE}/share/icons/crystalsvg/48x48
-.for f in nx.png nxclient-admin.png nxclient-wizard.png
-        ${INSTALL_DATA} ${NXSRC}/share/icons/${f} \
-                ${LOCALBASE}/share/icons/crystalsvg/32x32
+                ${LOCALBASE}/share/icons/crystalsvg/32x32 \
+                ${LOCALBASE}/share/icons/crystalsvg/22x22 \
+                ${LOCALBASE}/share/icons/crystalsvg/16x16
+.for x in 16x16 22x22 32x32 48x48
+        ${MKDIR} ${LOCALBASE}/share/icons/crystalsvg/${x}
+        ${INSTALL_DATA} ${NXSRC}/share/icons/${x}/* \
+                ${LOCALBASE}/share/icons/crystalsvg/${x}
 .endfor
 
 .for f in nxclient nxesd nxkill nxservice nxssh
diff -ruN linux-nx-client.bak/distinfo linux-nx-client/distinfo
--- linux-nx-client.bak/distinfo 2009-11-01 15:29:52.000000000 -0800
+++ linux-nx-client/distinfo     2009-10-25 16:52:43.000000000 -0700
@@ -1,3 +1,3 @@
-MD5 (nxclient-2.1.0-17.i386.tar.gz) = d4482ecd4dda377f879a0888e256bce9
-SHA256 (nxclient-2.1.0-17.i386.tar.gz) = c087c1e528dd4272c4666a832b0a585b53fa15466b54d1dc2d60d105bea964ab
-SIZE (nxclient-2.1.0-17.i386.tar.gz) = 3515342
+MD5 (nxclient-3.4.0-5.i386.tar.gz) = fdb6ab1dcbdfd4cfe34bbbd379b68de9
+SHA256 (nxclient-3.4.0-5.i386.tar.gz) = 1fb33b24e701a9b2b615c99d353872cfa3a84a6a4ec83c5e1858abcb5307b522
+SIZE (nxclient-3.4.0-5.i386.tar.gz) = 4388189
diff -ruN linux-nx-client.bak/pkg-plist linux-nx-client/pkg-plist
--- linux-nx-client.bak/pkg-plist        2009-11-01 15:29:52.000000000 -0800
+++ linux-nx-client/pkg-plist    2009-11-01 14:38:51.000000000 -0800
@@ -9,37 +9,42 @@
 lib/linux-nx-client/bin/nxprint
 lib/linux-nx-client/bin/nxservice
 lib/linux-nx-client/bin/nxssh
-lib/linux-nx-client/lib/libXcomp.so
-lib/linux-nx-client/lib/libXcomp.so.2
 lib/linux-nx-client/lib/libXcomp.so.%%PORTVERSION%%
-lib/linux-nx-client/lib/libXcompsh.so
-lib/linux-nx-client/lib/libXcompsh.so.2
+lib/linux-nx-client/lib/libXcomp.so
+lib/linux-nx-client/lib/libXcomp.so.3
 lib/linux-nx-client/lib/libXcompsh.so.%%PORTVERSION%%
-lib/linux-nx-client/lib/libcrypto.so
+lib/linux-nx-client/lib/libXcompsh.so
+lib/linux-nx-client/lib/libXcompsh.so.3
 lib/linux-nx-client/lib/libcrypto.so.0.9.8
+lib/linux-nx-client/lib/libcrypto.so
+lib/linux-nx-client/share/keyboards
+lib/linux-nx-client/share/keys/server.id_dsa.key
 lib/linux-nx-client/share/images/about-down.png
 lib/linux-nx-client/share/images/about-up.png
 lib/linux-nx-client/share/images/connect-01.png
 lib/linux-nx-client/share/images/connect-02.png
 lib/linux-nx-client/share/images/connect-03.png
 lib/linux-nx-client/share/images/connect-04.png
-lib/linux-nx-client/share/images/connect-05.png
-lib/linux-nx-client/share/images/connect-06.png
-lib/linux-nx-client/share/images/connect-07.png
-lib/linux-nx-client/share/images/connect-08.png
-lib/linux-nx-client/share/images/connect-09.png
-lib/linux-nx-client/share/images/connect-10.png
 lib/linux-nx-client/share/images/connect-fail-01.png
-lib/linux-nx-client/share/images/connect-fail-02.png
+lib/linux-nx-client/share/images/error.png
 lib/linux-nx-client/share/images/folder-shared-disabled.png
 lib/linux-nx-client/share/images/folder-shared.png
+lib/linux-nx-client/share/images/info.png
 lib/linux-nx-client/share/images/kill-dsb.png
 lib/linux-nx-client/share/images/kill.png
-lib/linux-nx-client/share/images/multimedia-dsb.png
+lib/linux-nx-client/share/images/logo-small.png
+lib/linux-nx-client/share/images/logo.png
+lib/linux-nx-client/share/images/monitor-arrow-over.png
+lib/linux-nx-client/share/images/monitor-arrow.png
+lib/linux-nx-client/share/images/monitor-box.png
+lib/linux-nx-client/share/images/monitor-icon.png
+lib/linux-nx-client/share/images/monitor-mask.png
+lib/linux-nx-client/share/images/monitor-message.png
+lib/linux-nx-client/share/images/monitor-user-dsb.png
+lib/linux-nx-client/share/images/monitor-user.png
 lib/linux-nx-client/share/images/multimedia.png
 lib/linux-nx-client/share/images/new-session-dsb.png
 lib/linux-nx-client/share/images/new-session.png
-lib/linux-nx-client/share/images/nomachine-no-background.png
 lib/linux-nx-client/share/images/printer-default-icon-disabled.png
 lib/linux-nx-client/share/images/printer-default-icon.png
 lib/linux-nx-client/share/images/printer-icon-disabled.png
@@ -49,15 +54,14 @@
 lib/linux-nx-client/share/images/pulldown-close.png
 lib/linux-nx-client/share/images/pulldown-suspend.png
 lib/linux-nx-client/share/images/pulldown-terminate.png
-lib/linux-nx-client/share/images/refresh-dsb.png
 lib/linux-nx-client/share/images/refresh.png
+lib/linux-nx-client/share/images/refresh-dsb.png
 lib/linux-nx-client/share/images/remove-dsb.png
 lib/linux-nx-client/share/images/remove.png
 lib/linux-nx-client/share/images/session-stats-01-dsb.png
 lib/linux-nx-client/share/images/session-stats-01.png
 lib/linux-nx-client/share/images/session-stats-02-dsb.png
 lib/linux-nx-client/share/images/session-stats-02.png
-lib/linux-nx-client/share/images/sharing-dsb.png
 lib/linux-nx-client/share/images/sharing.png
 lib/linux-nx-client/share/images/terminate-dsb.png
 lib/linux-nx-client/share/images/terminate.png
@@ -65,8 +69,31 @@
 lib/linux-nx-client/share/images/view-log.png
 lib/linux-nx-client/share/images/warning.png
 lib/linux-nx-client/share/images/wizard.png
-lib/linux-nx-client/share/keyboards
-lib/linux-nx-client/share/keys/server.id_dsa.key
+share/pixmaps/application-nx-session.png
+share/pixmaps/nxclient-admin.png
+share/pixmaps/nxclient-desktop.png
+share/pixmaps/nxclient-icon.png
+share/pixmaps/nxclient-wizard.png
+share/icons/crystalsvg/48x48/application-nx-session.png
+share/icons/crystalsvg/48x48/nxclient-admin.png
+share/icons/crystalsvg/48x48/nxclient-desktop.png
+share/icons/crystalsvg/48x48/nxclient-icon.png
+share/icons/crystalsvg/48x48/nxclient-wizard.png
+share/icons/crystalsvg/32x32/application-nx-session.png
+share/icons/crystalsvg/32x32/nxclient-admin.png
+share/icons/crystalsvg/32x32/nxclient-desktop.png
+share/icons/crystalsvg/32x32/nxclient-icon.png
+share/icons/crystalsvg/32x32/nxclient-wizard.png
+share/icons/crystalsvg/22x22/application-nx-session.png
+share/icons/crystalsvg/22x22/nxclient-admin.png
+share/icons/crystalsvg/22x22/nxclient-desktop.png
+share/icons/crystalsvg/22x22/nxclient-icon.png
+share/icons/crystalsvg/22x22/nxclient-wizard.png
+share/icons/crystalsvg/16x16/application-nx-session.png
+share/icons/crystalsvg/16x16/nxclient-admin.png
+share/icons/crystalsvg/16x16/nxclient-desktop.png
+share/icons/crystalsvg/16x16/nxclient-icon.png
+share/icons/crystalsvg/16x16/nxclient-wizard.png
 @dirrm lib/linux-nx-client/bin
 @dirrm lib/linux-nx-client/lib
 @dirrm lib/linux-nx-client/share/keys
@@ -74,15 +101,9 @@
 @dirrm lib/linux-nx-client/share
 @dirrm lib/linux-nx-client
 @cwd %%LOCALBASE%%
-share/pixmaps/nx-desktop.png
-share/pixmaps/nx.png
-share/pixmaps/nxclient-admin.png
-share/pixmaps/nxclient-wizard.png
-share/icons/crystalsvg/48x48/nx-desktop.png
-share/icons/crystalsvg/32x32/nx.png
-share/icons/crystalsvg/32x32/nxclient-admin.png
-share/icons/crystalsvg/32x32/nxclient-wizard.png
 @dirrmtry share/icons/crystalsvg/48x48
 @dirrmtry share/icons/crystalsvg/32x32
+@dirrmtry share/icons/crystalsvg/22x22
+@dirrmtry share/icons/crystalsvg/16x16
 @dirrmtry share/icons/crystalsvg
 @dirrmtry share/icons



Unformatted:
 
Submit Followup | Raw PR | Find another PR