I have successfully installed my printed machine, I have organized my installation for your reference!
1, compile the kernel
Check the kernel to see if the kernel supports the USB port before installing the printer. If you don't join the following:
# Usb stuff device USB device UHCI Device ULPT
If you can't confirm that UHCI is still ohci, you can use the dmesg command to view:
#dmesg | Less
Or enter the following:
#dmesg | GREP UHUB
2, edit rc.conf
After the end of the kernel compilation, edit /etc/rc.conf, add the following:
USBD_ENABLE = "YES"
3. Restart your computer to enable the new kernel.
4, check the equipment node
At this time, you will see if there is a ULPT0 file, and if you don't need to create him as follows:
#CD / DEV # / dev / makedev ulpt0
5. Install the printer software and drive.
I installed the following software:
/ usr / ports / print / ghostscript-gnu / usr / ports / print / hpijs / usr / ports / print / Apsfilter / usr / ports / print / cups / usr / ports / print / foomATIC-DB
I didn't install this below: / usr / ports / print / foomatic-db-engine But I still recommend that you install them before installing CUPS.
I downloaded Foomatic-RIP and Foomatic-Gswrapper to / usr / local / bin directory (you can also download Foomatic-Filters on http://www.linuxprinting.org to install:
#CD / usr / local / bin #Fetch http://www.linuxprinting.org/foomatic-rip
#fetch http://www.linuxprinting/foomatic-gswrapper
Then run the following command:
#CHMOD 755 Foomatic-Rip Foomatic-Gswrapper
#LN -S / USR / local / bin / foomatic-rip / usr / local / libexec / cups / filter / foomatic-rip
I have prepared my printer driver, my printer is HP Deskjet 3420.
The driver can be searched in the following URL (there are many brand printers driven!):
http://www.linuxprinting.org/printer_list.cgi
The drive is a PPD file, download the PPD file to / usr / local / share / CUPS / MODEL, and then set permissions:
#Chown root: Wheel hp-deskjet_3420-hpijs.ppd chmod 644 hp-deskjet_3420-hpijs.ppd
6. The preparation work is over, and now it is now configuring the printer.
Open the browser Enter: http: // localhost: 631 or http: // localhost: 631 / admin If you use the former enters, then you enter the following link "Do Administration Tasks", then you You need to enter an administrator name (user name) and password (Password). If you use the latter to enter, you will directly request the Administrator Name and Password (Password). My: http://127.0.0.1: 631 or http://127.0.0.1:631/admin I used the latter.
Administrator Name (User Name) The super administrator root, password (password) of your machine is of course the password of the root! For the first time I use CUPS, I must click Add Printer. Then there is a form, the meaning of the form is as follows (take my HP Deskjet 3420: Name: 3420 (How do you like how to call your printer?)
Location: Local Printer (just in this way!)
Description: HP Deskjet3420 (describe your printer)
Then click the Continue button, and the present interface is the selection of the printer link port.
My choice is: USB PRINTER # 1
Then click the Continue button, the current interface is the interface to select the printer manufacturer, and my Of course choose: HP.
Then point the Continue button, look carefully and drive the driver that matches your printer. I chose HP Deskjet 3420 FoomATIC / HPIJS (EN).
Then click the Continue button to end the configuration.
7. Start the CUPS first su to the super administrator, then execute the following:
# / usr / local / etc / rc.d / cups.sh start
OK, now you use the following command to test:
#LP
8, OpenOffice printer configuration
Use the following command: $ OpenOffice-1.1-Spadmin Click "Add Printer" in the pop-up window. Select "Configure a printer" in a new window. When you click "Continue", look at the existing drive in the existing drive in a new window. If you have selected it and click Continue. If not, click the "Enter" button. In the new pop-up window, search for printer driver in the following directory: / usr / local / etc / cups / ppd / should find it, all the way "OK", "Continue" is OK.