As there is no cups (yet?) compiled for openslug, I installed the version from the unslung feed, which works quite well. You could also compile cups package with a working OE environment using the command "bb cups" and take the build packages in your deploy/ dir. See section "Build a package" here: http://www.nslu2-linux.org/wiki/Development/MasterMakefile
Here comes the detail:
1. Download necessary packages
Easiest way to do this is to follow the instructions on bootstrapping optware at http://www.nslu2-linux.org/wiki/Optware/Slugosbe. Alternatively, because there are some dependencies, you need to get the following packages from unslung (i.e. using wget):
If you installed openssl, you might need other packages like
After downloading, you can install do a
ipkg install *.ipk
in the folder where you saved the packages.
After you install, follow the directions from the HowTo.AddPrinter page to generate certificates. I had to run this from /opt/bin to get openssl to run.
2. Kernel printer module
This is available from the openslug feed:
ipkg install kernel-module-usblp
Note: it may be necessary to run depmod -a for modprobe to find usblp
3. Adapt init script
The cups init script can be found in /opt/doc/cups/S88cups. You just have to alter 2 lines:
if ( !(lsmod | grep "^printer" -q) ); then
if ( !(lsmod | grep "^usblp" -q) ); then
also change the following line. (At least in Openslug 2.7)
Original: /bin/killall cupsd 2>/dev/null
Modified: /usr/bin/killall cupsd 2>/dev/null
Then place the init script next to the others in /etc/init.d and create symlinks in the /etc/rcX.d directory for each runlevel you want cups to run under. (Note: rc3.d is the normal run level) To create the symbolic link for runlevel 3: ln -s /etc/init.d/S88cups /etc/rc3.d/S88cups
Normally, no additional configuration should be necessary, /dev/lp0 is by default configured as a raw printer named hp990c. For addition information see HowTo.AddPrinter.
Note: I had to setup cups to use parallel:/dev/usb/lp0 as default to print, as openslug 3.1 puts the usb devices in a folder. I also had to issue the command: chmod u+s /opt/sbin/cupsd as discussed in HowTo.AddPrinter.
N.B. You don't need to chmod cupsd if you are an openslug 3.10 beta user.
After printer insertion, the created device node could be owned by root:
$ls /dev/usb/lp* -la crw-rw---- 1 root lp 180, 0 Nov 13 19:23 /dev/usb/lp0
If this is the case, it may be necessary to add
chown lp:users /dev/usb/lp0
to a script to get the printer responding. [I have found this to be true of cups 1.3.3-1; I haven't needed to do this before - Caysho]
5. Allowing for disk spindown
Normally, cups prevents disks from spindown as it generates new root certificates every 5 minutes. With the following changes, disk spindown is possible again:
This assumes you had spindown working before ;-), i.e. by having persistant ram disks at least for /var/log and /var/run and your hd being mounted noatime.
6. Samba Share
If you want to share the printer over samba, follow the directions in the standard printing over Samba howto. Then Samba should automatically find your printer. You then have to simlink to the binaries in /opt/bin like follows:
ln -s /opt/bin/lp /bin/lp
ln -s /opt/bin/lpstat /bin/lpstat
ln -s /opt/bin/lpr /bin/lpr
Then you should be able to print over the share using your client driver.