SDB:Installing a Printer
İçindekiler
Situation:
You want to install your printer. If you are running SuSE Linux 8.0, 8.1, or 8.2, proceed as described in the support database articles "Printer Configuration with SuSE Linux 8.0", "Printer Configuration with SuSE Linux 8.1", or "Printer Configuration with SuSE Linux 8.2". Find these articles with the keyword "installing" or "installation". In case of problems, check whether the prerequisites below are fulfilled. For older versions from 6.4 on, proceed as described in the support database article "Installing a Printer Since SuSE Linux 6.4". Find this article with the keyword "installing". First, check that the prerequisites below are fulfilled.
Regarding SuSE Linux PowerPC, see the article SDB:Installing a printer for S390.
Procedure
I) Prerequisites
- The printer is supported by SuSE Linux. Find information about printers supported by SuSE Linux:
- The Ghostscript drivers listed under "SuSE Linux - CDB -> Express Search: Category Printer" can be selected in the YaST2 printer configuration since SuSE Linux 7.2 for a specific model.
- In the file [file:/usr/doc/packages/ghostscript/catalog.devices /usr/doc/packages/ghostscript/catalog.devices]
since SuSE Linux 7.0 [file:/usr/share/doc/packages/ghostscript/catalog.devices /usr/share/doc/packages/ghostscript/catalog.devices] the Ghostscript drivers are listed that are actually included in the current SuSE Linux version.
If you own a GDI printer (a printer that does not understand a standard printer language), it is probably not supported by Linux or only usable with restrictions. Look at the support database, especially the articles SDB:Purchasing a Printer and Compatibility.
Regarding Ghostscript, find driver information on the web. Sometimes a Ghostscript driver is listed that requires the current "Aladdin Ghostscript" version. To comply with licences, SuSE Linux includes only "GNU Ghostscript." Enter gs -v
to display the version. Normally, there is also a GNU Ghostscript driver that supports the printer.
The printer is connected to the first parallel port directly.
If you have a USB printer, look at the article SDB:Printing via TCP/IP network.
Also refer to the SuSE manuals.
In case of a printer connected to a serial port or to additional parallel ports, look at the SuSE manuals.
If the printer is not connected directly to the first parallel port and you are having problems, connect it directly to the first parallel port and make a test configuration.
The BIOS settings for the first parallel interface should be set as follows:
- IO address 378 (hexadecimal)
- Interrupt 7
- Mode "Normal" or "SPP" or "Output-Only" (other modes may not work)
- DMA is disabled (should be automatically switched off using the modes above)
- You use an original SuSE Linux kernel from the CDs of the SuSE Linux version you are currently using. Do not use a kernel you compiled yourself. If you performed a standard installation of SuSE Linux, everything is fine. Otherwise, reinstall the original SuSE Linux kernel from the CDs.
- Test if your printer is accessible using the following command (as root):
echo -en "\rHello\r\f" >/dev/lp0
Provided the printer is connected to the first parallel port /dev/lp0, you should get one sheet with the word Hello
printed on it. The printer must be able to print ASCII text (in this case, the word Hello
surrounded by the ASCII character r
, which initiates a carriage return, and followed by the ASCII character f
, which initiates a form feed).
Printers unable to print ASCII text are mostly GDI printers, but there are some printers that cannot print ASCII text but work with Linux anyway. In this case, at least the manufacturer and the printer model should be shown in the output of the following command:
cat /proc/parport/0/autoprobe Since SuSE Linux 7.2, it is the command cat /proc/sys/dev/parport/parport0/autoprobe
If neither the manufacturer or the model is shown, it normally makes no sense to make further configurations. First, the printer has to be accessible via the parallel port. Regarding the configuration of the parallel interface, see section 2 in the article SDB:Printer Problems: Special Causes.
- You have installed the "SuSE default System". (If none of the preselected packages were deselected during installation, everything is fine.) If not, install the "SuSE Default System" at least (the "SuSE Minimal System" is not enough for normal printing).
- If you have already made some unsuccessful attempts to configure the printer, it is recommended to move the file
/etc/printcap
. Log in as root and typemv /etc/printcap /etc/printcap.save
. After this, try a new configuration.
If your current version of SuSE Linux is not a new installation, but an update from an older version of SuSE Linux, inconsistencies in the packages and configuration files of the printing system may exist. In this case, it is reasonable to completely reinstall the printing system. Up to SuSE Linux 7.3, see the article SDB:Printer: Reinstalling a printer
II) Selection of the Suitable Ghostscript Driver
Among the information sources mentioned in section 1: "Prerequisites", the correct Ghostscipt drivers for the different printer models are listed.
In file/usr/doc/packages/ghostscript/catalog.devices
(since SuSE Linux 7.0 /usr/share/doc/packages/ghostscript/catalog.devices
), find a list of Ghostscipt drivers and a selection of supported printers. To read this file, use the following command:less /usr/doc/packages/ghostscript/catalog.devices
(since SuSE Linux 7.0less /usr/share/doc/packages/ghostscript/catalog.devices
)
Use arrow keys to scroll and Q to quit.
If you do not find your printer model, choose a Ghostscipt driver for a printer that is compatible with your printer. Refer to the manual of your printer or ask the manufacturer. (See SDB:Purchasing a Printer and Compatibility)
There is a special kind of Ghostscript driver with the extension .upp
. This kind of driver are not regular Ghostscript drivers, but parameter files for the uniprint
Ghostscript driver.
Since SuSE Linux 6.4. you can choose the paper size a4dj
during the configuration, which is necessary for most ink jet printers. (See SDB:PRINTING: Setting the Page Size of ASCII files.)
If you have a real PostScript printer, you do not need a special Ghostscipt driver.
Up to SuSE Linux Version 7.3
III) Configuration using SETUP (or lprsetup):
- Log in on a text-based console as user root. If you are using a graphical login, switch to a text-based console with [Ctrl]+[Alt]+[F2]. To switch back to the graphical interface, use [Alt]+[F7].
- Either type
/var/lib/apsfilter/SETUP
orlprsetup
- Press ENTER to get to the menu APSFILTER SETUP.
- Choose ENTRY, then DEVICE and PARALLEL
- Type
/dev/lp0
(if it is not displayed already) and choose OK - Choose PRINTER
- Select from POSTSCRIPT, HEWLETT-PACKARD, OTHER, or FREEDEF
- Select COMMIT
- Scroll the list and select the correct Ghostscript driver or the suitable parameter file and select OK
- Specify the correct resolution. Leave the default setting only if you do not know the correct resolution. If nothing leads to a satisfying result, try 300 or 360. If you are using a .upp parameter file, the resolution must correspond with the one in the parameter file. Confirm with OK.
- Choose RETURN then PAPER.
- Scroll in the following list until you find the correct paper size (normally a4dj) and confirm with OK.
- Next, select COLOR.
- Choose between MONO and COLOR then confirm with OK.
- If you use SuSE Linux 6.4 or 7.0 and have already installed the standard spooling queues, you can specify your own queue name during the configuration of additional spooling queues by using SPECIAL and NAME (see SDB:Installing a Printer from SuSE Linux 6.4 to 7.3)
- Choose ADD. You will get a list of the printer spooling queues installed on your system by the apsfilter configuration. If you have chosen COLOR, for example:
ascii ... a4dj ascii mono lp ... a4dj auto color lp-mono ... a4dj auto mono raw ... a4dj raw or, if you have chosen MONO, ascii ... a4dj ascii mono lp ... a4dj auto mono raw ... a4dj raw Write down the installed printer spooling queues, in this example ascii, lp, (lp-mono), and raw. Confirm with OK.
- Press ENTER to proceed
- Choose RETURN then EXIT.
IV) Testing the printer
- Printing should be possible now with the commands:
lpr file
orlpr -Plp file
For example, execute:lpr /etc/fstab
orlpr -Plp /etc/fstab
If the chosen Ghostscript driver supports color printing, test by printing the color ellipse with the command lpr /usr/share/doc/packages/ghostscript/examples/colorcir.ps
- Special cases:
Usinglpr file
orlpr -Plp file
, the type of the file (ASCII or Postscript) is determined automatically. To force the type of file to be ASCII, uselpr -Pascii file
(e.g., to print PostScript source as such and prevent it from being interpretted as a PostScript file.)
Files that are already in a printer specific format should be printed with the command lpr -Praw file
(e.g., if you print under Windows in a file and you want to print this file under Linux). Normally, you will not get a correct printout using the raw queue because the file is sent "raw" to the printer and will not be converted into the printer-specific format.
Using lpr -Plp-mono file
, monochrome printing will not be forced automatically. To get monochrome printing, the corresponding Ghostscript parameters must be set in an apsfilterrc file in case of "$COLOR" = "mono". (See SDB:Installing a Printer from SuSE Linux 6.4 to 7.3)
V) If the printer does not print
If the prerequisites are met and you followed the above instructions, the printer should work now. For more information, refer to the manuals. For special cases, see SDB:Printer Problems: Special Causes
VI) Problems when printing from application programs
For information, refer to the manuals or the support database article SDB:Printing from Applications.
SDB:Printer Configuration from SuSE Linux 8.2 on
SDB:Printer Configuration from SuSE Linux 8.1 on
SDB:Printer Configuration from SuSE Linux 8.0 on
SDB:Purchasing a Printer and Compatibility
SDB:Installing a Printer from SuSE Linux 6.4 to 7.3
SDB:Printer: Reinstalling a printer
SDB:PRINTING: Setting the Page Size of ASCII files.
SDB:Printing via TCP/IP network
SDB:Printer Problems: Special Causes
SDB:YaST2 Printer Configuration doesn't work for PCL5/6 Printers (Driver ljet4)
<keyword>printer,printing,ghostscript,uniprint,installation,networkprinter</keyword>