Hello community,
here is the log from the commit of package FreeNX
checked in at Sun Jul 8 22:46:49 CEST 2007.
--------
--- FreeNX/FreeNX.changes 2007-07-05 19:55:07.000000000 +0200
+++ /mounts/work_src_done/STABLE/FreeNX/FreeNX.changes 2007-07-08 13:25:56.586048000 +0200
@@ -1,0 +2,6 @@
+Sat Jul 7 13:15:22 CEST 2007 - sndirsch@suse.de
+
+- updated to release 0.7.0
+ * see ANNOUNCE-0.7.0 for more details
+
+-------------------------------------------------------------------
Old:
----
freenx-0.6.0.diff
freenx-0.6.0.tar.gz
New:
----
ANNOUNCE-0.7.0
freenx-0.7.0.diff
freenx-0.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ FreeNX.spec ++++++
--- /var/tmp/diff_new_pack.c18344/_old 2007-07-08 22:46:29.000000000 +0200
+++ /var/tmp/diff_new_pack.c18344/_new 2007-07-08 22:46:29.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package FreeNX (Version 0.6.0)
+# spec file for package FreeNX (Version 0.7.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -19,8 +19,8 @@
License: GPL v2 or later
URL: http://freenx.berlios.de/
Group: System/X11/Servers/XF86_4
-Version: 0.6.0
-Release: 26
+Version: 0.7.0
+Release: 1
Requires: NX openssh expect netcat
Summary: FreeNX Application and Thin Client Server
Source: freenx-%{version}.tar.gz
@@ -33,6 +33,7 @@
Source7: ANNOUNCE-0.5.0
Source8: NX-Firewall.txt
Source9: ANNOUNCE-0.6.0
+Source10: ANNOUNCE-0.7.0
Patch: freenx-%{version}.diff
Patch1: xorg7.diff
Patch2: xcb-unix.diff
@@ -84,6 +85,9 @@
/usr/bin/*
%changelog
+* Sat Jul 07 2007 - sndirsch@suse.de
+- updated to release 0.7.0
+ * see ANNOUNCE-0.7.0 for more details
* Thu Jul 05 2007 - sndirsch@suse.de
- removed broken conflicting nxproxy wrapper script
- fixed error in "nxsetup --install"
++++++ freenx-0.6.0.diff -> freenx-0.7.0.diff ++++++
--- FreeNX/freenx-0.6.0.diff 2007-07-05 19:49:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/FreeNX/freenx-0.7.0.diff 2007-07-08 13:32:45.465493000 +0200
@@ -42,3 +42,25 @@
ERROR="yes" && echo "Error: Could not find 1.5.0 or 2.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 backend is needed for this version of FreeNX."
[ -z $(echo "$ENABLE_USESSION" | egrep "^[0|1]$") ] && \
+--- nxsetup.orig 2007-07-08 13:09:34.000000000 +0200
++++ nxsetup 2007-07-08 13:10:12.000000000 +0200
+@@ -195,7 +195,7 @@
+ fi
+
+ # the nx user account might be locked, so unlock it.
+- passwd -u nx
++ #passwd -u nx
+ }
+
+ install_nx()
+--- nxloadconfig.orig 2007-07-08 13:28:57.000000000 +0200
++++ nxloadconfig 2007-07-08 13:31:51.000000000 +0200
+@@ -282,7 +282,7 @@
+ fi
+
+ [ -z "$KDE_PRINTRC" -a -n "$KDEHOME" ] && KDE_PRINTRC="$KDEHOME/share/config/kdeprintrc"
+-[ -z "$KDE_PRINTRC" ] && KDE_PRINTRC=$(kde-config --localprefix)"/share/config/kdeprintrc"
++[ -z "$KDE_PRINTRC" ] && KDE_PRINTRC=$(/opt/kde3/bin/kde-config --localprefix)"/share/config/kdeprintrc"
+ [ -z "$KDE_PRINTRC" -o ! -r "$KDE_PRINTRC" ] && KDE_PRINTRC="$HOME/.kde/share/config/kdeprintrc"
+
+ #########################################################################
++++++ freenx-0.6.0.tar.gz -> freenx-0.7.0.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/ChangeLog new/freenx-0.7.0/ChangeLog
--- old/freenx-0.6.0/ChangeLog 2007-01-23 04:22:49.000000000 +0100
+++ new/freenx-0.7.0/ChangeLog 2007-07-07 08:01:38.000000000 +0200
@@ -1,3 +1,43 @@
+07.07.2007 FreeNX 0.7.0 "Jornade SPL Edition VI+1"
+ * Fixed the printing support for CUPS 1.2.
+ Older versions of CUPS are no longer supported.
+ * Note: You must do as root:
+
+ cp /usr/lib/cups/backend/ipp /usr/lib/cups/backend/nxipp
+ chmod 755 /usr/lib/cups/backend/nxipp
+
+ Or alternatively re-run nxsetup.
+
+ * Added foomatic support.
+ * Note: You might need to do: ln -s /usr/bin/foomatic-ppdfile
+ /usr/lib/cups/driver/
+ * Added setting of CUPS_SERVER environment var.
+ * Added automatic downloading of PPDs, if the client supports it.
+ * Added configuration vars to tweak the new behaviour.
+ * Added cups seamless support with no "use this driver?" dialogs at all.
+ * Note: You need nxcupsd-wrapper on the client side for CUPS 1.2
+ clients.
+
+ Get it from nxutils repository.
+
+ * Fixed Support for "Running" sessions - again.
+ * Made the NXAgent exited with exit code 1 message more verbose.
+ * Added support for nxipp to nxnode and nxsetup.
+ * Added nxcups-gethost script for automatic usage in KDE.
+ * Fixed RDP/VNC sessions. No application should be started for that type.
+ (Patch by Bernard Cafarelli )
+ * Added backingstore fix for older clients from Gentoo.
+ (http://bugs.gentoo.org/show_bug.cgi?id=149298)
+ * Fixed VNC sessions.
+ * Fixed fullscreen sessions.
+ (Patch by Gentoo Bugtracker)
+ * Fixed --broadcast.
+ * Added "passwd -u nx" to nxsetup to fix slackware.
+ * Fixed respecting of enconding settings in case of rootless mode.
+ * Fixed smb mounting in case nxclient sends the wrong port.
+ (Patch by Jan Lockenvitz )
+ * Fixed loadbalancing - was still using an undocumented variable.
+
23.01.2007 FreeNX 0.6.0 "Juliana birthday edition"
* Opened the 0.6.0 branch.
* Added nxnode slave mode.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/node.conf.sample new/freenx-0.7.0/node.conf.sample
--- old/freenx-0.6.0/node.conf.sample 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/node.conf.sample 2007-01-26 07:27:47.000000000 +0100
@@ -37,7 +37,7 @@
#
# https://mail.kde.org/mailman/listinfo/freenx-knx
#
-# SVN: $Id: node.conf.sample 226 2006-07-04 23:38:10Z fabianx $
+# SVN: $Id: node.conf.sample 306 2007-01-26 06:27:47Z fabianx $
#########################################################################
# General FreeNX directives
@@ -247,11 +247,51 @@
#ARTSD_BIN_PRELOAD="artsdsp"
# FreeNX with ENABLE_KDE_CUPS="1" will automatically write
-# $KDE_PRINTRC and put the current used port into it.
+# $KDE_PRINTRC and put the current used socket into it.
+#
+# If you additionally enable ENABLE_KDE_CUPS_DYNAMIC it will set the
+# Host entry to the script nxcups-gethost, which dynamically tries all
+# possible entries to find the current printing host.
+#
+# The order is: CUPS_SERVER (env var), ~/.cups/client.conf, $KDE_PRINTRC,
+# $CUPS_DEFAULT_SOCK, localhost
+#
+# So this option is most useful with ENABLE_CUPS_SERVER_EXPORT="1".
+#
# $KDE_PRINTRC is automatically calculated if its not set.
#ENABLE_KDE_CUPS="0"
+#ENABLE_KDE_CUPS_DYNAMIC="0"
#KDE_PRINTRC="$KDEHOME/share/config/kdeprintrc"
+
+# FreeNX with ENABLE_CUPS_SERVER_EXPORT="1" will automatically
+# export the environment variable CUPS_SERVER.
+
+#ENABLE_CUPS_SERVER_EXPORT="1"
+
+# FreeNX with ENABLE_CUPS_SEAMLESS will automatically try to download the
+# necessary ppds from the client.
+#
+# As the forwarding is just active as soon as nxagent is started,
+# we need a small delay of $CUPS_SEAMLESS_DELAY.
+#
+# Note: You need to use a patched cupsd on client side.
+
+#ENABLE_CUPS_SEAMLESS="0"
+#CUPS_SEAMLESS_DELAY="10"
+
+# FreeNX with ENABLE_FOOMATIC will integrate the foomatic db to the list
+# of available ppd drivers via the $COMMAND_FOOMATIC command.
+
+#ENABLE_FOOMATIC="1"
+#COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile"
+
+# CUPS_BACKEND and CUPS_ETC are the corresponding paths of your CUPS
+# installation.
+
+#CUPS_BACKEND="/usr/lib/cups/backend"
+#CUPS_IPP_BACKEND="$CUPS_BACKEND/nxipp"
+#CUPS_DEFAULT_SOCK="/var/run/cups/cups.sock"
#CUPS_ETC="/etc/cups"
#########################################################################
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxclient new/freenx-0.7.0/nxclient
--- old/freenx-0.6.0/nxclient 2007-01-23 04:22:49.000000000 +0100
+++ new/freenx-0.7.0/nxclient 2007-01-24 16:51:37.000000000 +0100
@@ -9,7 +9,7 @@
# but we set it to a "good value" anyway in case
# it does check it someday.
#
-# SVN: $Id: nxclient 285 2007-01-23 03:11:18Z fabianx $
+# SVN: $Id: nxclient 289 2007-01-24 15:51:37Z fabianx $
#
# ========================================================================
@@ -98,6 +98,8 @@
[ -n "$USER_FAKE_HOME" ] && UTILITY_DRIVERS_CACHE="$USER_FAKE_HOME/.nx/config/drivers.cache"
UTILITY_NXPRINT="nxprint"
[ -n "$PATH_BIN" ] && UTILITY_NXPRINT="$PATH_BIN/nxprint"
+ # Export configuration vars for nxprint
+ export ENABLE_FOOMATIC COMMAND_FOOMATIC
case "$1" in
get)
grep "driver|$2|" "$UTILITY_DRIVERS_CACHE" 2>/dev/null
@@ -251,7 +253,7 @@
# xdialog_printer_configure_driver vendor old_driver
xdialog_printer_configure_driver()
{
- IFS='|' XDIALOG_LIST=( $(utility_printer getextdrvlist "$1" | sed 's/$/|off/g; /'"$2"'/ s/|off/|on/g' | tr '\n' '|') )
+ IFS='|' XDIALOG_LIST=( $(utility_printer getextdrvlist "$1" | sed 's,$,|off,g; /'"$(basename $2)"'/ s,|off,|on,g' | tr '\n' '|') )
$DIALOG --stdout --title "$DIALOG_CAPTION" --radiolist "$DIALOG_MESSAGE" 0 0 6 "${XDIALOG_LIST[@]}"
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxcups-gethost new/freenx-0.7.0/nxcups-gethost
--- old/freenx-0.6.0/nxcups-gethost 1970-01-01 01:00:00.000000000 +0100
+++ new/freenx-0.7.0/nxcups-gethost 2007-01-26 07:27:47.000000000 +0100
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Read the config file
+. $(PATH=$(cd $(dirname $0) && pwd):$PATH which nxloadconfig) --userconf
+
+CUPS_HOST=""
+
+# see if environment is helpful
+[ -n "$CUPS_SERVER" ] && CUPS_HOST=$CUPS_SERVER
+
+# no, lets see if the user has a cups config file
+[ -z "$CUPS_HOST" -a -f "$HOME/.cups/client.conf" ] && CUPS_HOST=$(grep "^ServerName " "$HOME/.cups/client.conf" | sed 's/^ServerName //g; s/#.*//g')
+
+# not even close, so lets use the kdeprintrcs configuration key
+[ -z "$CUPS_HOST" ] && CUPS_HOST=$(grep "^Host=" "$KDE_PRINTRC" | cut -d'=' -f2)
+
+# Hm, perhaps there is a global cupsd running on this host
+[ -z "$CUPS_HOST" -a -S "$CUPS_DEFAULT_SOCK" ] && CUPS_HOST="$CUPS_DEFAULT_SOCK"
+
+# no, no, no - so we fallback to localhost
+[ -z "$CUPS_HOST" ] && CUPS_HOST="127.0.0.1"
+
+echo "$CUPS_HOST"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxloadconfig new/freenx-0.7.0/nxloadconfig
--- old/freenx-0.6.0/nxloadconfig 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/nxloadconfig 2007-07-07 07:59:03.000000000 +0200
@@ -5,7 +5,7 @@
#
# License: GPL, version 2
#
-# SVN: $Id: nxloadconfig 283 2007-01-23 02:15:28Z fabianx $
+# SVN: $Id: nxloadconfig 352 2007-07-07 05:59:03Z fabianx $
#
# ========================================================================
@@ -52,7 +52,7 @@
# DO NOT TOUCH unless you REALLY know what you are doing
#########################################################################
-NX_VERSION=1.5.0-60
+NX_VERSION=1.5.0-70
NX_LICENSE="OS (GPL)"
# Where can different nx components be found
@@ -143,7 +143,18 @@
ARTSD_BIN_PRELOAD="artsdsp"
ENABLE_KDE_CUPS="0"
+ENABLE_KDE_CUPS_DYNAMIC="0"
KDE_PRINTRC="" # Calculated
+
+ENABLE_CUPS_SERVER_EXPORT="1"
+ENABLE_CUPS_SEAMLESS="0"
+CUPS_SEAMLESS_DELAY="10"
+ENABLE_FOOMATIC="1"
+COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile"
+
+CUPS_BACKEND="/usr/lib/cups/backend"
+CUPS_IPP_BACKEND="$CUPS_BACKEND/nxipp"
+CUPS_DEFAULT_SOCK="/var/run/cups/cups.sock"
CUPS_ETC="/etc/cups/"
# Path directives
@@ -271,7 +282,8 @@
fi
[ -z "$KDE_PRINTRC" -a -n "$KDEHOME" ] && KDE_PRINTRC="$KDEHOME/share/config/kdeprintrc"
-[ -z "$KDE_PRINTRC" -a -z "$KDEHOME" ] && KDE_PRINTRC="$HOME/.kde/share/config/kdeprintrc"
+[ -z "$KDE_PRINTRC" ] && KDE_PRINTRC=$(kde-config --localprefix)"/share/config/kdeprintrc"
+[ -z "$KDE_PRINTRC" -o ! -r "$KDE_PRINTRC" ] && KDE_PRINTRC="$HOME/.kde/share/config/kdeprintrc"
#########################################################################
# Support for --check
@@ -436,6 +448,17 @@
ERROR="yes" && echo "Error: Invalid value \"ENABLE_KDE_CUPS=$ENABLE_KDE_CUPS\""
[ "$ENABLE_KDE_CUPS" = "1" -a ! -e "$KDE_PRINTRC" ] && \
ERROR="yes" && echo "Error: Invalid value \"KDE_PRINTRC=$KDE_PRINTRC\""
+
+
+ [ "$ENABLE_FOOMATIC" = "1" ] && ! which "$COMMAND_FOOMATIC" >/dev/null 2>&1 && \
+ WARNING="yes" && echo "Warning: Invalid value \"COMMAND_FOOMATIC=$COMMAND_FOOMATIC\"" \
+ && echo " Users will not be able to use foomatic."
+ [ ! -x "$CUPS_IPP_BACKEND" ] && \
+ WARNING="yes" && echo "Warning: \"$CUPS_IPP_BACKEND\" is not executable." \
+ && echo " Users will not be able to enable printing."
+ [ ! -x "$CUPS_BACKEND/smb" ] && \
+ WARNING="yes" && echo "Warning: \"$CUPS_BACKEND/smb\" is not executable." \
+ && echo " Users will not be able to enable printing."
[ ! -e "$CUPS_ETC/mime.types" -o ! -e "$CUPS_ETC/mime.convs" ] && \
WARNING="yes" && echo "Warning: Invalid value \"CUPS_ETC=$CUPS_ETC\"" \
&& echo " Users will not be able to enable printing."
@@ -483,6 +506,9 @@
! which "$COMMAND_CUPSD" >/dev/null 2>&1 && \
WARNING="yes" && echo "Warning: Invalid value \"COMMAND_CUPSD=$COMMAND_CUPSD\"" \
&& echo " Users will not be able to enable printing."
+ [ -z "$(strings $COMMAND_CUPSD | egrep 'CUPS\/1.2')" ] && \
+ WARNING="yes" && echo "Warning: Invalid cupsd version of \"$COMMAND_CUPSD\". Need version 1.2." \
+ && echo " Users will not be able to enable printing."
! which "$COMMAND_MD5SUM" >/dev/null 2>&1 && \
ERROR="yes" && echo "Error: Invalid value \"COMMAND_MD5SUM=$COMMAND_MD5SUM\""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxnode new/freenx-0.7.0/nxnode
--- old/freenx-0.6.0/nxnode 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/nxnode 2007-04-20 19:59:07.000000000 +0200
@@ -13,7 +13,7 @@
#
# License: GNU GPL, version 2
#
-# SVN: $Id: nxnode 237 2006-07-05 18:09:17Z fabianx $
+# SVN: $Id: nxnode 333 2007-04-20 17:59:07Z fabianx $
#
# 21.06.2004: - Full reconnection support
@@ -252,6 +252,9 @@
#
NODE_APPLICATION=$(node_find_application "$type")
+
+ # For rdesktop/VNC, there is no application to start
+ [ -n "$NODE_APPLICATION" ] || return
#
# Check if we want to use a mediahelper
@@ -283,6 +286,8 @@
fi
fi
+ [ "$cups" = "1" -a "$ENABLE_CUPS_SERVER_EXPORT" = "1" ] && export CUPS_SERVER="$USER_FAKE_HOME/.nx/C-$sess_id/cups/cups.sock"
+
#
# Do we need to PRELOAD any libraries?
#
@@ -407,7 +412,11 @@
# backingstore
B=""
- [ -n "$backingstore" -a "$ENABLE_2_0_0_BACKEND" != "1" ] && B="-bs $backingstore"
+ if [ -n "$backingstore" -a "$ENABLE_2_0_0_BACKEND" != "1" ]
+ then
+ [ "$backingstore" != 1 ] && B="-bs $backingstore"
+ [ "$backingstore" = 1 ] && B="+bs"
+ fi
# geometry
@@ -495,7 +504,8 @@
NODE_FAILED=""
if [ $NODE_AGENT_EXIT_STATUS -ne 0 ]
then
- echo "NX> 1004 Error: NX Agent exited with exit status 1."
+ echo "NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate \"$USER_FAKE_HOME/.nx/F-C-$sess_id/session\". You might also want to try: ssh -X myserver; $PATH_BIN/nxnode --agent to test the basic functionality. Session log follows:"
+ cat "$USER_FAKE_HOME/.nx/C-$sess_id/session" 1>&2
NODE_FAILED="failed"
fi
echo "NX> 1006 Session status: closed"
@@ -551,12 +561,13 @@
let NODE_CUPSD_PORT=$display+9000 # offset 9000 for userspace cupsd's
export NODE_CUPSD_PORT
+ export NODE_CUPSD_SOCKET="$USER_FAKE_HOME/.nx/C-$sess_id/cups/cups.sock"
+
mkdir -p "$USER_FAKE_HOME/.nx/C-$sess_id/pids/"
[ -e "$USER_FAKE_HOME/.nx/C-$sess_id/pids/cupsd" ] && return
touch "$USER_FAKE_HOME/.nx/C-$sess_id/pids/cupsd"
- mkdir -p "$USER_FAKE_HOME/.nx/C-$sess_id/cups/spool/tmp" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/spool/certs" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/ppd"
- ln -sf spool/certs "$USER_FAKE_HOME/.nx/C-$sess_id/cups/certs"
+ mkdir -p "$USER_FAKE_HOME/.nx/C-$sess_id/cups/spool/tmp" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/spool/certs" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/ppd" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/cache"
cat <<EOF > $USER_FAKE_HOME/.nx/C-$sess_id/cups/cupsd.conf
AccessLog /dev/null
@@ -566,15 +577,27 @@
TempDir $USER_FAKE_HOME/.nx/C-$sess_id/cups/spool/tmp
RequestRoot $USER_FAKE_HOME/.nx/C-$sess_id/cups/spool
ServerRoot $USER_FAKE_HOME/.nx/C-$sess_id/cups/
-Port $NODE_CUPSD_PORT
+StateDir $USER_FAKE_HOME/.nx/C-$sess_id/cups/
+CacheDir $USER_FAKE_HOME/.nx/C-$sess_id/cups/cache
+
+Listen $NODE_CUPSD_SOCKET
Browsing Off
ServerName localhost
+PidFile $USER_FAKE_HOME/.nx/C-$sess_id/pids/cupsd
<Location />
Order Deny,Allow
Deny From All
Allow from 127.0.0.1
</Location>
+
+# Allow everything for anonymous, because we are protected through UNIX socket
+<Policy default>
+ <Limit All>
+ AuthType None
+ Order deny,allow
+ </Limit>
+</Policy>
EOF
touch "$USER_FAKE_HOME/.nx/C-$sess_id/cups/printers.conf" "$USER_FAKE_HOME/.nx/C-$sess_id/cups/classes.conf"
@@ -583,20 +606,19 @@
cp -af "$CUPS_ETC"/mime.* "$USER_FAKE_HOME/.nx/C-$sess_id/cups/"
# start cupsd
- $COMMAND_CUPSD -f -c "$USER_FAKE_HOME/.nx/C-$sess_id/cups/cupsd.conf" &>/dev/null "$USER_FAKE_HOME/.nx/C-$sess_id/pids/cupsd"
+ $COMMAND_CUPSD -c "$USER_FAKE_HOME/.nx/C-$sess_id/cups/cupsd.conf" &>/dev/null > "$KDE_PRINTRC"
- echo "Port=$NODE_CUPSD_PORT" >> "$KDE_PRINTRC"
+ [ "$ENABLE_KDE_CUPS_DYNAMIC" = "1" ] && echo "Host[\$ie]=\$($PATH_BIN/nxcups-gethost)" >> "$KDE_PRINTRC"
+ [ "$ENABLE_KDE_CUPS_DYNAMIC" != "1" ] && echo "Host=$NODE_CUPSD_SOCKET" >> "$KDE_PRINTRC"
fi
fi
}
@@ -614,10 +636,10 @@
[ -n "$NODE_CUPSD_PID" ] && kill -0 $NODE_CUPSD_PID && kill -HUP $NODE_CUPSD_PID
}
-node_cupsd_get_port()
+node_cupsd_get_socket()
{
node_cupsd_setup
- echo $NODE_CUPSD_PORT
+ echo $NODE_CUPSD_SOCKET
}
node_umount_smb()
@@ -670,6 +692,16 @@
fi
#
+ # Catch NXAGENT SMB Port (sometimes the port differs from what we got from nxserver)
+ #
+
+ if stringinstring "Info: Listening for SMB connections on port" "$line"
+ then
+ SMBMOUNT_PORT=$(echo $line | cut -d"'" -f2)
+ echo "$SMBMOUNT_PORT" >"$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mport"
+ fi
+
+ #
# Session messages
#
@@ -947,7 +979,7 @@
sync=$(getparam sync)
samba=$(getparam samba)
cups=$(getparam cups)
- agent_server=$(getparam agent_server)
+ agent_server=$(getparam agent_server | sed 's/%3A/:/g')
agent_user=$(getparam agent_user)
agent_password=$(getparam agent_password)
agent_domain=$(getparam agent_domain)
@@ -969,13 +1001,17 @@
rootless=0
# Its still the clients decision
[ "$ENABLE_ROOTLESS_MODE" = "1" ] && rootless=$(getparam rootless)
+
+ # Rootless fix from 2x nxserver 1.5.0
+ realtype=$type
+ [ "$type" = "unix-application" -o "$type" = "unix-default" ] && realtype="unix-desktop"
# FreeNX specific variables
clientproto=$(getparam clientproto)
status=$(getparam status)
host=$(getparam host)
- fullscreen=""
+ fullscreen=$(getparam fullscreen)
[ "$geometry" = "fullscreen" ] && fullscreen="1"
[ "$EXPORT_USERIP" = "1" ] && export NXUSERIP="$userip"
@@ -1016,7 +1052,8 @@
proxy_cookie=$(echo $[$RANDOM*$RANDOM] | $COMMAND_MD5SUM | cut -d" " -f1)
- if [ "$clientproto" = "1.5.0" ]
+ # all newer clients support fake cookie authentication
+ if [ "$clientproto" != "1.4.0" ]
then
# enable fake cookie authentication
cookie=$proxy_cookie
@@ -1039,7 +1076,7 @@
umask 0077
cat << EOF > $USER_FAKE_HOME/.nx/C-$sess_id/options
-${kbtype:+kbtype=$kbtype,}${kbload:+kbload=$kbload,}${keymap:+keymap=$keymap,}${resize:+resize=$resize,}${CACHE}${IMAGES}${PACK}link=$link,nodelay=$nodelay,type=$type,cleanup=0,${ACCEPT}cookie=$proxy_cookie,id=$sess_id,samba=$samba,media=$media${sync:+,sync=$sync}${cups:+,cups=$cups}${keybd:+,keybd=$keybd}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}:$display
+${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}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}:$display
EOF
umask $OLD_UMASK
#samba=$samba,
@@ -1150,16 +1187,24 @@
share=$(getparam share)
computername=$(getparam computername)
dir=$(getparam dir | sed 's|$(SHARES)|MyShares|g')
- rdir=$(getparam dir | sed 's|$(SHARES)/||g')
+ # rdir=$(getparam dir | sed 's|$(SHARES)/||g')
display=$(cd $USER_FAKE_HOME/.nx/; echo C-$SERVER_NAME-*-$sessionid | rev|cut -d"-" -f2| rev)
mkdir -p "$HOME/$dir"
- error=$(PASSWD="$password" "$COMMAND_SMBMOUNT" "//$computername/$rdir" "$HOME/$dir" -o username="$username,ip=127.0.0.1,port=$port" 2>&1)
+ # wait up to 30 sec until nxagent has opened the listener port for samba connections
+ for (( i=30; $i; --i ))
+ do
+ [ -f "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport" ] && break
+ sleep 1
+ done
+ # sometimes the samba port we get from nxserver is not the right one, so let's get it from nxagent
+ port=$(cat "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport")
+ error=$(PASSWD="$password" "$COMMAND_SMBMOUNT" "//$computername/$share" "$HOME/$dir" -o username="$username,ip=127.0.0.1,port=$port" 2>&1)
if [ $? -eq 0 ]
then
- $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$rdir' mounted on: '$HOME/$dir'" -noautokill -display :$display &
+ $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$share' mounted on: '$HOME/$dir'" -noautokill -display :$display &
echo "$HOME/$dir" >> "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mpoint"
else
- $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$rdir' failed to mount: $error" -noautokill -display :$display &
+ $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$share' failed to mount: $error" -noautokill -display :$display &
fi
}
@@ -1180,25 +1225,53 @@
sess_id="$SERVER_NAME-$display-$sessionid"
# this will also setup the userspace cupsd
- IPP_PORT=$(node_cupsd_get_port)
- export IPP_PORT
+ export CUPS_SERVER=$(node_cupsd_get_socket)
if [ "$type" = "smb" ]
then
- DEVICE_URI="smb://$username:$password@localhost:$port/$share"
+ DEVICE_URI="smb://$username:$password@127.0.0.1:$port/$share"
NAME="$share"
+ ENABLE_CUPS_SEAMLESS="0"
else
- DEVICE_URI="ipp://$username:$password@localhost:$port/printers/$printer"
+ DEVICE_URI="nxipp://$username:$password@127.0.0.1:$port/printers/$printer"
NAME="$printer"
fi
-
- MODEL=$($PATH_BIN/nxclient -printer "$NAME" -noautokill -display :$display)
- [ -z "$MODEL" -o "$MODEL" = "cancel: aborted" ] && return
+ export PATH_BIN
+
+ if [ "$ENABLE_CUPS_SEAMLESS" != "1" ]
+ then
+ MODEL=$($PATH_BIN/nxclient -printer "$NAME" -noautokill -display :$display)
+ [ -z "$MODEL" -o "$MODEL" = "cancel: aborted" ] && return
+ else
+ sleep $CUPS_SEAMLESS_DELAY
+ MODEL="download_cached"
+ fi
PUBLIC="-u allow:$USER"
[ "$public" == "1" ] && PUBLIC=""
- lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC
- [ "$defaultPrinter" = "1" ] && lpadmin -d "$NAME"
+
+ if [ "$MODEL" = "download_new" -o "$MODEL" = "download_cached" ]
+ then
+ mkdir -p "$USER_FAKE_HOME/.nx/config/ppd/"
+ if [ "$MODEL" = "download_new" -o ! -r "$USER_FAKE_HOME/.nx/config/ppd/$printer.ppd" ]
+ then
+ curl --digest -o "$USER_FAKE_HOME/.nx/config/ppd/$printer.ppd" "http://$username:$password@127.0.0.1:$port/ppd/${printer}_nxdl.ppd" >>$USER_FAKE_HOME/.nx/C-$sess_id/cups/curl.log 2>&1
+ RC=$?
+ [ $RC -eq 0 -a "$ENABLE_CUPS_SEAMLESS" != "1" ] && $PATH_BIN/nxclient --message "Download successful." -noautokill -display :$display
+ [ $RC -ne 0 -a "$ENABLE_CUPS_SEAMLESS" != "1" ] && $PATH_BIN/nxclient --message "Download failed. Log is: $USER_FAKE_HOME/.nx/C-$sess_id/cups/curl.log" -noautokill -display :$display
+ fi
+ MODEL="$USER_FAKE_HOME/.nx/config/ppd/$printer.ppd"
+ fi
+
+ if [ ! -r "$MODEL" ]
+ then
+ # Foomatic and co
+ /usr/sbin/lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC
+ else
+ /usr/sbin/lpadmin -p "$NAME" -E -v "$DEVICE_URI" -P "$MODEL" $PUBLIC
+ fi
+
+ [ "$defaultPrinter" = "1" ] && /usr/sbin/lpadmin -d "$NAME"
}
nxnode_func()
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxprint new/freenx-0.7.0/nxprint
--- old/freenx-0.6.0/nxprint 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/nxprint 2007-01-24 16:51:37.000000000 +0100
@@ -6,12 +6,9 @@
#
# License: GPL, version 2
#
-# SVN: $Id: nxprint 222 2006-07-04 22:23:46Z fabianx $
+# SVN: $Id: nxprint 289 2007-01-24 15:51:37Z fabianx $
#
-# disable foomatic by default
-FOOMATIC="no"
-
HELP="no"
DRIVERS="no"
PRINTERS="no"
@@ -35,7 +32,7 @@
echo ""
echo "Syntax: nxprint --help"
echo " nxprint --drivers"
- echo " nxprint --printes"
+ echo " nxprint --printers"
echo
echo " --drivers prints a list of available CUPS drivers"
echo " --printers prints a list of available CUPS printers"
@@ -45,21 +42,23 @@
if [ "$DRIVERS" = "yes" ]
then
echo "driver|Raw|Raw Queue|raw"
+ echo "driver|Download (CUPS)|Download from CUPS server (cached)|download_cached"
+ echo "driver|Download (CUPS)|Download from CUPS server (redownload)|download_new"
{
- cd /usr/share/cups/model
- awk -F '"' '/*Manufacturer:/ { a[FILENAME]=$2 }
- /*NickName:/ { b[FILENAME]=$2 }
+ cd /usr/share/ppd/
+ awk -F '"' '/\*Manufacturer:/ { a[FILENAME]=$2 }
+ /\*NickName:/ { b[FILENAME]=$2 }
END {
for (i in a)
- print "driver|" (a[i]=="ESP"?substr(b[i],0,index(b[i]," ")-1):a[i]) "|"b[i]"|"i
- }' *.ppd
- } | sort
+ print "driver|" (a[i]=="ESP"?substr(b[i],0,index(b[i]," ")-1):a[i]) "|"b[i]"|"i"|en"
+ }' $(find -name "*.ppd")
- if [ $FOOMATIC="yes" ]
+ if [ "$ENABLE_FOOMATIC" = "1" ]
then
- # TODO: Add support for foomatic-style ppds
- :
+ [ -z "$COMMAND_FOOMATIC" ] && COMMAND_FOOMATIC="foomatic-ppdfile"
+ $COMMAND_FOOMATIC list | awk -F'"' '{ A=""; if ($4 == "HP") { B=substr($6,index($6," ")+1); A=" "substr(B,0,index(B," ")); } printf("driver|%s%s|%s|%s|%s\n",$4,A,$6,$2,substr($3,2)) } '
fi
+ } | sort
fi
if [ "$PRINTERS" = "yes" ]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxserver new/freenx-0.7.0/nxserver
--- old/freenx-0.6.0/nxserver 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/nxserver 2007-05-29 17:27:07.000000000 +0200
@@ -11,7 +11,7 @@
#
# License: GNU GPL, version 2
#
-# SVN: $Id: nxserver 241 2006-07-09 14:40:18Z fabianx $
+# SVN: $Id: nxserver 334 2007-05-29 15:27:07Z fabianx $
#
# Read the config file
@@ -798,6 +798,7 @@
server_nxnode_echo()
{
+ log 6 "server_nxnode_echo: $@"
[ "$SERVER_CHANNEL" = "1" ] && echo "$@"
[ "$SERVER_CHANNEL" = "2" ] && echo "$@" >&2
}
@@ -839,18 +840,30 @@
*running*)
[ "$KILL_WAIT_PID" = "1" ] && kill $SERVER_WAIT_PID
KILL_WAIT_PID=0
+ log 6 session_status $uniqueid "Running"
session_status $uniqueid "Running"
[ "$SERVER_CHANNEL" = "1" ] && SERVER_CHANNEL=2
;;
*closed*)
+ log 6 session_close $uniqueid
session_close $uniqueid
;;
*suspended*)
[ "$KILL_WAIT_PID" = "1" ] && kill $SERVER_WAIT_PID
KILL_WAIT_PID=0
+ log 6 session_suspend $uniqueid
session_suspend $uniqueid
;;
+ *suspending*)
+ log 6 session_status $uniqueid "Suspending"
+ session_status $uniqueid "Suspending"
+ # we need to stop sending to client as it will have already
+ # closed his side of the channel and this will lead to not
+ # closed sessions.
+ SERVER_CHANNEL=0
+ ;;
*terminating*)
+ log 6 session_status $uniqueid "Terminating"
session_status $uniqueid "Terminating"
# we need to stop sending to client as it will have already
# closed his side of the channel and this will lead to not
@@ -1033,12 +1046,12 @@
server_loadbalance()
{
SERVER_HOST="127.0.0.1"
- if [ -n "$SERVER_LOADBALANCING" ]
+ if [ -n "$LOAD_BALANCE_SERVERS" ]
then
SERVER_HOST=""
if [ -n "$PREFERRED_HOST" -a "$ENABLE_LOAD_BALANCE_PREFERENCE" = "1" ]
then
- stringinstring " $PREFERRED_HOST " " $SERVER_LOADBALANCING " && SERVER_HOST="$PREFERRED_HOST"
+ stringinstring " $PREFERRED_HOST " " $LOAD_BALANCE_SERVERS " && SERVER_HOST="$PREFERRED_HOST"
fi
# Fallback if still empty
@@ -1340,6 +1353,7 @@
PARAMS=$SERVER_PARAMS
# TODO: This redirecion is crap here.
server_nxnode_start --addprinter "$USER" "$PARAMS" >/dev/null 2>&1 | log_error >/dev/null
+ echo_x "NX> 719 CUPS printer: running"
;;
*)
# disabled for 1.4.0-5 snapshot client
@@ -1630,9 +1644,9 @@
else
CMD_PARAMS=$(cmd_parse_3_params "$2")
[ -z "$CMD_PARAMS" ] && exit 1
+ shift
fi
shift
- shift
for i in $CMD_PARAMS;
do
CMDLINE=$(session_get_cmdline $i)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/freenx-0.6.0/nxsetup new/freenx-0.7.0/nxsetup
--- old/freenx-0.6.0/nxsetup 2007-01-23 04:22:50.000000000 +0100
+++ new/freenx-0.7.0/nxsetup 2007-02-24 01:17:15.000000000 +0100
@@ -5,7 +5,7 @@
#
# License: GNU GPL, version 2
#
-# SVN: $Id: nxsetup 228 2006-07-04 23:38:53Z fabianx $
+# SVN: $Id: nxsetup 330 2007-02-24 00:17:15Z fabianx $
#
HELP="no"
@@ -193,6 +193,9 @@
fi
+
+ # the nx user account might be locked, so unlock it.
+ passwd -u nx
}
install_nx()
@@ -326,7 +329,16 @@
chown -R nx:root $NX_ETC_DIR
chown -R nx:root $NX_HOME_DIR
chown nx:root "$NX_LOGFILE"
+
echo "done"
+
+ if [ -d "$CUPS_BACKEND" ]
+ then
+ echo -n "Setting up cups nxipp backend ..."
+ cp -af "$CUPS_BACKEND/ipp" "$CUPS_IPP_BACKEND"
+ chmod 755 "$CUPS_IPP_BACKEND"
+ echo "done"
+ fi
}
test_nx()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org