You are here:

Unix/Linux OS/Problem of setting up UNIX printer


QUESTION: Dear sir,

I am a new UNIX user using an Oracle Solaris 10. A printer, Printronix PSA3 P7210, is being setup to my UNIX with an AXIS 560 print server. The printing seems okay but there is a problem. The printer cannot form feed (or line feed) to a new page after the end of a print job. So, the next page always being printed immediately follows the last page.

So, may I look for your advice on how to make it form feed at the end of each print job? Looking for your comment.

With all good wishes,

Yours faithfully,

ANSWER: Hi Gearge,

I'm not really up-to-date on Solaris, but a lot of Solaris is similar to Linux.

If you are using lpd/lpr printing, then you generally have a script through which the job passes before it is sent to the printer. - Adding an 'echo -e "\f\c"' to the end of the output portion of the script will fix it. (it may need to be '/bin/echo -e "\f\c"' if the shell's built-in echo doesn't like the -e argument) Check for lpr/lpd scripts in /var/spool/lpd. Also chack for /etc/printcap and see if that might lead you to the location of the scripts.

If you are using CUPS, it is different, but can be delared to be an lpd type of printer and there is a script involved in that process as well - one you can edit. Look in /etc/cups/interfaces for CUPS scripts.

Let me know what the printing daemon is and I can be more specific about where the scripts would appear.

Once you can identify the script for the Printronix, you can post it here and I can show where the modification needs to be.

Looking forward to it!

---------- FOLLOW-UP ----------

QUESTION: Dear Larry,

In fact, my colleague may be using a printing daemon called "lp". And, I once found a tip from a URL: It says something like "lpadmin -p pr1 -T hplaser" to setup the printer type accordingly may solve the problem.

However, I am a Windows user only and not an UNIX expert. So, the problem troubles me a lot. Should I try the "lp" accordingly?

Looking for your comment.

Yours sincerely,

Hi George,

lp is the command line program to submit a print job.
(i.e. ls -l /usr/bin | lp -d pr1 )
lpadmin is the command line tool to administer a printer.
If you are using CUPS, the sample command you sent would modify a printer queue named "pr1" as a CUPS printer using the PPD file called hplaser.ppd, if the printer queue pr1 and the ppd file both existed.
I'm assuming you are using CUPS and that the printer is already configured as a Generic PCL Laser Printer.
You cannot, via the admin interface, tell the PCL/hplaser driver to send a FF at the end.
You can tell the textonly driver to do so.
You have to make some choices to either fix up your print jobs to supply FF at the end or change the driver for the printer to one where you can configure the driver to do so.
(which, in some cases, will result in a blank page between jobs - when the output already has a FF at the end...)

If CUPS is running and the server has a desktop running, use the browser on the desktop to connect to and you will have a browser-based printer administration tool available for making changes to how the printer is configured. -- This is the easiest method... You will (should) need the root password to make changes to the printer configuration.

If there isn't a desktop running on the server, then you can try to connect via http://[serverIPaddress]:631

If that doesn't work, you have to edit /etc/cups/cupsd.conf and change the following entry:
Listen localhost:631
Port 631
and make sure that the web interface is turned on:
WebInterface Yes
and make sure that the sections that match the following items have the Allow @LOCAL entry:
<Location />
 # Allow remote administration...
 Order allow,deny
 Allow @LOCAL
<Location /admin>
 # Allow remote administration...
 Order allow,deny
 Allow @LOCAL
<Location /admin/conf>
 AuthType Default
 Require user @SYSTEM
 # Allow remote access to the configuration files...
 Order allow,deny
 Allow @LOCAL
And then restart the CUPS daemon.

Then you can connect from any address that has a route to the server as shown above.
Once you connect, select the Printers tab and click on the printer queue name link.
Then click on the Administration drop-down and choose Modify Printer.

Go through the pages until you see which driver is being used.
If it is Generic Textonly, then no change to the driver is needed.
If it is some sort of PCL/hplaser driver, then you have to decide whether to fix the source program creating the print jobs or to change the driver to Generic/Textonly...

Only use the following if the printer now has the Generic Textonly driver.
Select the Printers tab and click on the printer queue name link.
Click on the Administration drop-down and choose Set Default Options.
There should be an option displayed named SendFF with True/False choices.
Choose the "True" radio button and click on the "Set Default Options" button.

That will make it always send a FF at the end of every print job.

(I sure hope it is CUPS... lpadmin was also used with lprng/lpd/lpr but it would have balked at the command usage you provided above...)

All this assumes you are using CUPS - but you haven't told me which daemon is running the printer services yet. If it is CUPS, then this response will lead you to the right places.
Otherwise, it won't... I really needed to know that first...

Hope that solves it for you.

Unix/Linux OS

All Answers

Answers by Expert:

Ask Experts




Expert: Creating and managing *nix database/application servers for use with dl4/unibasic/mysql/apache/thoroughbred applications, especially in medical environments. Strengths: scripting, backup and disaster recovery, mysql, apache2, routing, samba/smbfs/cifs, LPRng, CUPS, telnet/ssh/sftp, vsftp, rsync, new system preparation, system duplication, database design, system conversions (AIX/SCO-OS5/Linux) Currently working on scripted setup of LAMP servers using PDO for MySQL and Oracle. Compiling Apache2, openssl, php and libxml2 from source and linking to libraries for MySQL and Oracle InstantClient. Works great so far! Familiar With: php, c, awk, sed, gnome, nfs and lots of other *nix tools


I've been head of development at our company since 1984. Our OS's at that time were Point 4's IRIS and Altos' Xenix. Then: SCO Xenix, SCO Unix, AIX, SCO-OS5, Caldera, RedHat 7, Debian Sarge, RedHat ES4, Debian Etch, Redhat ES5, Debian Lenny, RedHat ES6, Debian Squeeze. I've migrated our clients through those various versions with minimal interruption while preserving their investments in hardware and staff knowledge over time.

1980 BSBA Washington University, Saint Louis, Missouri

©2017 All rights reserved.