file printer print to text save job fileptr fileprt
Release
SCO Openserver System Release 5.0.7
SCO Openserver System Release 5.0.6
SCO Openserver System Release 5.0.0, 5.0.2, 5.0.4, 5.0.5
SCO Openserver System Release 6.0.0
SCO OpenServer5 Definitive
SCO OpenServer6 Definitive
Problem
I would like to print to a file. What steps do I need to take?
Solution
To create a file printer, follow these steps:
1) Create file to hold the output:
mkdir -p /var/lp
touch /var/lp/fileprinter
chmod 600 /var/lp/fileprinter
chown lp:lp /var/lp/fileprinter
2) Create a new printer and point it to the output file:
scoadmin printer manager
Printer->Add Local
Name: fileprt
Model: standard
Device: /var/lp/fileprinter
3) Test to be sure you can print to it using the command:
lp -d fileprt /etc/hosts
The file /var/lp/fileprinter should contain your printjob.
Additional jobs will be appended to this file.
An alternate method using the lpadmin command, instead of scoadmin:
/usr/lib/lpadmin -p fileprt -v /var/lp/fileprinter -m standard
/usr/bin/accept fileprt
/usr/bin/enable fileprt