CUPS PostScript drivers for Samba explained -- was: Re: [Samba] 2.2.6 and printer questions
Kurt Pfeifle
kpfeifle at danka.de
Mon Nov 4 16:38:01 GMT 2002
Volker Lendecke wrote on Samba-digest:
> Message: 10
> From: <Volker.Lendecke at SerNet.DE>
> To: jerry at samba.org
> Cc: tombork at web.de, Volker.Lendecke at SerNet.DE, samba at lists.samba.org
> Subject: Re: [Samba] 2.2.6 and printer questions
> Reply-To: Volker.Lendecke at SerNet.DE
> Date: Mon, 04 Nov 2002 08:54:01 +0100
> Organization: Service Network GmbH, Goettingen, Germany
>
> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>
>> If you could get around the EULA, then you could package preinitialized
>> drivers and write the information to smbd's tdbs. We have support for
>> storing driver initialization data already.
>
> Have you heard that you can get CUPS printer drivers exactly for that
> from cups.org? If they are good drivers, this could be very interesting.
Hi, all,
I'll give you some more info about the PostScript driver Volker mentioned
above here as a reference. (Maybe one day before the 3.0 release it will
end up as a worked-out paragraph inside the HOWTO collection):
You can download the driver files from http://www.cups.org/software.html. It
is a separate package from the CUPS base software files, tagged as "CUPS 1.1.16
Windows NT/2k/XP Printer Driver for SAMBA (tar.gz, 192k)". The filename to
download is "cups-samba-1.1.16.tar.gz". Upon untar-/unzip-ping it will reveal
the files
cups-samba.install
cups-samba.license
cups-samba.readme
cups-samba.remove
cups-samba.ss
These have been packaged with the ESP meta packager software "EPM". The
*.install and *.remove files are simple shell script, which untars the
*.ss (which is nothing else than a tar-archive) and puts its contents
into "/usr/share/cups/drivers/". Its contents are 3 files:
cupsdrvr.dll
cupsui.dll
cups.hlp
[ ATTENTION: due to a bug the current release puts the "cups.hlp" into
"/usr/share/drivers/" instead of "/usr/share/cups/drivers/". To work
around this, copy/move the file after running the "./cups-samba.install"
script manually to the right place:
"cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/" ]
This new CUPS PostScript driver is currently binary-only, but free (as in
free beer); no source code is provided (yet). The reason is this: it has
been developed with the help of the Microsoft Driver Developer Kit (DDK)
and compiled with Microsoft Visual Studio 6. It is not clear to the driver
developers if they are allowed to distribute the whole of the source code
as Free Software. However, they will likely release the "diff" in source
code under the GPL, so anybody with a license of Visual Studio and a DDK
will be able to compile for him/herself.
Once you have run the install script (and possibly manually moved the
"cups.hlp" file to "/usr/share/cups/drivers/"), the driver is ready to be
put into Samba's [print$] share (which often maps to "/etc/samba/drivers/"
and contains a subdir tree with WIN40 and W32X86 branches), by running
"cupsaddsmb" (see also "man cupsaddsmb" for CUPS 1.1.16). [Don't forget to
put root into the smbpasswd file by running "smbpasswd" should you run
this whole procedure for the first time.] Once the driver files are in the
[print$] share, they are ready to be downloaded and installed by the
Win NT/2k/XP clients.
NOTE 1: Win 9x/ME clients won't work with this driver. For these you'd
still need to use the ADOBE*.* drivers as previously.
NOTE 2: It is not harming if you've still the ADOBE*.* driver files from
previous installations in the "/usr/share/cups/drivers/" directory.
The new cupsaddsmb (from 1.1.16) will automatically use the
"newest" installed driver (which here then is the CUPS drivers).
NOTE 3: Should your Win clients have had the old ADOBE*.* files and the
Adobe PostScript drivers installed, the download and installation
of the new CUPS PostScript driver for Windows NT/2k/XP will fail
at first.
It is not enough to "delete" the printer (as the driver files
will still be kept by the clients and re-used if you try to
re-install the printer). To really get rid of the Adobe driver
files on the clients, open the "Printers" folder (possibly via
"Start --> Settings --> Control Panel --> Printers"), right-click
onto the folder background and select "Server Properties". A
new dialog opens; select the "Drivers" tab; on the list select
the driver you want to delete and click on the "Delete" button.
(This will only work if there is no single printer left which
uses that particular driver -- you need to "delete" all printers
using this driver in the "Printers" folder first...)
NOTE 4: Once you have successfully downloaded the CUPS PostScript driver
to a client, you can easily switch all printers to this one
by proceeding as described elsewhere in the "Samba HOWTO
Collection" to change a driver for an existing printer....
What are the benefits with the "CUPS PostScript driver for Windows NT/2k/XP"
as compared to the Adobe drivers?
* no hassle with the Adobe EULA; no hassle with the question "where do I
get the ADOBE*.* driver files from?"
* the Adobe drivers (depending on the printer PPD associated with them)
often put a PJL header in front of the core PostScript part of the print
file (thus the file starts with "<1B>%-12345X" or "<escape>%-12345X"
instead of "%!PS"). This leads to the CUPS daemon autotyping the
arriving file as a print-ready file, not requiring a pass thru the
"pstops" filter (to speak more technical, it is not regarded as the
generic MIME type "application/postscript", but as the more special
MIME type "application/cups.vnd-postscript"), which therefore also
leads to the page accounting in "/var/log/cups/page_log" not receiving
the exact mumber of pages; instead the dummy page number of "1" is
logged in a standard setup...)
* the Adobe driver has more options to "mis-configure" the PostScript
generated by it (like setting it inadvertedly to "Optimize for Speed",
instead of "Optimize for Portability", which could lead to CUPS being
unable to process it....)
* the CUPS PostScript driver output sent by Windows clients to the CUPS
server will be guaranteed to be auto-typed as generic MIME type
"application/postscript", thusly passing thru the CUPS "pstops" filter
and logging the correct number of pages in the page_log for accounting
and quota purposes...
* the CUPS PostScript driver supports the sending of additional print
options by the Win NT/2k/XP clients, such as naming the CUPS standard
banner pages (or the custom ones, should they be installed at the time
of driver download), using the CUPS "page-label" option, setting a
job-priority and setting the scheduled time of printing (with the option
to support additional useful IPP job attributes in the future).
* the CUPS PostScript driver supports the inclusion of the new
"*cupsJobTicket" comments at the beginnig of the PostScript file (which
could be used in the future for all sort of beneficial extensions on
the CUPS side, but which will not disturb any other application as those
will regard it as a comment and simply ignore it).
* the CUPS PostScript driver will be the heart of the fully fledged CUPS
IPP client for Windows NT/2k/XP to be released soon (probably alongside
the first Beta release for CUPS 1.2).
Have fun,
Kurt [ this is what I've found own thru my own trial and error
method and doesn't reflect in any way an "official"
HOWTO; it has not been checked or confirmed by the CUPS
folks yet... So: no guarantee for correctness! Please
mail me any findings by yourself or if you have suggestions
how this guide could be improved or amended... ]
More information about the samba
mailing list