[FreeNX-kNX] Session shadowing broken in freenx

Maxim Kuvyrkov maxim.kuvyrkov at gmail.com
Mon May 5 18:50:11 UTC 2014


Hi Marcelo,

Session shadowing in freenx has broken somewhere in between Ubuntu 8.04 and Ubuntu 10.04 releases.  Also present in Ubuntu 12.04 (and, likely, 14.04, though I didn't check).  The cause is a debian-specific patch that rewrites /usr/lib/nx/nxnode:getparam() in python.

The underlaying problem is that original implementation returns the last occurrence of a given parameter, while python implementation returns first.  This breaks shadowing as in nxagent parameters "display" is passed 2 times, with last being the overriding definition.  I currently workaround this bug by reverting nxnode():getparam() back to:

 getparam()
 {
       stringinstring "&$1=" "$CMDLINE" || return 1
       echo "$CMDLINE" |  tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }' | sed 's|%24|$|'
       return 0
 }

This bug was reported by several people, e.g., see https://bugs.launchpad.net/freenx-server/+bug/1009448 .

Another (unrelated) problem I've discovered recently is that /tmp/.X11-unix/ is created by freenx-server with permissions 1755 instead of 1777.  This causes nxagent to die as it can't create socket for itself for normal users.  The problem will not occur for many users as almost always /tmp/.X11-unix/ is created by the system X.

The fix is to adjust /etc/init.d/freenx-server to create /tmp/.X11-unix/ with "mkdir -m1777 /tmp/.X11-unix/"

I have also recently requested to be added to freenx-team on LaunchPad, and I would appreciate and confirm/reject.

Thank you,

--
Maxim Kuvyrkov





More information about the FreeNX-kNX mailing list