Jim Carter wrote on Samba-digest:
> Message: 17
> Date: Wed, 1 Jan 2003 20:10:49 -0800 (PST)
> From: Jim Carter <jimc@math.ucla.edu>
> To: Brad <sambauser@capstone.net.au>
> Cc: Samba mailing list <samba@lists.samba.org>
> Subject: Re: [Samba] Printing with CUPS & Samba...
>
> On Wed, 1 Jan 2003, Brad wrote:
>
>>> So this is on the client (Red Hat 8 box)? And do you have cups
installed on
>>> the client? And have you made any changes to the cupsd.conf file on
the
>>> client?
>
>
> Yes, on the client both client.conf and cupsd.conf are unhacked. While
> they were given by my distro, it looks like they are just the ones that
> come with the cups sources.
>
>
>>> And did you tell it where the printer was?
>
>
> No, the broadcasts are sufficient. Server broadcasts are on by default.
No -- they are *not*. Not any more. (They used to be up until about 2 years
ago).
When popular end-user distros like Mandrake starte to ship CUPS as default
printing system, with easy configuration of dial-in into ISP with ISDN
and such, it lead to automatic dial-in attempts with each broadcast server
occuring, because the default broadcast address was 255.255.255.255 (that
is "broadcast through all available interfaces").
Don't mix up the 2 directives
"Browsing Om"
and
"BrowseAddress 255.255.255.255"
While "Browsing" in CUPS-speak is related to the broadcasting feature,
a "Browsing On" (the default) does *not" automatically conduct
broadcasts
(the "server" feature) -- it merely enables the *listening* to other
broadcasts for the client part of the CUPS daemon. Only with a valid
"BrowseAddress" setting there will be broadcasting done by the server.
So, by default, CUPS source code (and all distros known by me) ship with
a cupsd.conf configured to make a working *client*. Plug it in and start
printing with no further configuration (or printer installation) *if* you
are within the reach of some CUPS server's broadcasts.
If you want a CUPS *server*:
* install printers on it
* enable the broadcasts by uncommenting the line "BrowseAddress
255.255.255.255"
(and possibly adapt the actuall b'cast address to your environment)
> I can use the printer at work, suspend the laptop, resume at home, and
> within 30 seconds it realizes that the work server and printer have
> disappeared and the home server and printer have come to life.
>
>
>>> I read that the server broadcasts
>>> the printer availability, but it doesn't seem to work here.
>
>
> If the clients are on a different subnet from the server, you have to do
> some special stuff to either send unicast announcements to a list of
> clients on the other nets, or have a cups server on a gateway machine
> rebroadcast the real server's packets.
...or make all clients "poll" the server.
>>> For example, are
>>> you suggesting that I should be able to just start OpenOffice
writer and send
>>> a print job to the "genetic printer" (default) and it
will know that there is
>>> a CUPS server present and so send it to the server?
This will work -- *if* there is a default printer defined and/or if the $PRINTER
environment variable isn't empty.
OpenOffice looks into "/etc/printcap" for a list of available
printers.
CUPS doesn't need a printcap to work. But CUPS can write one for all
clients depending on it. Make sure a directive "Printcap
/etc/printcap"
is in your cupsd.conf. Then all your printers should appear in your
OpenOffice drop-down printer selection menu(s).
To make it more spiffy, you could map the "Generic Printer" to a GUI
print command (like KDE's wonderful "kprinter", or
"xpp", or "glp" of
ESP Print Pro, or "gtklp") by using the "spadmin" utility in
OpenOffice.
There is a more detailed instruction on
http://printing.kde.org/faq/kdeprint.phtml#out_6
which once was written for StarOffice, but can easily be used as guideline
for OpenOffice too...
(I am missing any relation to Samba here -- but I haven't followed the
whole thread. Everything I discussed about browsing is, of course only
relavant for native CUPS clients on any Unix-based OS. A native Windows
client for CUPS is not yet ready for release or beta-testing.... ;-)
Cheers,
Kurt
P.S.: And don't forget to to uncomment the last lines in
"/etc/cups/mime.types"
and "/etc/cups/mime.convs" should you experience print files
from
Windows clients (via Samba) which get tagged as "unable to convert
into printable format".......
> It works for me (using LyX, Opera, etc) -- if the app can do "lpr
filename"
> or "lp filename", the page will go to the printer which the
server
> designates as the default.
>
>
>>> Can you please post (or email) your cupsd.conf?
>
>
> I'll mail it separately.
>
> James F. Carter Voice 310 825 2897 FAX 310 206 6673
> UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
> Email: jimc@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP
key)