summaryrefslogtreecommitdiff
path: root/extra/freenx
diff options
context:
space:
mode:
Diffstat (limited to 'extra/freenx')
-rw-r--r--extra/freenx/PKGBUILD77
-rw-r--r--extra/freenx/freenx-latest-svn.patch288
-rw-r--r--extra/freenx/freenx.install27
-rw-r--r--extra/freenx/keymap.patch32
-rw-r--r--extra/freenx/nxagent-startup.patch12
-rw-r--r--extra/freenx/remove-dialog.patch32
6 files changed, 468 insertions, 0 deletions
diff --git a/extra/freenx/PKGBUILD b/extra/freenx/PKGBUILD
new file mode 100644
index 000000000..bbaa11d59
--- /dev/null
+++ b/extra/freenx/PKGBUILD
@@ -0,0 +1,77 @@
+# $Id: PKGBUILD 108550 2011-02-01 08:10:47Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+#Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org>
+pkgname=freenx
+pkgver=0.7.3
+pkgrel=8
+pkgdesc="Free Software (GPL) Implementation of the NX Server"
+arch=(i686 x86_64)
+url="http://freenx.berlios.de"
+license=('GPL')
+depends=('nxserver' 'gnu-netcat' 'openssh' 'expect' 'xorg-xauth' 'xorg-apps' 'xorg-fonts-misc' 'coreutils' 'xorg-xmessage')
+backup=(opt/NX/etc/node.conf)
+install=freenx.install
+source=(http://download.berlios.de/freenx/$pkgname-server-$pkgver.tar.gz
+ keymap.patch
+ nxagent-startup.patch
+ freenx-latest-svn.patch
+ remove-dialog.patch)
+
+
+build() {
+ # patch and install nxserver
+ cd $startdir/src/$pkgname-server-$pkgver
+ # add latest svn fixes
+ patch -Np3 -i ../freenx-latest-svn.patch
+ # patch from inside nx
+ patch < gentoo-nomachine.diff
+ # patch broken keymap remapping
+ patch -Np0 -i ${srcdir}/keymap.patch
+ # patch nxagent startup to avoid login issues
+ patch -Np0 -i ${srcdir}/nxagent-startup.patch
+ # remove broken dialog function
+ patch -Np0 -i ${srcdir}/remove-dialog.patch
+ sed -i -e 's,authorized_keys2,authorized_keys,g' nxloadconfig
+ sed -i -e 's,/usr/NX,/opt/NX,g' nxloadconfig
+ sed -i -e 's,netcat,nc,g' nxloadconfig
+ sed -i -e 's/utmp/nx/g' nxsetup
+ sed -i -e 's,/usr/X11R6/bin/xauth,/usr/bin/xauth,g' nxloadconfig
+ sed -i -e 's,COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile",COMMAND_FOOMATIC="/usr/bin/foomatic-ppdfile",g' nxloadconfig
+ sed -i -e 's,COMMAND_MD5SUM="openssl md5",COMMAND_MD5SUM="md5sum",g' nxloadconfig
+ sed -i -e 's|AGENT_EXTRA_OPTIONS_X=""|AGENT_EXTRA_OPTIONS_X="-co /usr/share/X11/rgb -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 -xkbdir /usr/share/X11/xkb"|g' nxloadconfig
+ sed -i -e 's/ENABLE_AUTORECONNECT_BEFORE_140="1"/ENABLE_AUTORECONNECT_BEFORE_140="0"/g' nxloadconfig
+ sed -i -e 's,/etc/init.d/ssh,/etc/rc.d/sshd,g' nxsetup
+ sed -i -e 's,libXcomp.so,libXcomp.so.3,g' nxloadconfig
+ sed -i -e 's,libXcompext.so,libXcompext.so.3,g' nxloadconfig
+ sed -i -e 's,libXrender.so.1.2,libXrender.so.1.2.2:$APPLICATION_LIBRARY_PATH/libXcompsh.so.3:$APPLICATION_LIBRARY_PATH/libXcompshad.so.3,g' nxloadconfig
+ # fix key generation
+ sed -i -e 's,AUTOMATIC="no",AUTOMATIC="yes",g' nxsetup
+}
+
+package() {
+ cd $startdir/src/$pkgname-server-$pkgver
+ install -D -m755 nxnode $startdir/pkg/opt/NX/bin/nxnode
+ install -D -m755 nxserver $startdir/pkg/opt/NX/bin/nxserver
+ install -D -m755 nxsetup $startdir/pkg/opt/NX/bin/nxsetup
+ install -D -m755 nxkeygen $startdir/pkg/opt/NX/bin/nxkeygen
+ install -D -m755 nxnode-login $startdir/pkg/opt/NX/bin/nxnode-login
+ install -D -m755 nxloadconfig $startdir/pkg/opt/NX/bin/nxloadconfig
+ install -D -m755 nxdialog $startdir/pkg/opt/NX/bin/nxdialog
+ install -D -m755 nxviewer_helper $startdir/pkg/opt/NX/bin/nxviever_helper
+ install -D -m755 nxcups-gethost $startdir/pkg/opt/NX/bin/nxcups-gethost
+ install -D -m755 nxdesktop_helper $startdir/pkg/opt/NX/bin/nxdesktop_helper
+ # provided by nxclient!
+ #install -D -m755 nxprint $startdir/pkg/opt/NX/bin/nxprint
+ install -D -m755 node.conf.sample $startdir/pkg/opt/NX/etc/node.conf
+ # install nxhelper
+ cd nxserver-helper
+ make
+ install -D -m755 nxserver-helper $startdir/pkg/opt/NX/bin/nxserver-helper
+ # create nxserver homedir
+ mkdir -m700 -p $startdir/pkg/opt/NX/home/nx
+}
+md5sums=('856f597e139018f7ed62713c9d6c9ed5'
+ 'f0867659c925f6363fb2b7661f349248'
+ '30dc16d8e2093ff71d5834a169ad9d00'
+ '788f30322783cf2c2dc833e2e4d5e8ad'
+ 'cae1773312506eeefe6a8de07c492bd8')
diff --git a/extra/freenx/freenx-latest-svn.patch b/extra/freenx/freenx-latest-svn.patch
new file mode 100644
index 000000000..bcc8ddd17
--- /dev/null
+++ b/extra/freenx/freenx-latest-svn.patch
@@ -0,0 +1,288 @@
+diff -ur freenx-server-0.7.3//ChangeLog ../trunk/freenx-server//ChangeLog
+--- freenx-server-0.7.3//ChangeLog 2008-08-22 02:44:43.000000000 +0200
++++ ../trunk/freenx-server//ChangeLog 2011-01-26 23:23:36.850005855 +0100
+@@ -1,3 +1,20 @@
++xx.11.2008 FreeNX 0.7.4
++ * Opened the 0.7.4 development.
++ * Fixed missing export of NX_ETC_DIR in Makefile,
++ so node.conf.sample is installed correctly.
++ (fabianx@bat.berlios.de)
++ * Fixed broken round-robin load balance algorithm.
++ (fabianx@bat.berlios.de)
++ * Fixed --terminate|--suspend|--force-terminate for
++ load balancing case.
++ (fabianx@bat.berlios.de)
++ * Fixed --terminate|--suspend|--force-terminate for
++ usermode case.
++ (fabianx@bat.berlios.de)
++ * Fixed non-encrypted session mode. You might need to
++ set EXTERNAL_PROXY_IP in node.conf.
++ (fabianx@bat.berlios.de)
++
+ 18.08.2008 FreeNX 0.7.3 "Priscilla One Year Edition"
+ * Opened the 0.7.3 development.
+ * Added logging of failed authentication attempts
+diff -ur freenx-server-0.7.3//Makefile ../trunk/freenx-server//Makefile
+--- freenx-server-0.7.3//Makefile 2008-08-18 04:16:25.000000000 +0200
++++ ../trunk/freenx-server//Makefile 2011-01-26 23:23:36.856672521 +0100
+@@ -8,7 +8,7 @@
+ all:
+ cd nxviewer-passwd && xmkmf && make Makefiles && make depend
+ source nxloadconfig &&\
+- export PATH_BIN PATH_LIB CUPS_BACKEND NX_VERSION &&\
++ export PATH_BIN PATH_LIB CUPS_BACKEND NX_VERSION NX_ETC_DIR &&\
+ for i in $(SUBDIRS) ; \
+ do\
+ echo "making" all "in $$i..."; \
+@@ -44,5 +44,5 @@
+
+ install:
+ source nxloadconfig &&\
+- export PATH_BIN PATH_LIB CUPS_BACKEND NX_VERSION &&\
++ export PATH_BIN PATH_LIB CUPS_BACKEND NX_VERSION NX_ETC_DIR &&\
+ $(MAKE) nxenv_install
+diff -ur freenx-server-0.7.3//node.conf.sample ../trunk/freenx-server//node.conf.sample
+--- freenx-server-0.7.3//node.conf.sample 2008-08-22 02:44:43.000000000 +0200
++++ ../trunk/freenx-server//node.conf.sample 2011-01-26 23:23:36.850005855 +0100
+@@ -37,7 +37,7 @@
+ #
+ # https://mail.kde.org/mailman/listinfo/freenx-knx
+ #
+-# SVN: $Id: node.conf.sample 580 2008-08-22 00:44:43Z fabianx $
++# SVN: $Id: node.conf.sample 613 2008-09-01 20:42:31Z fabianx $
+
+ #########################################################################
+ # General FreeNX directives
+@@ -47,6 +47,11 @@
+ # different than the default hostname (as returned by `hostname`)
+ #SERVER_NAME="$(hostname)"
+
++# The node ip which is used by NX Node in unecnrypted session mode.
++# Set it if you want to use a specific external ip or the autodetection
++# is not working.
++#EXTERNAL_PROXY_IP=""
++
+ # The port number where local 'sshd' is listening.
+ #SSHD_PORT=22
+
+diff -ur freenx-server-0.7.3//nxloadconfig ../trunk/freenx-server//nxloadconfig
+--- freenx-server-0.7.3//nxloadconfig 2008-08-22 02:44:43.000000000 +0200
++++ ../trunk/freenx-server//nxloadconfig 2011-01-26 23:23:36.856672521 +0100
+@@ -5,7 +5,7 @@
+ #
+ # License: GPL, version 2
+ #
+-# SVN: $Id: nxloadconfig 580 2008-08-22 00:44:43Z fabianx $
++# SVN: $Id: nxloadconfig 613 2008-09-01 20:42:31Z fabianx $
+ #
+ # ========================================================================
+
+@@ -52,7 +52,7 @@
+ # DO NOT TOUCH unless you REALLY know what you are doing
+ #########################################################################
+
+-NX_VERSION=3.2.0-73
++NX_VERSION=3.2.0-74-SVN
+ NX_LICENSE="OS (GPL, using backend: %BACKEND%)"
+
+ # Where can different nx components be found
+@@ -85,6 +85,7 @@
+ # General FreeNX directives
+
+ SERVER_NAME="$(hostname)"
++EXTERNAL_PROXY_IP=""
+ SSHD_PORT=22
+
+ # Authentication / Security directives
+diff -ur freenx-server-0.7.3//nxnode ../trunk/freenx-server//nxnode
+--- freenx-server-0.7.3//nxnode 2008-08-22 02:44:43.000000000 +0200
++++ ../trunk/freenx-server//nxnode 2011-01-26 23:23:36.853339188 +0100
+@@ -13,7 +13,7 @@
+ #
+ # License: GNU GPL, version 2
+ #
+-# SVN: $Id: nxnode 580 2008-08-22 00:44:43Z fabianx $
++# SVN: $Id: nxnode 613 2008-09-01 20:42:31Z fabianx $
+ #
+ # 21.06.2004: - Full reconnection support
+
+@@ -1184,6 +1184,17 @@
+ [ -z "$userip" -a "$host" = "127.0.0.1" ] && userip="127.0.0.1"
+ [ -z "$userip" ] && userip="*"
+ fi
++
++ # We need our own external IP
++ proxyip="$EXTERNAL_PROXY_IP"
++
++ if [ -z "$proxyip" -a -n "$host" ]
++ then
++ [ "$host" = "127.0.0.1" ] && host=$(hostname)
++ proxyip=$(ping -c1 "$host" | grep 'PING' | cut -d'(' -f2 | cut -d')' -f1)
++ fi
++
++ [ -z "$proxyip" ] && proxyip="127.0.0.1"
+
+ # ok, lets make the session dir first:
+
+@@ -1316,7 +1327,7 @@
+ NX> 705 Session display: $display
+ NX> 703 Session type: $type
+ NX> 701 Proxy cookie: $proxy_cookie
+-NX> 702 Proxy IP: $userip
++NX> 702 Proxy IP: $proxyip
+ NX> 706 Agent cookie: $cookie
+ NX> 704 Session cache: $type
+ NX> 707 SSL tunneling: $ssl_tunnel
+diff -ur freenx-server-0.7.3//nxserver ../trunk/freenx-server//nxserver
+--- freenx-server-0.7.3//nxserver 2008-08-22 02:44:43.000000000 +0200
++++ ../trunk/freenx-server//nxserver 2011-01-26 23:23:36.856672521 +0100
+@@ -11,7 +11,7 @@
+ #
+ # License: GNU GPL, version 2
+ #
+-# SVN: $Id: nxserver 580 2008-08-22 00:44:43Z fabianx $
++# SVN: $Id: nxserver 612 2008-08-25 03:28:15Z fabianx $
+ #
+
+ # Read the config file
+@@ -1192,7 +1192,7 @@
+ # Lock held
+
+ SERVER_LB_NR=$(cat $NX_SESS_DIR/round-robin 2>/dev/null)
+- let SERVER_LB_NR=(SERVER_LB_NR+1) % SERVER_LB_NR_OF_HOSTS
++ let SERVER_LB_NR=(SERVER_LB_NR+1)%SERVER_LB_NR_OF_HOSTS
+ echo $SERVER_LB_NR >$NX_SESS_DIR/round-robin
+
+ # Exit critical section
+@@ -1961,71 +1961,71 @@
+ session_history "$user" "$sessid"
+ }
+
+-cmd_terminate()
++cmd_execute()
+ {
+- CMD_PARAMS=$(cmd_parse_3_params "$2")
+- [ -z "$CMD_PARAMS" ] && exit 1
+- for i in $CMD_PARAMS;
++ cmd_host="$1"
++ cmd_user="$2"
++ cmd_cmd="$3"
++
++ if [ "$ENABLE_USERMODE_AUTHENTICATION" = "1" ]
++ then
++ sh -c "$cmd_cmd"
++ elif [ "$cmd_host" = "127.0.0.1" -o "$cmd_host" = "localhost" ]
++ then
++ su - "$cmd_user" -c "$cmd_cmd"
++ else
++ ssh "$cmd_host" su - "$cmd_user" -c "'$cmd_cmd'"
++ fi
++}
++
++cmd_terminate_or_send()
++{
++ CMD="$1"
++
++ if [ "$CMD" = "--broadcast" ]
++ then
++ CMD_PARAMS=$(session_find_all)
++ [ -z "$CMD_PARAMS" ] && cmd_abort "Error: No running session could be found."
++ else
++ CMD_PARAMS=$(cmd_parse_3_params "$2")
++ [ -z "$CMD_PARAMS" ] && exit 1
++ shift
++ fi
++ shift
++
++ for i in $CMD_PARAMS
+ do
+ CMDLINE=$(session_get_cmdline $i)
+ cmd_sessionid=$(getparam sessionId)
++ cmd_display=$(getparam display)
+ cmd_user=$(getparam userName)
+ cmd_type=$(getparam type)
+ cmd_status=$(getparam status)
++ cmd_host=$(getparam host)
+
+ # is it a "good" session?
+- case "$1" in
++ case "$CMD" in
+ --suspend)
+ if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type"
+ then
+- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --suspend"
++ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --suspend"
+ fi
+ ;;
+ --terminate)
+- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --terminate"
++ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --terminate"
+ ;;
+ --force-terminate)
+- echo "sessionid=$cmd_sessionid" | su - "$cmd_user" -c "$PATH_BIN/nxnode --terminate"
++ echo "sessionid=$cmd_sessionid" | cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxnode --terminate"
+ session_close $cmd_sessionid
+ ;;
+- esac
+- done
+-
+-}
+-
+-cmd_send()
+-{
+- if [ "$1" = "--broadcast" ]
+- then
+- CMD_PARAMS=$(session_find_all)
+- [ -z "$CMD_PARAMS" ] && cmd_abort "Error: No running session could be found."
+- else
+- CMD_PARAMS=$(cmd_parse_3_params "$2")
+- [ -z "$CMD_PARAMS" ] && exit 1
+- shift
+- fi
+- shift
+- for i in $CMD_PARAMS;
+- do
+- CMDLINE=$(session_get_cmdline $i)
+- cmd_display=$(getparam display)
+- cmd_user=$(getparam userName)
+- cmd_type=$(getparam type)
+- cmd_status=$(getparam status)
+- cmd_host=$(getparam host)
+-
+- # is it a "good" session?
+- if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type"
+- then
+- if [ "$cmd_host" = "127.0.0.1" -o "$cmd_host" = "localhost" ]
++ --send|--broadcast)
++ # is it a "good" session?
++ if [ "$cmd_status" = "Running" ] && stringinstring "unix-" "$cmd_type"
+ then
+- su - "$cmd_user" -c "$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &"
+- else
+- ssh $cmd_host su - "$cmd_user" -c "'$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &'"
++ cmd_execute "$cmd_host" "$cmd_user" "$PATH_BIN/nxdialog --dialog ok --caption \"NX Administrator Message\" --message \"$@\" -display \":$cmd_display\" &"
+ fi
+- fi
++ esac
+ done
+- #nxnode_start --send "$CMD_PARAMS"
+ }
+
+ #
+@@ -2099,13 +2099,13 @@
+ cmd_history "$@"
+ ;;
+ --terminate|--suspend|--force-terminate)
+- cmd_terminate "$@"
++ cmd_terminate_or_send "$@"
+ ;;
+ --cleanup)
+- cmd_terminate "--force-terminate" "*"
++ cmd_terminate_or_send "--force-terminate" "*"
+ ;;
+ --send|--broadcast)
+- cmd_send "$@"
++ cmd_terminate_or_send "$@"
+ ;;
+ *)
+ cmd_abort "Error: Function $CMD not implemented yet."
diff --git a/extra/freenx/freenx.install b/extra/freenx/freenx.install
new file mode 100644
index 000000000..93a28656f
--- /dev/null
+++ b/extra/freenx/freenx.install
@@ -0,0 +1,27 @@
+# arg 1: the new package version
+post_install() {
+# setting up freenx
+echo 'Generating keys ...'
+/opt/NX/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
+/bin/cat <<THEEND
+ATTENTION FREENX:
+For correct setup please take a look at the wiki:
+http://wiki.archlinux.org/index.php/FreeNX
+THEEND
+}
+
+post_upgrade() {
+# setting up freenx
+echo 'Rerunning nxsetup ...'
+/opt/NX/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
+/bin/cat <<THEEND
+ATTENTION FREENX:
+For correct setup please take a look at the wiki:
+http://wiki.archlinux.org/index.php/FreeNX
+THEEND
+}
+# arg 1: the old package version
+pre_remove() {
+ /opt/NX/bin/nxsetup --uninstall --purge 2>&1 >/dev/null
+ usr/sbin/groupdel nx &>/dev/null
+}
diff --git a/extra/freenx/keymap.patch b/extra/freenx/keymap.patch
new file mode 100644
index 000000000..a0bb678e4
--- /dev/null
+++ b/extra/freenx/keymap.patch
@@ -0,0 +1,32 @@
+=== modified file 'nxnode'
+--- nxnode 2009-01-14 04:22:40 +0000
++++ nxnode 2009-01-14 04:24:02 +0000
+@@ -555,7 +555,8 @@
+
+ # Start the agent
+
+- PATH="$PATH_BIN:$PATH" $PATH_BIN/nxagent $P $R -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" -option "$USER_FAKE_HOME/.nx/C-$sess_id/options" $K $G $B $FP $AGENT_EXTRA_OPTIONS_X :$display 2>&3 &
++ #PATH="$PATH_BIN:$PATH" $PATH_BIN/nxagent $P $R -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" -option "$USER_FAKE_HOME/.nx/C-$sess_id/options" $K $G $B $FP $AGENT_EXTRA_OPTIONS_X :$display 2>&3 &
++ PATH="$PATH_BIN:$PATH" $PATH_BIN/nxagent $R -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" -option "$USER_FAKE_HOME/.nx/C-$sess_id/options" $B $FP $AGENT_EXTRA_OPTIONS_X :$display 2>&3 &
+ fi
+
+ #
+@@ -1094,6 +1095,8 @@
+ # Rootless fix from 2x nxserver 1.5.0
+ realtype=$type
+ [ "$type" = "unix-application" -o "$type" = "unix-default" ] && realtype="unix-desktop"
++ [ "$type" = "unix-gnome" ] && realtype="gnome"
++ [ "$type" = "unix-kde" ] && realtype="kde"
+
+ # NX 2.1.0 file-sharing port options
+ client=$(getparam client)
+@@ -1272,7 +1275,7 @@
+ umask 0077
+
+ cat << EOF > "$USER_FAKE_HOME/.nx/C-$sess_id/options"
+-${keyboard:+keyboard=$keyboard,}${kbtype:+kbtype=$kbtype,}${kbload:+kbload=$kbload,}${keymap:+keymap=$keymap,}${resize:+resize=$resize,}${CACHE}${IMAGES}${PACK}link=$link,nodelay=$nodelay,type=$realtype,cleanup=0,${ACCEPT}cookie=$proxy_cookie,id=$sess_id,samba=$samba,media=$media${sync:+,sync=$sync}${cups:+,cups=$cups}${keybd:+,keybd=$keybd}${aux:+,aux=$aux}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}${clipboard:+,clipboard=$clipboard}${menu:+,menu=$menu}:$display
++nx/nx,${keyboard:+keyboard=$keyboard,}${kbtype:+kbtype=$kbtype,}${kbload:+kbload=$kbload,}${keymap:+keymap=$keymap,}${geometry:+geometry=$geometry,}${client:+client=$client,}${resize:+resize=$resize,}${CACHE}${IMAGES}${PACK}link=$link,nodelay=$nodelay,type=$realtype${clipboard:+,clipboard=$clipboard}${composite:+composite=$composite},cleanup=0,product=LFE/None/LFEN/None,shmem=1,${backingstore:+backingstore=$backingstore,}shpix=1,${ACCEPT}cookie=$proxy_cookie,id=$sess_id,samba=$samba,media=$media${sync:+,sync=$sync}${cups:+,cups=$cups}${keybd:+,keybd=$keybd}${aux:+,aux=$aux}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}${menu:+,menu=$menu}:$display
+ EOF
+ umask $OLD_UMASK
+ #samba=$samba,
+
diff --git a/extra/freenx/nxagent-startup.patch b/extra/freenx/nxagent-startup.patch
new file mode 100644
index 000000000..e3c5497c1
--- /dev/null
+++ b/extra/freenx/nxagent-startup.patch
@@ -0,0 +1,12 @@
+--- nxnode~ 2010-04-30 15:42:46.000000000 +0200
++++ nxnode 2010-04-30 15:42:46.000000000 +0200
+@@ -328,6 +328,9 @@
+ NODE_WM_PID=$!
+ fi
+
++ # Patch - delay to allow nxagent to complete launching
++ sleep 4
++
+ echo "Xft.dpi: 96" | DISPLAY=:$display xrdb -merge >>"$USER_FAKE_HOME/.nx/C-$sess_id/session" 2>&1
+ [ -d /etc/X11/Xresources ] && xrdb -display :$display -merge /etc/X11/Xresources/* >>"$USER_FAKE_HOME/.nx/C-$sess_id/session" 2>&1
+
diff --git a/extra/freenx/remove-dialog.patch b/extra/freenx/remove-dialog.patch
new file mode 100644
index 000000000..054f1f6c4
--- /dev/null
+++ b/extra/freenx/remove-dialog.patch
@@ -0,0 +1,32 @@
+--- nxdialog~ 2011-02-01 09:05:28.993333438 +0100
++++ nxdialog 2011-02-01 09:05:29.010000106 +0100
+@@ -85,29 +85,6 @@
+ then
+ dialog_interface="xdialog"
+ DIALOG=/usr/bin/Xdialog # just in case that we have no good path
+-elif [ -x /usr/bin/dialog ]
+-then
+- #JJK: Added 'dialog_interface=dialog' option because Xdialog not standard
+- #JJK: on some distros such as Fedora and xmessage won't handle long
+- #JJK: lists of ppd files while the combination of 'dialog' and 'xterm'
+- #JJK: should be present on most setups.
+-
+- dialog_interface="dialog"
+- DIALOG=/usr/bin/dialog
+- if [ -z "$NXCLIENT_FIRST_TIME" ]
+- then
+- # Run only once in case of subdialogs. Capture result in tempfile
+- TMPFILE=$(mktemp /tmp/nxclient.XXXXX)
+- export NXCLIENT_FIRST_TIME=1
+-
+- xterm -geometry 120x24+100+100 +sb -title "NXclient" -e \
+- /bin/bash -c "$DIALOG --infobox 'Please wait...' 3 25; $0 $INPUTS | tee $TMPFILE" || exit 1
+-
+- #Need to recover the last line output (and not remove non-printing chars, because --stdout is used)
+- tail -1 $TMPFILE
+- rm -f $TMPFILE
+- exit 0
+- fi
+ else
+ dialog_interface="xmessage"
+ xmessage=$(which xmessage 2>/dev/null)