summaryrefslogtreecommitdiffstats
path: root/docs/docbook/projdoc/printer_driver2.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docbook/projdoc/printer_driver2.sgml')
-rw-r--r--docs/docbook/projdoc/printer_driver2.sgml237
1 files changed, 85 insertions, 152 deletions
diff --git a/docs/docbook/projdoc/printer_driver2.sgml b/docs/docbook/projdoc/printer_driver2.sgml
index 85ae0713b39..2afba6b5968 100644
--- a/docs/docbook/projdoc/printer_driver2.sgml
+++ b/docs/docbook/projdoc/printer_driver2.sgml
@@ -107,7 +107,7 @@ the client.
<para>
These parameters, including <parameter>printer driver
-file</parameter> parameter, are being deprecated and should not
+file</parameter> parameter, are being deprecated and should not
be used in new installations. For more information on this change,
you should refer to the <link linkend="MIGRATION">Migration section</link>
of this document.
@@ -259,37 +259,37 @@ driver now?</emphasis>
</para>
<para>
-Click "No" in the error dialog and you will be presented with
-the printer properties window. The way to assign a driver to a
+Click <emphasis>No</emphasis> in the error dialog and you will be presented with
+the printer properties window. The way assign a driver to a
printer is to either
</para>
-
+
<itemizedlist>
- <listitem><para>Use the "New Driver..." button to install
+ <listitem><para>Use the "New Driver..." button to install
a new printer driver, or</para></listitem>
-
- <listitem><para>Select a driver from the popup list of
+
+ <listitem><para>Select a driver from the popup list of
installed drivers. Initially this list will be empty.</para>
</listitem>
</itemizedlist>
-
-<para>If you wish to install printer drivers for client
-operating systems other than "Windows NT x86", you will need
+
+<para>If you wish to install printer drivers for client
+operating systems other than "Windows NT x86", you will need
to use the "Sharing" tab of the printer properties dialog.</para>
-<para>Assuming you have connected with a root account, you
-will also be able modify other printer properties such as
+<para>Assuming you have connected with a root account, you
+will also be able modify other printer properties such as
ACLs and device settings using this dialog box.</para>
-<para>A few closing comments for this section, it is possible
+<para>A few closing comments for this section, it is possible
on a Windows NT print server to have printers
listed in the Printers folder which are not shared. Samba does
not make this distinction. By definition, the only printers of
which Samba is aware are those which are specified as shares in
<filename>smb.conf</filename>.</para>
-
+
<para>Another interesting side note is that Windows NT clients do
-not use the SMB printer share, but rather can print directly
+not use the SMB printer share, but rather can print directly
to any printer on another Windows NT host using MS-RPC. This
of course assumes that the printing client has the necessary
privileges on the remote host serving the printer. The default
@@ -297,42 +297,77 @@ permissions assigned by Windows NT to a printer gives the "Print"
permissions to the "Everyone" well-known group.
</para>
-</sect2>
+</sect2>
+
+<sect2>
+<title>DeviceModes and New Printers</title>
+
+<para>
+In order for a printer to be truly usbla eby a Windows NT/2k/XP client,
+it must posses:
+</para>
+
+<itemizedlist>
+ <listitem><para>a valid Device Mode generated by the driver for the printer, and</para></listitem>
+ <listitem><para>a complete set of PrinterDriverData generated by the driver.</para></listitem>
+</itemizedlist>
+
+<para>
+If either one of these is incomplete, the clients can produce less than optimal
+output at best or in the worst cases, unreadable garbage or nothing at all.
+Fortunately, most driver generate the printer driver that is needed.
+However, the client must be tickled to generate a valid Device Mode and set it on the
+server. The easist means of doing so is to simply set the page orientation on
+the server's printer using the native Windows NT/2k printer properties page from
+a Window clients. Make sure to apply changes between swapping the page orientation
+to cause the change to actually take place. Be aware that this can only be done
+by a "printer admin" (the reason should be obvious I hope).
+</para>
+
+<para>
+Samba also includes a service level parameter name <ulink url="smb.conf.5.html#DEFAULTDEVMODE">default
+devmode</ulink> for generating a default device mode for a printer. Some driver
+will function fine with this default set of properties. Others may crash the client's
+spooler service. Use this parameter with caution. It is always better to have the client
+generate a valid device mode for the printer and store it on the server for you.
+</para>
+
+</sect2>
<sect2>
<title>Support a large number of printers</title>
-
+
<para>One issue that has arisen during the development
phase of Samba 2.2 is the need to support driver downloads for
-100's of printers. Using the Windows NT APW is somewhat
-awkward to say the list. If more than one printer are using the
+100's of printers. Using the Windows NT APW is somewhat
+awkward to say the list. If more than one printer are using the
same driver, the <ulink url="rpcclient.1.html"><command>rpcclient's
-setdriver command</command></ulink> can be used to set the driver
+setdriver</command></ulink> command can be used to set the driver
associated with an installed driver. The following is example
of how this could be accomplished:</para>
-
-<para><programlisting>
+
+<para><programlisting>
<prompt>$ </prompt>rpcclient pogo -U root%secret -c "enumdrivers"
Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
-
+
[Windows NT x86]
Printer Driver Info 1:
Driver Name: [HP LaserJet 4000 Series PS]
-
+
Printer Driver Info 1:
Driver Name: [HP LaserJet 2100 Series PS]
-
+
Printer Driver Info 1:
Driver Name: [HP LaserJet 4Si/4SiMX PS]
-
+
<prompt>$ </prompt>rpcclient pogo -U root%secret -c "enumprinters"
Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
flags:[0x800000]
name:[\\POGO\hp-print]
description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]
comment:[]
-
+
<prompt>$ </prompt>rpcclient pogo -U root%secret \
<prompt>&gt; </prompt> -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""
Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
@@ -344,10 +379,10 @@ Successfully set hp-print to driver HP LaserJet 4000 Series PS.
<sect2>
<title>Adding New Printers via the Windows NT APW</title>
-
+
<para>
By default, Samba offers all printer shares defined in <filename>smb.conf</filename>
-in the "Printers..." folder. Also existing in this folder is the Windows NT
+in the "Printers..." folder. Also existing in this folder is the Windows NT
Add Printer Wizard icon. The APW will be show only if
</para>
@@ -356,24 +391,24 @@ Add Printer Wizard icon. The APW will be show only if
execute an OpenPrinterEx(\\server) with administrative
privileges (i.e. root or <parameter>printer admin</parameter>).
</para></listitem>
-
- <listitem><para><ulink url="smb.conf.5.html#SHOWADDPRINTERWIZARD"><parameter>show
+
+ <listitem><para><ulink url="smb.conf.5.html#SHOWADDPRINTERWIZARD"><parameter>show
add printer wizard = yes</parameter></ulink> (the default).
</para></listitem>
</itemizedlist>
<para>
-In order to be able to use the APW to successfully add a printer to a Samba
-server, the <ulink url="smb.conf.5.html#ADDPRINTERCOMMAND"><parameter>add
+In order to be able to use the APW to successfully add a printer to a Samba
+server, the <ulink url="smb.conf.5.html#ADDPRINTERCOMMAND"><parameter>add
printer command</parameter></ulink> must have a defined value. The program
-hook must successfully add the printer to the system (i.e.
-<filename>/etc/printcap</filename> or appropriate files) and
+hook must successfully add the printer to the system (i.e.
+<filename>/etc/printcap</filename> or appropriate files) and
<filename>smb.conf</filename> if necessary.
</para>
<para>
-When using the APW from a client, if the named printer share does
-not exist, <command>smbd</command> will execute the <parameter>add printer
+When using the APW from a client, if the named printer share does
+not exist, <command>smbd</command> will execute the <parameter>add printer
command</parameter> and reparse to the <filename>smb.conf</filename>
to attempt to locate the new printer share. If the share is still not defined,
an error of "Access Denied" is returned to the client. Note that the
@@ -382,65 +417,11 @@ of the connected user, not necessarily a root account.
</para>
<para>
-There is a complementary <ulink url="smb.conf.5.html#DELETEPRINTERCOMMAND"><parameter>delete
+There is a complementing <ulink url="smb.conf.5.html#DELETEPRINTERCOMMAND"><parameter>delete
printer command</parameter></ulink> for removing entries from the "Printers..."
folder.
</para>
-<para>
-The following is an example <ulink url="smb.conf.5.html#ADDPRINTERCOMMAN"><parameter>add printer command</parameter></ulink> script. It adds the appropriate entries to <filename>/etc/printcap.local</filename> (change that to what you need) and returns a line of 'Done' which is needed for the whole process to work.
-</para>
-
-<programlisting>
-#!/bin/sh
-
-# Script to insert a new printer entry into printcap.local
-#
-# $1, printer name, used as the descriptive name
-# $2, share name, used as the printer name for Linux
-# $3, port name
-# $4, driver name
-# $5, location, used for the device file of the printer
-# $6, win9x location
-
-#
-# Make sure we use the location that RedHat uses for local printer defs
-PRINTCAP=/etc/printcap.local
-DATE=`date +%Y%m%d-%H%M%S`
-LP=lp
-RESTART="service lpd restart"
-
-# Keep a copy
-cp $PRINTCAP $PRINTCAP.$DATE
-# Add the printer to $PRINTCAP
-echo "" >> $PRINTCAP
-echo "$2|$1:\\" >> $PRINTCAP
-echo " :sd=/var/spool/lpd/$2:\\" >> $PRINTCAP
-echo " :mx=0:ml=0:sh:\\" >> $PRINTCAP
-echo " :lp=/usr/local/samba/var/print/$5.prn:" >> $PRINTCAP
-
-touch "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&1
-chown $LP "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&1
-
-mkdir /var/spool/lpd/$2
-chmod 700 /var/spool/lpd/$2
-chown $LP /var/spool/lpd/$2
-#echo $1 >> "/usr/local/samba/var/print/$5.prn"
-#echo $2 >> "/usr/local/samba/var/print/$5.prn"
-#echo $3 >> "/usr/local/samba/var/print/$5.prn"
-#echo $4 >> "/usr/local/samba/var/print/$5.prn"
-#echo $5 >> "/usr/local/samba/var/print/$5.prn"
-#echo $6 >> "/usr/local/samba/var/print/$5.prn"
-$RESTART >> "/usr/local/samba/var/print/$5.prn"
-# Not sure if this is needed
-touch /usr/local/samba/lib/smb.conf
-#
-# You need to return a value, but I am not sure what it means.
-#
-echo "Done"
-exit 0
-</programlisting>
-
</sect2>
@@ -483,6 +464,13 @@ that generates a listing of ports on a system.
http://imprints.sourceforge.net/</ulink> as well as the documentation
included with the imprints source distribution. This section will
only provide a brief introduction to the features of Imprints.</para>
+
+ <para>As of June 16, 2002 (quite a bit earlier actually), the Imprints
+ project is in need of a new maintainer. The most important skill
+ is decent perl coding and an interest in MS-RPC based printing using Samba.
+ If you wich to volunteer, please coordinate your efforts on the samba-technical
+ mailing list.
+ </para>
<sect2>
@@ -668,76 +656,21 @@ installations
</warning>
+<sect2>
+<title>Parameters in <filename>smb.conf(5)</filename> for Backwards Compatibility</title>
+
<para>
The have been two new parameters add in Samba 2.2.2 to for
better support of Samba 2.0.x backwards capability (<parameter>disable
spoolss</parameter>) and for using local printers drivers on Windows
NT/2000 clients (<parameter>use client driver</parameter>). Both of
these options are described in the smb.coinf(5) man page and are
-disabled by default.
+disabled by default. Use them with caution.
</para>
+</sect2>
</sect1>
-<!--
-
- This comment from rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex()
- needs to be added into a section probably. This is to remind me it needs
- to be done. -jerry
-
- /*
- * If the openprinterex rpc call contains a devmode,
- * it's a per-user one. This per-user devmode is derivated
- * from the global devmode. Openprinterex() contains a per-user
- * devmode for when you do EMF printing and spooling.
- * In the EMF case, the NT workstation is only doing half the job
- * of rendering the page. The other half is done by running the printer
- * driver on the server.
- * The EMF file doesn't contain the page description (paper size, orientation, ...).
- * The EMF file only contains what is to be printed on the page.
- * So in order for the server to know how to print, the NT client sends
- * a devicemode attached to the openprinterex call.
- * But this devicemode is short lived, it's only valid for the current print job.
- *
- * If Samba would have supported EMF spooling, this devicemode would
- * have been attached to the handle, to sent it to the driver to correctly
- * rasterize the EMF file.
- *
- * As Samba only supports RAW spooling, we only receive a ready-to-print file,
- * we just act as a pass-thru between windows and the printer.
- *
- * In order to know that Samba supports only RAW spooling, NT has to call
- * getprinter() at level 2 (attribute field) or NT has to call startdoc()
- * and until NT sends a RAW job, we refuse it.
- *
- * But to call getprinter() or startdoc(), you first need a valid handle,
- * and to get an handle you have to call openprintex(). Hence why you have
- * a devicemode in the openprinterex() call.
- *
- *
- * Differences between NT4 and NT 2000.
- * NT4:
- *
- * On NT4, you only have a global devicemode. This global devicemode can be changed
- * by the administrator (or by a user with enough privs). Every time a user
- * wants to print, the devicemode is reset to the default. In Word, every time
- * you print, the printer's characteristics are always reset to the global devicemode.
- *
- * NT 2000:
- *
- * In W2K, there is the notion of per-user devicemode. The first time you use
- * a printer, a per-user devicemode is build from the global devicemode.
- * If you change your per-user devicemode, it is saved in the registry, under the
- * H_KEY_CURRENT_KEY sub_tree. So that every time you print, you have your default
- * printer preferences available.
- *
- * To change the per-user devicemode: it's the "Printing Preferences ..." button
- * on the General Tab of the printer properties windows.
- *
- * To change the global devicemode: it's the "Printing Defaults..." button
- * on the Advanced Tab of the printer properties window.
--->
-
</chapter>