[FreeNX-kNX] Fedora Core 6 and Cups 1.2.7 Working without lpadmin

Marcel kraan marcel at kraan.net
Fri Dec 8 11:36:45 UTC 2006


Hello all,

I'am was working for 3 days on the FeeNX printing problem with fedora core 6.
I have now a complete working nxnode script for printing with cups/samba

The biggest problem was that lpadmin was asking for the passwd and that was already given.
So i had to replace the lpadmin command that creates the ~/HOME/.nx/C-..../cups/printers.conf with my own code.

So i have changed the following:

these
#Port $NODE_CUPSD_PORT
#ServerName localhost
for
Listen localhost:$NODE_CUPSD_PORT


And :
i have replace this command
#/usr/sbin/lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC

for this

#lpadmin does not authenticate so this is my solution marcel at kraan.net
cat <<EOF > $USER_FAKE_HOME/.nx/C-$sess_id/cups/printers.conf
# printer configuration file for CUPS v1.1.27# Written by marcel at kraan.net  on Thu 07 Dec 2006 06:19:00 AM CET
<DefaultPrinter $NAME>
Info $NAME
DeviceURI $DEVICE_URI
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
Autodetected No
AllowUser $username
</Printer>
EOF
killall -HUP cupsd

Sorry for the killall but creating the printers.conf comes after the startup of cupsd.
Printing is working very well.
I have also removed the MODEL because i'am always printing RAW to printer because the driver will be installed on the (thin)client.
If you like that you can remove the following:

         #MODEL=$($PATH_BIN/nxclient -printer "$NAME" -display :$display)
         #[ -z "$MODEL" -o "$MODEL" = "cancel: aborted" ] && return

         PUBLIC="-u allow:$USER"
         [ "$public" == "1" ] && PUBLIC=""
         #/usr/sbin/lpadmin -p "$NAME" -E -v "$DEVICE_URI" -m "$MODEL" $PUBLIC


This helpt me very much because i have now a new version cups.
So this can work with newer version of Operating Systems.


if there is someone who can fix the lpadmin passwd problem so let me know...
i'am very interested in that.






-- 
  ___ _        _   _     ___   _   ___
| _ |_)__ _  /_\ (_)_ _| _ ) /_\ / __|
| _ \ / _` |/ _ \| | '_| _ \/ _ \ (_ |
|___/_\__, /_/ \_\_|_| |___/_/ \_\___|.com
       |___/

BigAirBAG BV
Amsterdamseweg 68
1981 LH  Velsen Zuid
The Netherlands
VAT/BTW             : NL8065.67.831.B01
Chamber of Commerce : 08076232
Phone               : +31 654378837
Fax                 : +31 235513420
Inter               : +42 3663172486




More information about the FreeNX-kNX mailing list