Printer Problems with SuSE Linux 8.0

Support knowledgebase (jsmeix_print-80-probleme)
Applies to

SuSE Linux: Version 8.0

Index

Switching to CUPS
Printing via Samba
Printing on a Novell server
Printing with StarOffice

Switching to CUPS

Symptom

A message about package conflicts is displayed when you switch from the default printing system to CUPS with YaST2. According to the message, you should be able to continue "without giving it a second thought". However, you should not continue under any circumstances or CUPS will not work.

Cause

The package filters has been added to the standard installation to support some GDI printers. This package requires the package lpdfilter which, in turn, needs the package lprng. Whereas the standard printer filter lpdfilter does not have to be installed along with CUPS, the standard printer spooler lprng cannot be installed along with CUPS. The package cups-client must be installed instead of lprng.

Solution

Before switching from the standard printing system to CUPS with YaST2, uninstall the package filters either with YaST2 or as user "root" on the command line with rpm -e --nodeps filters.

Printing via Samba

Symptom

You are using the standard printing system and have configured a queue for a Samba/Windows printer (the printer is normally attached to a Windows computer) with YaST2. Although the host names of the Samba server and the remote queue (the names of the Samba shares), and the user and password have been correctly entered, you cannot print anything. At least one of the entered names contains special characters or blanks.

Cause

Special characters or blanks are not handled correctly.

Test without using the printing system.

You can test the correctness of the entered data with the following command, which is to be entered in a single line:

echo -en "" | smbclient "//HOST/SHARE" "PASSWORD" -c 'print -' -N -U "USER" &&
 echo "OK" || echo "ERROR"
Replace HOST with the host name of the Samba server, SHARE with the name of the remote queue, PASSWORD with the correct password, and USER with the user name. This is merely a test and you will not really print. Just search for OK or ERROR in the output.

If the test has been successful, you will be able to print the word Hello with the command:

echo -en "\rHello\r\f" | smbclient "//HOST/SHARE" "PASSWORD" -c 'print -' -N -U "USER"
The only requisite is that the printer is able to print ASCII texts (here you can see the word Hello surrounded by the ASCII characters \r for carriage return and \f for a page feed). See also the article Installing a printer.

Solution

Edit the file
/etc/lpdfilter/QUEUE/redirect
(replacing QUEUE with the name of your local queue), so that it only contains the line

/usr/lib/lpdfilter/redirect/samba_print "//HOST/SHARE" "PASSWORD" -U "USER" -N
Replace, as above, HOST, SHARE, PASSWORD, and USER with the right entries. For security reasons, verify that the permissions for this file are correct:
-rwxr-x--- ... lp ...

Printing on a Novell server

Symptom

You are using the standard printing system and have configured a queue for a Novell printer (i.e. the printer is normally attached to a Novell server) with YaST2.
You cannot print in spite of having installed the package "ncpfs" and having correctly entered the host name and queue of the Novell Server as well as the user and password.

Cause

The configuration file
/etc/lpdfilter/QUEUE/redirect
that prompts the lpdfilter to forward its output to the Novell server, has been wrongly created.
Note that QUEUE stands for the name of your local queue.

Test without using the printing system.

You can test the basic functionality by means of the following command (to be entered in a single line)

echo -en "" | nprint -S HOST -q QUEUE -U USER -P PASSWORD - && echo "OK" || echo "ERROR"
Replace HOST with the host name of the Novell server, QUEUE with the name of the remote queue, USER with the user name, and PASSWORD with the correct password.
This is merely a test, you will not really print.
Now search for OK or ERROR in the output.
If the test was successful, you will be able to print the word Hello with the command:
echo -en "\rHello\r\f" | nprint -S HOST -q QUEUE -U USER -P PASSWORD -
For this, the printer has to print ASCII texts (see above) or the Novell queue QUEUE must be at least configured accordingly.

Solution

If at least the first of the tests has been successful, edit the file
/etc/lpdfilter/QUEUE/redirect
(replacing QUEUE with the name of your local queue), so that it only contains a single line:

/usr/lib/lpdfilter/redirect/novell_print -S HOST -q QUEUE -U USER -P PASSWORD -
Replace, as above, HOST, SHARE, PASSWORD, and USER accordingly. For security reasons, verify that the permissions for this file are correct:
-rwxr-x--- ... lp ...

Tips

After having installed the package "ncpfs", make sure that "SuSEconfig" runs and that "/etc/permissions.easy" is used. The latter sets the following permissions:

-rwsr-xr-x  root  root  /usr/bin/ncpmount
-rwsr-xr-x  root  root  /usr/bin/ncpumount
-rwsr-xr-x  root  root  /usr/bin/nwsfind
Otherwise, no normal user, but only "root" and users belonging to the group "trusted" will be able to print with "nprint" ("nprint" activates in turn "nwsfind").

A link is missing in the package "ncpfs". Create it by executing as "root" user the following commands in the command line:
cd /usr/lib/
ln -s libncp.so.2.3.0 /usr/lib/libncp.so.2.3

Printing with StarOffice

Symptom

Your printer does not work with a 300 dpi resolution or does not use A4 paper format. Even though printing usually works, you cannot print any StarOffice documents.
You are using the "generic printer" as recommended for StarOffice.
This problem arises above all in connection with CUPS.

Cause

Some lines similar to these are inserted by StarOffice in the PostScript print output:

%%BeginFeature: *Resolution 300dpi
1 dict dup /HWResolution [300 300] put setpagedevice
%%EndFeature
%%BeginFeature: *PageSize A4
<</PageSize [595 842] /ImagingBBox null>> setpagedevice
%%EndFeature
These lines define a 300 dpi resolution and a A4 paper size by way of PostScript commands. Thus, printing is only possible for printers using these settings.

Such settings are not suitable for generic printers. The PostScript code for these printers must be hardware-independent.
Of course, an application program must generate the print output with a certain resolution and for a defined paper size, but there is no need to fix it in the PostScript code as well.

In the case of CUPS, the problem is particularly severe because such settings in the PostScript code are passed over to Ghostscript, whereas in the LPRng/lpdfilter printing system, for example, Ghostscript is activated according to the printer configuration settings. Since at least some Ghostscript drivers cannot evaluate the specifications in the PostScript code, printing is sometimes not possible.

Solution

Set suitable resolution and paper size values in the generic printer settings in StarOffice.

This is not a perfect solution if you alternate printers with different resolutions. On the one hand, you should know the right printer resolution (300 dpi or 360 dpi should work) and on the other, you would have to change it manually every time.
Note that StarOffice is "binary only" and we cannot change anything in it. Therefore, please contact StarOffice's manufacturer.
Basically, it would suffice to edit the PPD file /opt/office52/share/xp3/ppds/SGENPRT.PS used by StarOffice for the generic printer, but StarOffice will crash every time you print if no resolution has been set.


See also:
o Printer Configuration with SuSE Linux 8.0
o Printing with CUPS
o Known Problems and Special Features in SuSE Linux 8.0

Keywords: PRINTER, PRINT, 8.0, 80, CUPS, YAST2, SAMBA, NOVELL

Categories: Frequently asked Questions , Documentation , Printer

SDB-jsmeix_print-80-probleme, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 24. Apr 2002
SuSE Linux AG - Last generated: 30. Jul 2002 by ip (sdb_gen 1.40.0)