Work from home (WFH) introduce a lot of request of air-print. Every time I need to open Dell Document Hub to print because my printer Dell C1760nw does not support AirPrint by itself.
Then I went to basement and found there is a very old Dell computer which is running windowsXP. I plan to create a printer server by this old computer.
Step 1. install system. I selected ubuntu minimalCD (32-bit PC (i386, x86) Ubuntu 18.04 “Bionic Beaver”). And then convert it to img file and write to a usb drive[ref].
- Download the ubuntu minimalCD file.
- Open the Terminal.
- Convert the .iso file to .img using the convert option of hdiutil:
hdiutil convert -format UDRW -o mini.img mini.iso
Note: OS X tends to put the.dmg
ending on the output file automatically. Rename the file by typing:mv mini.img.dmg mini.img
- Run
diskutil list
to get the current list of devices - Insert your flash media
- Run
diskutil list
again and determine the device node assigned to your flash media (e.g. /dev/disk3) - Run
diskutil unmountDisk /dev/diskN
(replace N with the disk number from the last command – in the previous example, N would be 2) - Execute
sudo dd if=mini.img of=/dev/rdiskN bs=1m
(replace/path/to/downloaded.img
with the path where the image file is located; for example,./ubuntu.img
or./ubuntu.dmg
).
Note: Using/dev/rdisk
instead of/dev/disk
may be faster.
Note: If you see the errordd: Invalid number '1m'
, you are using GNU dd. Use the same command but replacebs=1m
withbs=1M
.
Note: If you see the errordd: /dev/diskN: Resource busy
, make sure the disk is not in use. Start the ‘Disk Utility.app’ and unmount (don’t eject) the drive. - Run
diskutil eject /dev/diskN
and remove your flash media when the command completes - Install the system and select CUPS printer server, openSSH server. Set up you username and password.
Step2. Sart CUPS server [ref].
- Open the file /etc/cups/cupsd.conf
In the blocks:
<Location /> , <Location /admin> and <Location /admin/conf>
Add the following line :
Allow all - $ sudo systemctl restart cups.service
Step3. Install printer driver.
- Download Xerox Phaser 6000B series printer drivers.
- Extract the zip file contents and get a .deb file.
- $ sudo apt install ./xerox-phaser-6000-6010_1.0-1_i386.deb
Step4. Set up CUPS. Goto the server:631 port by http://192.168.1.64:631 – on remote system (Replace the IP).
- admin>add printer.
- select Dell C1760nw printer
- select PostScript Printer Description (PPD) from Xerox > xerox-phaser 6000.
- print the test page. It should work. Otherwise get some help by google.
Step5. Install avahi-daemon.
-
$ sudo apt install avahi-daemon
- Download airprint-generate.py to generate a printer.service file.
$ wget -O airprint-generate.py –no-check-certificate https://raw.githubusercontent.com/tjfontaine/airprint-generate/master/airprint-generate.py
$ sudo apt install python-cups
$ python airprint-generate.py
$ sudo cp AirPrint-Dell_Dell_C1760nw_Color_Printer.service /etc/avahi/services/ - Start avahi-daemon.
$ sudo systemctl restart avahi-daemon
Step6. Enjoy your AirPrint.