Installing from tarball:
See www.cups.org for more informations
Installing from RPMs:
Install the CUPS RPM that you can found there.
Install then the print filters. You can found them there.
You are done with the CUPS installation. You can check that all is ready by issuing:
[bash] lpstat –p –d -o ENTER
You should see that server is not started
[bash] cupsd & ENTER
Should start the server
[bash] lpstat –p –d -o ENTER
Should see which printers are installed. There should be no one (you don’t installed any, right?)
[bash] lpadmin –dPRINTER_NAME –vparallel:/dev/lp0 –mlaserjet.ppd ENTER
Should install the printer named PRINTER_NAME that is installed on paralle port 1 (/dev/lp0) and using the protocol and description in laserjet.ppd (exactly in /usr/share/cups/ppd/laserjet.ppd)
The critical part of this command is the laserjet.ppd file. If you have a HP Laserjet or HP Deskjet printer, you should use one of the two PPD file given with CUPS. If not, the esoteric part will follow.
[bash] lpadmin –x PRINTER_NAME
Will remove the previously installed printer.
If you have a Laserjet or Deskjet printer (or a PCL one) , you are done. Jump to the Test your installed printer
If you don’t have a Laserjet or Deskjet printer (or a PCL compatible one):
You must do a PPD file yourself. A PPD file is the postscript printer description file. This file describe the capabilities of your printer: How many paper tray it has, if it’s a color or B/W printer, if you can print on transparent paper, etc…
There are some available on /usr/share/cups/new_ppd/xxx.ppd or on http://www.adobe.com/prodindex/printerdrivers/winppd.html
Choose one suitable to your printer model, copy it in /usr/share/cups/model/xxx.ppd
and modify it accordingly to the following.
Its name should be manufacturer_model_special.ppd where for example
manufacturer is "hp", model is "laserjet" or "ljet" or "djet", special
is "6L", "1100", "750" or "std" for a standard file.
Edit the PPD file and add 4 lines wherever you want, but generally after the "*Product:" line and before the "*ModelName:" line:
*cupsVersion: 1.0
*cupsManualCopies: False
*cupsFilter: "application/vnd.cups-postscript 0 ps2gs2raw.bin"
*cupsGsOptions: Some that will be discussed later.
The three first lines are CUPS related. The fourth is GS (GhostScript) generic filter related.
The cupsGsOptions line:
This line must contain the options for GS to use. They are the same as your current LPD config. It’s something like:
-sDEVICE=epson –sMEDIA=A4
or
-sDEVICE=ljet4 –sMEDIA=Letter
to print on Epson(ESC/P2) with A4 paper or on Laserjet 4(PCL) with Letter paper.
You can find this line in GhostScript documentation. (I can help you for that)
When the PPD file is finished and all is working great, share it with others. Send it to me and I’ll add it to the main distribution.
Then, add a printer by issuing
lpadmin -dPRINTER_NAME -vparallel:/dev/lp0 -mYOUR_PPD_FILE_NAME.ppd
Then you can jump to the section: "Test your installed printer"
The installation is finished. You can test that the printer is ready.
[bash] lpstat –p –d -o ENTER
Should show you that a PRINTER_NAME printer is installed. If it’s not
in "State idle", then you must enable it by issuing the command:
[bash] /usr/bin/enable PRINTER_NAME (issuing "bash$ enable ENTER"
will make BASH think that you want to run its enable internal command,
which will fail)
Will enable the printer so it accept the print job
[bash] lpstat –p –d -o ENTER
Now, you should see that your printer is idle (ready)
[bash] lpadmin –d PRINTER_NAME ENTER
Should set PRINTER_NAME as your default printer (it’s, in fact alredy
done, the first printer you install is set as default printer automatically)
[bash] lp FILE_NAME.ps
Should print the postscript file FILE_NAME.ps on your printer. You
can find a PS test in the rhs-printfilters package named test-page.ps and
test-page_a4.ps
[bash] lpstat –p –d -o ENTER
Show you the jobs associated with your printer
If you had no success (or even if you had some) with this HOWTO, please drop me a line (cuendet@linkvest.ch) explaining what to change to make it better (if you don’t do, the next will have the same problems and he will try the same things as you and nobody will be happy, not me and not you/he!).
Some CUPS Design explanations:
CUPS is made of a server that waits on a TCP port(631) for pages to print and of some programs that communicate with it. The server must run before anything, else nothing will work.
Then the server listen for pages to print. To communicate to server, you can use:
CUPS is designed in layers.
First layer is a conversion layer:
When you print, you have pages to print that are either PostScript, PDF, GIF, LaTeX, etc… These files are not directly printable. They must be converted. In fact they are all converted to PS (PostScript), the only format that is really understood by CUPS.
Second layer is the printer filter layer:
When in PS, it’s either send to the printer filter as is (if the printer layer understand it) or converted in a RAW format defined for CUPS print filters called "raster". This format is understand by non-postscript printer filters.
Printer filters that understand PS are:
The printer filters convert PS or raster data file in raw data that is understandable by the printer itself. This data format is "raw". To send this to the printer, the backend layer is used.
The available ones are:
Logfiles: /var/cups/logs
PPD model files: /usr/share/cups/model
Installed PPD files: /var/cups/ppd
Filters files: /usr/share/cups/filters
Backend files: /usr/share/cups/backend
CUPS Links:
CUPS related stuff: http://cups.sourceforge.net
CUPS: http://www.cups.org
PPD files from Adobe: http://www.adobe.com/prodindex/printerdrivers/winppd.html
Contact: mailto:cuendet@linkvest.ch