Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CUPS & Samba print server under Debian

0 views
Skip to first unread message

Gary Hennigan

unread,
Nov 19, 2002, 4:09:43 PM11/19/02
to
I'm in the process of setting up a Linux server for my Home LAN and
have some questions regarding the setup. First question is in regards
to CUPS. I see that under cupsomatic-ppd it says that you should try
foomatic-bin and foomatic-db first. When I install the foomatic-*
packages I only see a couple of printers that seem appropriate for my
HP DJ932C. Namely:

HP DeskJet Series CUPS v1.1 (en)
HP New DeskJet Series CUPS v1.1 (en)

On the other hand, if I install cupsomatic-ppd I see 5 drivers
specific to the 932C. Am I losing anything by using what appear to be
the generic drivers in foomatic over the cupsomatic-ppd drivers that
seem to be specific to my printer? If I stick with foomatic which one
of the above do I use? Just try 'em and see which works best? If I go
with cupsomatic-ppd the same question applies, but increases by a
factor of 2.5 because now I'll have to choose from among 5 drivers
instead of 2.

The next question relates to using this printer via Samba from a
Windoze client. I understand the Windoze client needs the native
Windoze driver for my printer installed, which isn't a problem since
that's what the printer is currently attached to. The question is will
I lose any capabilities by attaching it to the Linux box running
Samba? I use the printer to, among other things, print near
photo-quality pics and I know on the Windoze side that usually
involves some special driver tricks (in the HP's case I think it's
called Photo ret, or something similar). Will I lose that capability
by attaching the printer to the Linux box, or does it basically send
raw printer command over the Samba link and effectively bypass the
Linux driver, which may not have all the capability of the Windoze
driver?

I imagine I can just hook it up and try all the combos, but I thought
maybe someone here had already fought that fight and I could, once
again, rely on another's experience.

Thanks,
Gary


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org


Derrick 'dman' Hudson

unread,
Nov 25, 2002, 11:53:55 PM11/25/02
to

--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 19, 2002 at 01:55:16PM -0700, Gary Hennigan wrote:
| I'm in the process of setting up a Linux server for my Home LAN and
| have some questions regarding the setup. First question is in regards
| to CUPS. I see that under cupsomatic-ppd it says that you should try
| foomatic-bin and foomatic-db first.

Just install cupsomatic-ppd and select the "driver" for your printer.
(it's not really a driver; rather it is a config file that tells cups
what your printer can and can't do and how to talk to the printer)

| The next question relates to using this printer via Samba from a
| Windoze client. I understand the Windoze client needs the native
| Windoze driver for my printer installed,

Yes and no. The Windows architecture requires the clients to do all
conversion to printer-native data streams. The secret here is that
you can set up a generic postscript driver on the windows machine and
your cups configuration will handle the translation to printer-native
just as it does for all of your unix applications. I use this for a
Canon BJC-610 which doesn't have any good windows drivers (except for
the one that came with it which doesn't support networking).

| which isn't a problem since that's what the printer is currently
| attached to. The question is will I lose any capabilities by
| attaching it to the Linux box running Samba? I use the printer to,
| among other things, print near photo-quality pics and I know on the
| Windoze side that usually involves some special driver tricks (in
| the HP's case I think it's called Photo ret, or something similar).
| Will I lose that capability by attaching the printer to the Linux
| box, or does it basically send raw printer command over the Samba
| link and effectively bypass the Linux driver, which may not have all
| the capability of the Windoze driver?

If you set up the print spool in cups as type "raw" then you can use
the windows driver to generate the printer-native data stream. In
"raw" mode cups will merely queue and then deliver the data to the
printer.

You can configure the printer with 2 (or more) queues directed to it.
One use for that is to have one configuration with the cupsomatic
driver for your *nix apps to use and one configured as "raw" for the
windows clients to use.

HTH,
-D

--=20
You can't assign IP address 127.0.0.1 to the loopback adapter,
because it is a reserved address for loopback devices
(Microsoft Windows XP - P R O F E S S I O N A L)
=20
http://dman.ddts.net/~dman/

--mYCpIKhGyMATD0i+
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj3jAUwACgkQO8l8XBKTpRSCEwCgjIZXysxXGIESg8bVfHH8n8Gw
bWwAmgJUcBcxsFbzm+Wul1M7rn+FVd18
=tV7Q
-----END PGP SIGNATURE-----

--mYCpIKhGyMATD0i+--

Gary Hennigan

unread,
Nov 26, 2002, 11:20:48 AM11/26/02
to
Thanks for the reply Derrick. Next time please try to be a little
quicker though would ya? :) I ended up spending a few hours figuring
everything out.

Derrick 'dman' Hudson <dm...@dman.ddts.net> writes:
> On Tue, Nov 19, 2002 at 01:55:16PM -0700, Gary Hennigan wrote:
> | I'm in the process of setting up a Linux server for my Home LAN and
> | have some questions regarding the setup. First question is in regards
> | to CUPS. I see that under cupsomatic-ppd it says that you should try
> | foomatic-bin and foomatic-db first.
>
> Just install cupsomatic-ppd and select the "driver" for your printer.
> (it's not really a driver; rather it is a config file that tells cups
> what your printer can and can't do and how to talk to the printer)

This works, but a lot of the cupsomatic-ppd drivers for my printer (HP
932C) have unmet dependencies in Debian, or just flat out don't
work. The one's I can remember were the stp driver and the hpdj
driver. The hpdj driver tries to call ghostscript with a hpdj device,
which isn't in ghostscript and was probably superseded by the hp ijs
driver. There are lots of hpdjXXXX drivers built in to ghostscript,
but the PPD file was trying to invoke gs with one that didn't exist. I
don't remember the details on the stp driver, but it had similar
problems.

> | The next question relates to using this printer via Samba from a
> | Windoze client. I understand the Windoze client needs the native
> | Windoze driver for my printer installed,
>
> Yes and no. The Windows architecture requires the clients to do all
> conversion to printer-native data streams. The secret here is that
> you can set up a generic postscript driver on the windows machine and
> your cups configuration will handle the translation to printer-native
> just as it does for all of your unix applications. I use this for a
> Canon BJC-610 which doesn't have any good windows drivers (except for
> the one that came with it which doesn't support networking).

That would work, except I typically print photos from my Windoze box
and you typically lose something going through the CUPS driver if you
do this, since it doesn't have some of the "enhancements" that the
Windoze drivers have for printing photos on inkjets.

[snip]


> | Will I lose that capability by attaching the printer to the Linux
> | box, or does it basically send raw printer command over the Samba
> | link and effectively bypass the Linux driver, which may not have all
> | the capability of the Windoze driver?
>
> If you set up the print spool in cups as type "raw" then you can use
> the windows driver to generate the printer-native data stream. In
> "raw" mode cups will merely queue and then deliver the data to the
> printer.

(See section below on how I FINALLY got this to work)

> You can configure the printer with 2 (or more) queues directed to it.
> One use for that is to have one configuration with the cupsomatic
> driver for your *nix apps to use and one configured as "raw" for the
> windows clients to use.

I was aware of this. I do it all the time with my PS printer at
work. One queue for single-sided, one for double, etc.

Here's my summary for those that are in a similiar situation:

Linux side drivers:

1) HP now has a sourceforge project for drivers for a lot of their
printers, including the ink jets, which is what I have. Just go
to http://hpinkjet.sourceforge.net/ if you want to read up on the
ink jet drivers.

2) Install the hpijs Debian package. I think this might recommend or
require the gs-esp package. Just pull in any other packages it
recommends.

3) Go to
http://www.linuxprinting.org/show_driver.cgi?driver=hpijs. Near
the bottom you'll see the PPD-O-Matic. Select your printer, for
example, "HP DeskJet 932C" and hit the "Generate PPD file"
button. Save the result to your system as a text file in the
directory /usr/share/cups/model. At the top of the file will be a
line that tells you what to name the file. In my case that was
HP-DeskJet_932C-hpijs.ppd. I don't believe the name is critical,
as long as you give it the ".ppd" extension, but use the
recommended name if possible. Also note the field "*ModelName:"
in the PPD file. You'll use that in #5.

4) Restart cups with
/etc/init.d/cupsys restart

5) Now go through the CUPS interface to "Add" the printer. Make the
obvious choices and when you come to "Model" select the field as
it was shown in the PPD file under "*ModelName:". For me it was

HP DeskJet 932C, Foomatic + hpijs

6) Through the CUPS interface "Configure" the printer with the
options of your choice.

7) The only problem I have with my printer using the above is that
the margins are off. I need to tweak the "*ImageableArea
Letter/Letter" field in my PPD file to fix this.


Raw printing with CUPS via Samba from a Windoze box:

This took me too long to figure out! It should be easy, you just
configure everything on the Linux box as "Raw" via CUPS and install
the native printer driver on your windoze box and point it to the
network printer. Well, you do exactly that but there's one little
step missing that I couldn't find documented anywhere, except the
place where it has to be done.

Look at the file /etc/cups/mime.convs. You'll see the following
note:

########################################################################
#
# Raw filter...
#
# Uncomment the following filter and the application/octet-stream type
# in mime.types to allow printing of arbitrary files without the -oraw
# option.
#

application/octet-stream application/vnd.cups-raw 0 -

Do what it says or raw printing won't work! That means you also need
to edit /etc/cups/mime.types and uncomment the
application/octet-stream line. If you don't do this you get some, to
me, obscure error message in the cups error log when you try to
print to the raw cups printer.

Works like a champ for me now. I have two queues for my Linux/Unix/BSD
boxes, hpdj_text and hpdj_photo using the hpijs from the PPD file I
generated at linuxprinting.org, and a raw queue, hpdj_win, for
printing via samba from by windoze box with the native windoze printer
driver.

Hope this saves someone the time it took me to figure it all out!

Gary

0 new messages