Installing a printer in Linux should not be a challenge nowadays… It shouldn’t, should it? Shoot it, it shouldn’t.
I have this wonderful Xerox Phaser 3052 that works beautifully and I had to get it working with my new Linux notebook. I vaguely remembered that when I was installing it for my old notebook the procedure was not very despicable, so I was full of high hopes and thought I would be printing away in a few minutes. It works for the old one, right? Well, whaddayaknow, two days later I have a simple install procedure that works and a desire to strangle a few Xerox and Debian developers.
The necessary filters and all that (driver package) are available at Xerox Driver download for Phaser 3052 and that is wonderful. Simply download that and then load also the Debian package for the Phaser 3010-3040 driver.
Unpack the second one and marvel at the i386 architecture .deb package. Now, of course, we are running a 64 bit architecture, so we will have to add the i386 to be able to use that. Fortunately, that is simple:
dpkg --add-architecture i386 apt-get update apt-get install libcups2:i386 apt-get install ./xerox-phaser-3010-3040_1.0-28_i386.deb
It should all work like a charm. Now we have to install the filters. Unpack the first package and change into the “uld” directory. If you now try to run install-printer.sh, you will be not surprised that it doesn’t work.
# ./install-printer.sh **** Running install ... **** Press 'Enter' to continue or 'q' and then 'Enter' to quit. : ./noarch/package_install.sh: 57: local: 3052/uld/noarch/.version-printer: bad variable name **** Install finished.
Spending a long evening trying to figure out what is wrong with the script did not help. Fortunately, in the morning I was a little brighter and suddenly decided to check what shell the scripts are running with. And, damn, it isn’t bash.
# l /bin/sh lrwxrwxrwx 1 root root 4 Jan 24 2017 /bin/sh -> dash*
There is a little what’s it in the fact that all scripts are written for bash and the Debian developers decided that switching to dash would be a bright idea. No, really? Ok, now the fix is obvious and simple:
# cd /bin/ # rm sh # ln -s bash sh
And suddenly, like if by magic, it all works…
# ./install-printer.sh **** Running install ... **** Press 'Enter' to continue or 'q' and then 'Enter' to quit. : **** Are you going to use network devices ? If yes, it is recommended to configure your firewall. **** If you want to configure firewall automatically, enter 'y' or just press 'Enter'. To skip, enter 'n'. : **** Registering CUPS backend ... **** CUPS restart OK. **** Print driver has been installed successfully. **** Install finished.
The rest is simple, just follow any guide into setting up CUPS. Go to the http://localhost:631/printers/ and add the printer. I use the lpd connection with a static IP address but it pretty well auto-identifies a couple of other connections that can be used with a dynamic address, so this is all straightforward.Permanent link to this article →