Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Setting up CUPS and Splix on a NetBSD system (draft)
for Samsung and new-Xerox printers
Versions used:
- NetBSD 6.1.2 (GENERIC) amd64
- pkgsrc 2013Q4 & wip-20140118
Installing CUPS and Splix
Install and start the CUPS daemon,
pkg_info | egrep -i 'foomatic|ghost|a2ps|poppler|cups|lpr|splix'
#pkg_delete LPRng-core LPRng-doc LPRng
echo $PKG_PATH
pkg_add cups
cd /etc/
cp /usr/pkg/share/examples/rc.d/cupsd rc.d/
cat >> rc.conf <<EOF9
rc.d/cupsd start
ps aux | grep cups
Make sure you've got pkgsrc 2013Q4 as /usr/pkgsrc/ so it doesn't conflict with the binaries you are using,
cd /usr/
#rm -rf pkgsrc*
cvs -q -z2 -d checkout -r pkgsrc-2013Q4 -P pkgsrc
fetch and extract latest wip into that,
cd pkgsrc/
wget ...
tar xzf pkgsrc-wip-20140118-snapshot.tar.gz
and install the additional Splix PPDs for your Samsung or new-Xerox printer,
cd wip/splix/
make show-depends
make show-options
unset PKG_PATH
make install
Configuring CUPS
Make sure the daemon is providing its web service,
netstat -an -f inet | grep 631
Enable remote access to the CUPS web interface,
cd /etc/
ln -s ../usr/pkg/etc/cups
cd cups/
cp cupsd.conf cupsd.conf.dist
<Location />
Order allow,deny
Allow 192.168.0
<Location /admin>
Order allow,deny
Allow 192.168.0
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow 192.168.0
and apply,
cd ../
rc.d/cupsd restart
Configuring a printer
Try to configure the printer through the web interface but you'll see it's a no go,
Administration > Add a printer (identify as root)
or add the printer from the command line,
lpadmin -p scx1 -v usb:/dev/ulpt0 -P /usr/pkg/share/cups/model/samsung/scx4200.ppd
#lpadmin -p scx2 -v usb:/dev/ulpn0 -P /usr/pkg/share/cups/model/samsung/scx4200.ppd
With libusb disabled (install binary cups pkg, then compile ghostscript with cups option, then instyou should see the USB devices provided by the kernel. With libusb enabled... (TODO)
Additional notes
To wipe out CUPS entirely from your NetBSD system,
#pkg_delete poppler poppler-utils cups splix ghostscript ghostscript-fonts
pkg_delete cups splix ghostscript foomatic-filters-cups foomatic-filters ghostscript-gpl ghostscript-fonts
rm -rf /var/spool/cups/
rm -rf /var/run/cups/
rm -rf /var/log/cups/
rm -rf /var/cache/cups/
rm -rf /usr/pkg/etc/cups/
rm -f /etc/rc.d/cupsd
userdel -r lp
groupdel lp
and see what's left,
pkg_info | egrep -i 'foomatic|ghost|a2ps|poppler|cups|lpr|splix'
Ready to go
Try to print something either using the CUPS intercface (print test page) on the printer page, or on the command line with,
echo line 1\\nline 2 | /usr/pkg/bin/lp
If you get this error while trying to print something, e.g.,
/usr/pkg/bin/lp: Unsupported document-format "text/plain".
References -- Cups
how to setup cups in netbsd:
PPD files vs printer drivers also LPD vs LPRng vs CUPS:
New cups - no usb printers?!:
References -- Splix
SPL driver for UNIX:
The pkgsrc-wip project:

(obsolete, see the new doc)