mirror of https://github.com/tLDP/LDP
movedtodocbook
This commit is contained in:
parent
58818ba3bb
commit
50408faa41
|
@ -1,126 +0,0 @@
|
|||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
|
||||
<title>The Linux Print2Win mini-HOWTO
|
||||
<author>Marcelo Pereira da Silva, <tt/marcelo@pereira.com/
|
||||
<date>v1.1, Jan 2002
|
||||
|
||||
<abstract>
|
||||
This howto contains the general configuration to get linux printing to a
|
||||
Windows print share.
|
||||
</abstract>
|
||||
|
||||
<toc>
|
||||
|
||||
<sect>Introdution
|
||||
<p>
|
||||
As we want the print service running, let set up all the environment step
|
||||
by step, to avoid mistakes or bad configurations.
|
||||
|
||||
First, set up the server, so when you have the server running, go to the
|
||||
clients and configure them.
|
||||
|
||||
<sect>Server (Windows)
|
||||
<p>
|
||||
There is no special rules when configurating the server. Just install the
|
||||
printer driver in the Windows server, test it to certificate the printer
|
||||
is running properly, so share the printer.
|
||||
|
||||
<sect>Client (Linux)
|
||||
<p>
|
||||
The setup of the client is almost the same when you are setting up the
|
||||
printcap to print linux to linux, with some changes.
|
||||
|
||||
<sect1>Standard lpr
|
||||
<p>
|
||||
|
||||
The simplest way to do it is adding an entry in <tt>/etc/printcap</tt>.
|
||||
As a quick example, the entry for a generic matricial printer would be:
|
||||
<tscreen><verb>
|
||||
# EPSON LX300
|
||||
epson:\
|
||||
:sd=/var/spool/lpd/epson:\
|
||||
:mx#0:\
|
||||
:sh:\
|
||||
:if=/var/spool/lpd/epson/filter:\
|
||||
:lp=/dev/null:
|
||||
</verb></tscreen>
|
||||
|
||||
* Make sure you are using the correct filter, or the right generic one.
|
||||
|
||||
Be sure you have created the directory <tt>/var/spool/lpd/epson</tt>,
|
||||
and the users you wish to use the printer have the right access to this.
|
||||
|
||||
For example, let the Windows Print Server be called by <tt>meriadoc</tt>,
|
||||
it <tt>IP=192.168.1.49</tt> and the printer (at Windows) are shared as
|
||||
<tt>epsonLX</tt>.
|
||||
|
||||
So, you have to configure <tt>/var/spool/lpd/epson/.config</tt> like this:
|
||||
<tscreen><verb>
|
||||
share='\\meriadoc\epsonLX'
|
||||
hostip=192.168.1.49
|
||||
</verb></tscreen>
|
||||
Where:
|
||||
<itemize>
|
||||
<item>share='\\windows-print-server-name\print-share-name'
|
||||
<item>hostip=windows-print-server-IP
|
||||
</itemize>
|
||||
|
||||
Once your <tt>/etc/printcap</tt> is configured, you have to enable the
|
||||
print share:
|
||||
<tscreen><verb>
|
||||
[localhost]$ lpc up epson
|
||||
[localhost]$ lpc enable epson
|
||||
</verb></tscreen>
|
||||
If everything is ok, you can send jobs to the queue:
|
||||
<tscreen><verb>
|
||||
[localhost]$ lpr -Pepson <file>
|
||||
</verb></tscreen>
|
||||
|
||||
<sect><tt>/etc/printcap</tt> TIPS
|
||||
<p>
|
||||
I have used the entry below in the first example, but this is not a
|
||||
particularly good idea:
|
||||
<tscreen><verb>
|
||||
...
|
||||
:lp=/dev/null:\
|
||||
</verb></tscreen>
|
||||
Because lpr does an `exclusive' open on the file you specify as lp=.
|
||||
It does this in order to prevent multiple processes from trying to
|
||||
print to the dame printer at the same time.
|
||||
|
||||
The side effect of this is that in your case, eng and colour can't print at
|
||||
the same time, (usually more or less transparent since they probably print
|
||||
quickly and since they queue you probably don't notice) but any other process
|
||||
that tries to write to /dev/null will break!
|
||||
|
||||
On a single user system, probably not a big problem. I have a system with
|
||||
over 50 printers. It would be a problem there.
|
||||
|
||||
The solution is to create a dummy printer for each. Eg: touch /dev/eng.
|
||||
|
||||
<tscreen><verb>
|
||||
[localhost]$ touch /dev/eng
|
||||
[localhost]$ touch /dev/colour
|
||||
</verb></tscreen>
|
||||
|
||||
<sect>License
|
||||
<p>
|
||||
This document, Print2Win-HOWTO,
|
||||
is copyrighted (c) 2001-2002 by Marcelo Pereira da Silva.
|
||||
Permission is granted to copy, distribute and/or modify this
|
||||
document under the terms of the GNU Free Documentation License,
|
||||
Version 1.1 or any later version published by the Free Software
|
||||
Foundation; with no Invariant Sections, with no Front-Cover Texts,
|
||||
and with no Back-Cover Texts. A copy of the license
|
||||
is available at <url url="http://www.gnu.org/copyleft/fdl.html"
|
||||
name="http://www.gnu.org/copyleft/fdl.html">.
|
||||
|
||||
<sect>Credits
|
||||
<p>
|
||||
Thanks to all those who sent opinions about this document, to everybody
|
||||
who told me some printing tips, to Rick Bressler, and a special thanks
|
||||
to Harish Pillay, whose I don't know, but wrote the first version of
|
||||
this document.
|
||||
</article>
|
Loading…
Reference in New Issue