Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Foxplus on SCO Unix - print banner

Foxplus on SCO Unix - print banner

Foxplus on SCO Unix - print banner

We recently added a receipt printer to our system written in Foxplus running on SCO Unix. The printer is printing a banner at the end of every print jobs, something we have not seen with any other printer. Does anyone know if changing the Unix configuration to turn off banners will impact printing through Foxplus? Thanks.

RE: Foxplus on SCO Unix - print banner

Don't know but you could always try it.

Turning off banners in default/lpd will only affect those printers set up after the change is made. To delete the banner on an existing printer you would edit the printer script or use the lpadmin services.

Normal banner prints at the beginning of a job. For it to print at the end would suggest that the dump section was put ahead of the banner section in the print script.

Ed Fair
Give the wrong symptoms, get the wrong solutions.

RE: Foxplus on SCO Unix - print banner

Perhaps it is more accurate to say that the banner is printing "between" print jobs.

The print job being sent from Foxplus does not include any specific printer instructions - just output. There is nothing in the Fox print job that specifies a banner and everything being sent from Foxplus is printing.

It looks to me like the Foxplus job finishes and then Unix prints the banner - there is a print job identifier that prints along with it.

I am very much newbie when it comes to SCO Unix admin - the printer was setup by someone else (no longer available). It certainly appears to have been setup differently from every other printer we use with SCO Unix. This is the only printer printing the banner.

I did find the default/lpd file - here is the contents of that file:

I do not know what "the dump section" is.

RE: Foxplus on SCO Unix - print banner

I may have found the problem - actually not a problem, just configuration. I found a configuration file for the printer in the /usr/spool/lp/admins/lp/interfaces/model.orig folder, specifically set to print the banner.

Here is the contents of that file. As I said earlier I am a newbie so I'm looking for advice about how best to change the configuration so the banner does not print. Would commenting out the sequence that echos the banner to the printer (in bold face below) work?
printer=`basename $0`
shift; shift; shift; shift; shift

# If it is necessary to change the baud rate or other stty settings for
# your serial printer add the appropriate options here:
stty 9600 ixon ixoff -ixany -ctsflow -rtsflow opost onlcr 0<&1

# the fifth field of the /etc/passwd file is assigned to the variable user
user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`

# border around the banner
# the fifth field of the /etc/passwd file is assigned to the variable user
user=`sed -n "s/^$name:.*:.*:.*:\(.*\):.*:.*$/\1/p" /etc/passwd`

# nhead gets the value of BANNERS or 1 by default
nhead=`sed -n 's/^BANNERS=//p' /etc/default/lpd`
[ "$nhead" -ge 0 -a "$nhead" -le 5 ] || nhead=1

# print the banner $nhead times
while [ "$nhead" -gt 0 ]
echo "$x\n"
banner "$name"
echo "$x\n"
[ "$user" ] && echo "User: $user\n"
echo "Request id: $request\n"
echo "Printer: $printer\n"
[ "$title" ] && banner $title
echo "\f\c"
nhead=`expr $nhead - 1`

# send the file(s) to the standard out $copies times
while [ "$copies" -gt 0 ]
for file
cat "$file" 2>&1
# echo "\f\c"
copies=`expr $copies - 1`
sleep 10
stty opost 0<&1 # flush JL
exit 0

RE: Foxplus on SCO Unix - print banner

/etc/default/lpd is what the system uses to set up printer script files, it has nothing to do with current print job, only future printer script files.

In the printer script change all the lines from { to done to add a # at the beginning. That comments out those lines.

Since banners print before the text in an output as shown:
done :end banner
# send the file(s) to the standard out $copies times
while [ "$copies" -gt 0 ]
for file
cat "$file" 2>&1 :print text
# echo "\f\c"
done :end print job

I can't help but wonder how the banner is printing after your F+ data. One possibility is that the data is dumped to the port (doesn't need to go through a printer script) then the script is called to handle the spacing afterwards.
How is the printer connected? Parallel, Serial, or networked? You can check the physical connection or look in scoadmin> printers.

Ed Fair
Give the wrong symptoms, get the wrong solutions.

RE: Foxplus on SCO Unix - print banner

Ed - Thanks for pointing me to /etc/default/lpd

This file contained the statement "BANNERS=1" and we changed that to "BANNERS=0".

No more problem with the banner printing, and extra blank pages that have been printing after other print jobs (on other printers) are no longer printing.

The problem was not linked to Foxplus at all - looks like it was strictly Unix system file.

Many thanks to everyone for the help!


RE: Foxplus on SCO Unix - print banner

just for clarification and my experience, there are 2 ways to setup network printers (not using CUPS)

one is to create a "local" printer printing to /dev/null then converting that printer using the HP Network Printer utility and the other is by just running rlpconf.

there are significant differences when using the HP Network printer method, you will get a file buried way down in /usr/spool/lp/admins/lp/interfaces/printerName this is a filter applied and you can edit and set compressed print and many other options in the printing stream this is due to the fact that you started off as a "local" printer with convert to a network printer

with creating via the rlpconf cmd it is a straight shot to the device and was originally used to send print output to another SCO or Unix system including other PrintServers

in the HP Network Printer method = full printer control tcp/9100
in the rlpconf method = straight output to the down-line device tcp/515 LPD (NOTE: down-line device not always a printer)

Steve Bowman
Independent Technology, Inc.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close