[FreeNX-kNX] freenx problems with smb printing setup

Martin Steigerwald ms at teamix.de
Wed Dec 21 15:48:34 UTC 2005


Hello,

these are the freenx problems I found when trying to setup printing via SMB 
(see my previous mail):

- nxnode uses "-noautokill" as option to nxclient, but nxclient 1.5.0-138 does 
not seem to support this options and displays an error dialog instead of the 
intended dialog -> I removed that option (see diff below)

- nxnode uses lpadmin as a the user of the session, but a user doesn't have 
lpadmin in its path -> I expicitely specified the path

- $KDEHOME does not appear to be set in KDE 3.3 and thus the default value for 
$KDEPRINTRC does not work anymore (/etc/nxserver/node.conf) --> I changed it 
to KDE_PRINTRC="/home/$USER/.kde/share/config/kdeprintrc" cause 
KDE_PRINTRC="~/.kde/share/config/kdeprintrc" didn't work

Okay, thats it. I can do bug reports sometimes but I wanted to post it right 
now so that people who come across the same problems can Google it.

appserver:/# diff -u /usr/lib/nx/nxnode.dist  /usr/lib/nx/nxnode
--- /usr/lib/nx/nxnode.dist     2005-10-08 19:36:07.000000000 +0200
+++ /usr/lib/nx/nxnode  2005-12-21 18:30:42.529485000 +0100
@@ -797,10 +797,10 @@
        ERROR=$(PASSWD="$password" "$COMMAND_SMBMOUNT" "//$computername/$rdir" 
"$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/$rdir' mounted on: '$HOME/$dir'" 
-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/$rdir' failed to mount: $ERROR" 
-display :$display &
        fi
 }

@@ -830,12 +830,13 @@
                DEVICE_URI="ipp://localhost:$port/printers/$printer"
                NAME="$printer"
        fi
-       MODEL=$($PATH_BIN/nxclient -printer "$NAME" -noautokill -display :
$display)
+       MODEL=$($PATH_BIN/nxclient -printer "$NAME" -display :$display)
        [ -z "$MODEL" -o "$MODEL" = "cancel: aborted" ] && return

        PUBLIC="-u allow:$USER"
        [ "$public" == "1" ] && PUBLIC=""
-       lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC
+# Teamix: User doesn't have lpadmin in his path
+        /usr/sbin/lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC
        [ "$defaultPrinter" = "1" ] && lpadmin -d "$NAME"
 }

Regards,
-- 
Martin Steigerwald
Trainer / Systems Engineer



More information about the FreeNX-kNX mailing list