Technical article 126172

How can I setup a file printer in OpenServer?

OpenServer Definitive 2018OpenServer 6.0.0OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

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

From the Xinuos technical article database, record 126172. Reproduced with permission. The original is at www.sco.com/ta/126172, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.