The HP Laserjet 1018 printer doesn’t work with Linux out of the box. It’s not hard to get going though. My instructions are for Fedora (I have Fedora 7) – with a little bit of flexibility you should be able to use this with any Linux distribution – Ubuntu, Mandrake, etcetera. In fact, I believe the drivers may also work on OpenBSD, FreeBSD, Mac OS X and Solaris – as long as the system uses the CUPS/Ghostscript/Foomatic printer spooler system. The reason it doesn’t work out of the box is because Fedora don’t supply the necessary drivers – it is not yet clear whether the drivers contain patented components which can’t be distributed from the US (where Fedora comes from).
These instructions also work with these printers: Minolta/QMS magicolor 2300 DL, Minolta/QMS magicolor 2200 DL, Konica Minolta magicolor 2430 DL, Minolta Color PageWorks/Pro L, HP LaserJet 1022, HP LaserJet 1020, HP LaserJet 1018, HP LaserJet 1005, HP LaserJet 1000 – in fact, with any printer that uses the ZjStream protocol.
The “Livna” package repository for those outside of the countries where the relevant patents apply contains a driver, but some of its components are missing, and it is not sufficient to get the printer working on its own. I might have missed something – if you have any more insight, let me know!
Note also that the instructions on the home page for the driver will not work on a default Fedora installation, as they do not allow for SELinux. My instructions below will sort you out!
Note secondly (16-Mar-09)… /usr/bin/hp-setup (part of the hplip package) now can set up at least the HP LaserJet 1018 (and probably other HPs too), using a nice graphical interface, automatic – so you can just try running that for something simpler. There were a couple of SELinux errors that stopped it working and I can’t remember how I fixed them – had to change context on a couple of directories. Perhaps the default policies or hp-setup will have fixed this by now; I did report it as a bug – the bug was closed as fixed but I have not tested it.
1. Don’t plug the printer in yet!
If you have already plugged the printer in to your computer, you might need to delete the (non-working) driver which will have automatically been set up. From the desktop menu, choose “System” then “Printing” – then delete the printer and unplug it from your computer.
2. Download and compile the foo2zjs code
For this and all commands below, you must first become the root (administrator) user:
$ su - Password:
You may first need to install some other necessary packages for you to be able to compile the code.
# yum -y install gcc automake vim-enhanced groff
Download and compile the code:
# cd /tmp # wget http://foo2zjs.rkkda.com/foo2zjs.tar.gz # tar -xzf foo2zjs.tar.gz # cd foo2zjs # make
3. Retrieve the printer firmware
The printer needs firmware installed on your system. The package we’ve already downloaded contains help for doing that. However you can also copy the firmware file off the installation CD that comes with the printer.
# ./getweb 1018
Replace the “1018” in the last line with the actual numbers from the model of your printer, or cpwl for the Minolta Color PageWorks/Pro L.
4. Install the driver and other files
# make install
Now you must install a script that will automatically send the firmware to the printer when it is switched on:
# make install-hotplug
We’re not quite there yet. The above script installs the firmware to a certain directory, but the default SELinux installation on Fedora Core does not allow access to files in that directory when your printer is plugged in. We need to move the firmware, and alter the script that loads the firmware to look in the right place. (Again, change the precise name of the file to match your printer – the previous installation command should have told you which files were downloaded and installed).
# cp /usr/share/foo2zjs/firmware/sihp1018.dl /lib/firmware/
Now, open and edit this file in a text editor (again, as root): /etc/hotplug/usb/hplj1000. The filename may be different if your printer is not an HP LaserJet.
Find these lines:
# # Directory to find downloadable HP firmware files sihpMMMM.dl # FWDIR=/usr/share/foo2zjs/firmware
Replace that last line with:
The use of this directory is necessary for compatibility with the default SELinux setup – otherwise much more complicated procedures are needed to change your system’s SELinux configuration.
5. Plug the printer in!
It may be a good idea to monitor the system messages as you do so, to give you any clues about what’s going right or wrong. For me, a succesful attempt looked like this:
% tail -f /var/log/messages Feb 7 16:35:21 localhost kernel: usb 6-5: new high speed USB device using ehci_hcd and address 41 Feb 7 16:35:22 localhost kernel: usb 6-5: configuration #1 chosen from 1 choice Feb 7 16:35:22 localhost kernel: usblp0: USB Bidirectional printer dev 41 if 0 alt 0 proto 2 vid 0x03F0 pid 0x4117 Feb 7 16:35:22 localhost /etc/hotplug/usb/hplj1018: foo2zjs: loading HP LaserJet 1018 firmware /lib/firmware/sihp1018.dl to /dev/usb/lp0 ... Feb 7 16:35:22 localhost /etc/hotplug/usb/hplj1018: foo2zjs: ... download successful.
Notice those last two lines in particular. You should also get a line like this one, telling you that the correct driver has been automatically set up for the printer:
Feb 7 16:35:22 localhost hal_lpadmin: Added printer HP_LaserJet_1018
When the firmware is downloaded to your printer, your printer should whirr and click a bit. This was the stage that failed for me with the Livna packages – though I got the message telling me that the firmware had been downloaded succesfully, it evidently hadn’t – the printer sat there, lifeless.
You should now be able to print succesfully from any application. Possibly some applications might need restarting before they are aware of the new printer; but this situation is becoming rare. Monitor your system’s log files to see what’s going on (particularly /var/log/messages and /var/log/cups/*). You can edit preferences for your printer using the configuration tool mentioned back in step 1.
- foo2zjs: a linux printer driver for ZjStream protocol
- My blog, “More Than Words”.
- A parable about Richard Dawkins.
- I also wrote this website, BCSE (the “British Centre for Science Education”) Revealed, and this blog exposing a bogus group of science educators.
- My homepage.
Feedback / E-mail / Anything I forgot to mention?: use the address on my homepage.
(Of course, please try Google first).