Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 1996 16:58:17 -0700
From:      Wes Peters <wes@btsslc.com>
To:        terry@lambert.org
Cc:        ron@infi.net, questions@freebsd.org
Subject:   Re: printing with pcnfs
Message-ID:  <199601172351.PAA18974@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


I recently stated:
> Nope.  PC-NFS printing uses an nfs mount to spool files to the server,
> then a command to pcnfsd on the server system to print the file.  You
> need to make sure pcnfsd is running on your printer server system, and
> then review the pcnfsd configuration file to make sure your printer
> has been configured there.

Terry Lambert replied:
% You have got to be kidding.
%
% I'm positive I set one up to use LPR protocol -- it was using a VMS
% system as a host.
%
% Are you sure you aren't thinking of Wollongong's stuff instead of Sun's?

Positive.  From the pcnfsd man page on HP-UX 9.07:

    Printing
      pcnfsd supports a printing model that uses NFS to transfer print data
      from the client to the server.  The client system issues a
      PCNFSD_PR_INIT or PCNFSD2_PR_INIT request, and the server returns the
      path to a spool directory that is exported by NFS for use by the
      client.  pcnfsd creates a subdirectory for each client; by default,
      the parent directory is /usr/spool/pcnfs, and the name of each
      subdirectory is the same as its client's hostname.  To use a different
      parent directory, add a line to the /etc/pcnfsd.conf file of the form:

           spooldir path


      Once a client has mounted the spool directory using NFS, and
      transferred print data to a file in that directory, it will issue a
      PCNFSD_PR_START or PCNFSD2_PR_START request.  pcnfsd handles most
      print-related requests by constructing a command based on the printing
      services of the server's operating system, and executing that command
      using the identity of the PC user.  Because this involves set-user-id
      privileges, pcnfsd must be run as root.

      Every print request from a client includes the name of the printer to
      be used.  This name corresponds to a printer that has been configured
      into the line printer spooling system using the lpadmin command.

      [...]

    Reconfiguration
      By checking the modification time (and contents) of the file
      /usr/spool/lp/pstatus, pcnfsd will detect when printers have been
      added or deleted, and will rebuild its list of valid printers.
      However, pcnfsd does not monitor the file /etc/pcnfsd.conf for
      updates; if you change this file, you must kill and restart pcnfsd for
      the changes to take effect.

 EXAMPLES
      Given the following entries for the file /etc/pcnfsd.conf:

           printer abc lj lp -dlj -oraw
           printer test - /usr/bin/cp $FILE /usr/tmp/$HOST-$USER

      If a user on a client system prints a job on the printer "abc" the
      request will be sent to the destination "lj" in raw mode.

      If the client requests a list of the print queue for the printer
      "abc", the pcnfsd daemon will translate this into a request for a
      listing for the printer lj.  The printer "test" is used only for
      testing.  Any file sent to this printer will be copied into the
      directory /usr/tmp.  Any request to list the queue, check the status,
      etc. of printer test will be rejected because the alias-for has been
      specified as "-".



That about sums it up.  If you need more information, look at the pcnfsd
man page, or "use the source, luke!"


--

                        I'd rather be sailing.

Wes Peters                      BTS SLC                          wes@btsslc.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601172351.PAA18974>