[FreeNX-kNX] Printen to private network
Alastair Johnson
alastair at solutiontrax.com
Thu Oct 12 20:57:29 UTC 2006
On Thursday 12 October 2006 21:19, Marcel kraan wrote:
> My nxserver hangs on internet at a provider in holland
>
> Is it possible to print from the terminals (samba) from a private network.
> I have setup a cups printserver at the nx server.
> I have samba and lpd running on the terminals
>
> can i print to the private network???
> i can print to the internet IP but?? direct to the terminal?
> Is this possible?
It is possible, but you probably need to modify the nxnode script. I think you
need CUPS 1.1.x on the server (FC5 uses 1.2.x which doesn't work with FreeNX
yet) and on the client use 'Enable SSL encryption of all traffic'. This post
from the archive is the best I've seen for getting SMB printing working:
-----------------------------------------------------------------
Re: [FreeNX-kNX] printing
From: Martin Steigerwald <ms at teamix.de>
To: User Support for FreeNX Server and kNX Client <freenx-knx at kde.org>
Am Dienstag, 24. Januar 2006 20:49 schrieb Alastair Johnson:
> The first problem is in the freenx nxnode script in function
> cmd_node_addprinter() which handles the addprinter request from the client.
> This has to determine the printer driver to use, so calls a script
> confusingly called nxclient. This is NOT a client! It is meant to replicate
> certain functions of the nomachine nxclient as used by the nxserver though,
> such as allowing you to select a printer driver. For me this printer driver
> selection never displayed however, so for testing I modified
> cmd_node_addprinter() to bypass this for testing, hardwiring it to the
> driver for my printer. Another option may be to install the nomachine
> client on the server, since it seems the freenx nxclient script checks for
> the presence of the nomachine client, and calls it if present. I've not
> tried that yet though...
Hello,
yes that worked. After applied the patch I described in my "freenx problems
with smb printing setup" post I got dialogs to configure my printer driver.
It needs NoMachine's nxclient on the server which is generally a good idea,
cause it provides some other features:
1) nice dialog window for Terminate / Suspend instead of ugly xdialog stuff
2) Suspend / Terminate buttons when you move the mouse to the title bar of the
window that displays the FreeNX session.
Well, I paste the relevant snippet here:
-----------------------------------------------------------------------
- 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"
}
-----------------------------------------------------------------------
More information about the FreeNX-kNX
mailing list