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

printing to win2K

2 views
Skip to first unread message

George Reitsma

unread,
Nov 26, 2003, 6:58:22 PM11/26/03
to
> I'd prefer not to use samba for this mostly because it doesn't seem
> like it should be necessary and I don't know anything about samba
> printing, either.

You have to use Samba, because it is the only program/deamon that can
communicate with a Windows box. Samba is not difficult to configure. The
easiest solution is connecting the printer to a unix machine and use
samba to let windows acces that printer as explained here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/corp-net-guide/x905.html

But samba can also let unix print on windows:

http://de.samba.org/samba/docs/man/smbspool.8.html

John Doherty wrote:
> I am trying to configure a machine running FreeBSD 4.7-RELEASE to
> print to a printer connected to a machine running Windows 2000 Pro.
>
> The FreeBSD machine is configured to print to a bunch of other
> printers, some directly over the network and some via print queues on
> another unix machine. That all works fine and has been for a long
> time.
>
> For better or worse, I know virtually nothing about Windows printing.
>
> The win2K machine prints to the printer just fine and the printer is
> shared. The Windows "TCP/IP Print Server" service is running and
> configured to start automatically.
>
> I'd prefer not to use samba for this mostly because it doesn't seem
> like it should be necessary and I don't know anything about samba
> printing, either.
>
> Here's the printcap entry I'm trying to use:
>
> lp14|wp1|windows printer:\
> :sh:\
> :sd=/var/spool/lpd/lp14:\
> :rm=jdpc:\
> :rp=HL1440:
>
> "jdpc" is a name listed in /etc/hosts. "HL1440" is the name of the
> printer as it is known to Windows. The spool directory exists;
> chkprintcap reports nothing.
>
> "lpc stat lp14" reports:
>
> lp14:
> queuing is enabled
> printing is enabled
> no entries in spool area
> printer idle
>
> When I try to print a job, nothing appears to happen: "lpc stat" still
> shows no jobs spooled, nothing is reported in the Windows system log,
> nothing is reported in /var/log/lpd-errs, ps only shows one lpd
> process running, and of course, nothing comes out of the printer.
>
> But if I change the "rp" value in /etc/printcap to something other
> than the name of the Windows printer, the Windows system log reports:
>
> Printer \\192.168.2.110\BOGUS specified in the request from
> 192.168.2.1 does not exist: request ignored.
>
> And there's an lpd process on the BSD machine that will hang around
> trying to print the job once every four minutes or so.
>
> I'm stumped. Any light than anyone can shed will be much appreciated.
>
> Thanks.
>
> -- John

Henrik Motakef

unread,
Nov 26, 2003, 7:14:11 PM11/26/03
to
George Reitsma <I.h...@learned.com> writes:

> > I'd prefer not to use samba for this mostly because it doesn't seem
> > like it should be necessary and I don't know anything about samba
> > printing, either.
>
> You have to use Samba, because it is the only program/deamon that can
> communicate with a Windows box.

I'm not an expert in the Windows world by any means, but don't Windows
2000 and above support IPP, the Internet Printing Protocol, which is
also the native protocol of CUPS? I always thought that would imply
that a Unix CUPS-client could print to a Windows print server without
using Samba (and vice versa), but I never actually tried. Would
anybody mind to clear this up?

Mark Slingo

unread,
Nov 26, 2003, 9:54:17 PM11/26/03
to
John Doherty wrote:

> In article <3fc53e1e$0$1491$e4fe...@news.xs4all.nl>, George Reitsma


> (I.h...@learned.com) wrote:
>
>> > I'd prefer not to use samba for this mostly because it doesn't seem
>> > like it should be necessary and I don't know anything about samba
>> > printing, either.
>>
>> You have to use Samba
>

> First, thanks very much for your response, but assuming that the Windows
> LPDSVC actually works, I don't see why.


>
>> because it is the only program/deamon that can communicate with a Windows
>> box.
>

> As I understand it, the whole purpose of the Windows "TCP/IP Print Server"
> (aka LPDSVC) is to accept jobs via lp. It claims that it complies with the
> RFC 1179 Line Printer Daemon Protocol, and the fact that errors are logged
> in the Windows system log when I use a bogus value for "rp" in printcap
> shows that the two machines are communicating via lp.
>
> (I also just realized that nothing is showing up in /var/log/lpd-errs
> because I didn't specify a logfile in the printcap entry: gonna have to
> fix that.)
>
> So I really think this should be possible without samba, but I'll try
> samba if this really seems to be a dead end.


>
>> Samba is not difficult to configure. The easiest solution is connecting
>> the printer to a unix machine and use samba to let windows acces that
>> printer as explained here:
>

> Thanks, but that's very much not what I want to do. The printer is
> destined to sit next to a Windows user who is a floor away from the
> FreeBSD machine, software on the BSD machine will need to print on that
> printer, and she doesn't want to have to get up and walk downstairs dozens
> of times a day just because I can't make this work. :-)
>
> I have just run across a document at <http://www.winnetmag.com/Article/
> ArticleID/14535/14535.html> that suggests the missing piece of the puzzle
> is manually adding a new key to the Windows registry. The gist of it seems
> to be:
>
> 1. Start the registry editor (regedit.exe)
> 2. Move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
> LPDSVC\Parameters
> 3. From the Edit menu select New - DWORD value
> 4. Enter a name of SimulatePassThrough and press Enter
> 5. Double click the new value and set to 1. Click OK
> The default value for SimulatePassThrough is 0, which informs LPD
> to assign data types according to the control commands.
>
> I'm at home by now, so I won't try this until Friday. I'll report back if
> it works. The document pre-dates Windows 2000 so it may not be applicable.
>
> Thanks again.
>
> --
Bearing in mind, that the printer will need to be a PS one as Windows only
drivers will print nothing when sent jobs from BSD.

Mark.
--
--
Mark Slingo
ma...@slingo.nq.nu
http://www.slingo.nq.nu

Matt

unread,
Nov 26, 2003, 11:04:00 PM11/26/03
to
John Doherty wrote:

> I am trying to configure a machine running FreeBSD 4.7-RELEASE to
> print to a printer connected to a machine running Windows 2000 Pro.
>

<SNIP>


> For better or worse, I know virtually nothing about Windows printing.

Unfortunately, I've had to learn more than I'd like :-)

>
> The win2K machine prints to the printer just fine and the printer is
> shared. The Windows "TCP/IP Print Server" service is running and
> configured to start automatically.
>

> I'd prefer not to use samba for this mostly because it doesn't seem
> like it should be necessary and I don't know anything about samba
> printing, either.

In general, I've found that using the TCP/IP printing on Windows is
easier and more reliable than printing to shares...YMMV.

>
> Here's the printcap entry I'm trying to use:
>
> lp14|wp1|windows printer:\
> :sh:\
> :sd=/var/spool/lpd/lp14:\
> :rm=jdpc:\
> :rp=HL1440:
>
> "jdpc" is a name listed in /etc/hosts. "HL1440" is the name of the
> printer as it is known to Windows. The spool directory exists;
> chkprintcap reports nothing.
>
> "lpc stat lp14" reports:
>
> lp14:
> queuing is enabled
> printing is enabled
> no entries in spool area
> printer idle
>
> When I try to print a job, nothing appears to happen: "lpc stat" still
> shows no jobs spooled, nothing is reported in the Windows system log,
> nothing is reported in /var/log/lpd-errs, ps only shows one lpd
> process running, and of course, nothing comes out of the printer.
>
> But if I change the "rp" value in /etc/printcap to something other
> than the name of the Windows printer, the Windows system log reports:
>
> Printer \\192.168.2.110\BOGUS specified in the request from
> 192.168.2.1 does not exist: request ignored.

So it sounds like when you have the correct value specified, the job is
at least accepted on the Windows machine...Otherwise you'd probably get
a similar error.

>
> And there's an lpd process on the BSD machine that will hang around
> trying to print the job once every four minutes or so.
>
> I'm stumped. Any light than anyone can shed will be much appreciated.
>


Try adding a printer on the Windows machine that is a Generic/text only,
instead of using the Windows drivers that match your particular
printer....But points to the same physical printer/port.

We've done this at work, and did get it to go from other *nix machines.
The problem with printing to Windows machines is that Windows insists
on apllying it's drivers to all print requests...AFAIK there's no way to
tell Windows to *not* format the print job in any way...Which is why
we've had better luck when specifying a "plain text" printer...At least
the amount of modification Windows does is minimal.
You may also want to specify some kind of filter on the BSD side. We've
had luck with APS Filter and ifhp.


--
- Matt -

jpd

unread,
Nov 27, 2003, 4:04:07 AM11/27/03
to
In article <bq3sd...@enews2.newsguy.com>, John Doherty wrote:
> Shoot, I hope you're wrong about that, because it's not a PS printer. If
> it was, it would have an ethernet interface and I'd just stick it on the
> network and be done with it. :-)

You're confusing a print spooler/server with the language used to
describe page layout here. I understand why you (over)generalize
it but the relation is not 1:1.


> (Not only do I know virtually nothing about Windows printing, I know
> virtually nothing about non-PostScript printers, either.)

They're all to be considered broken or at least crippled. ;-)


> But if it won't work via lp if it's not PostScript, how can it work via
> samba without fancy filtering? It doesn't seem like smbspool does much
> more than transfer the job to the Windows machine.

Good question, and I don't know the answer. Could be that samba is
doing lf->crlf conversion and the printer accepts a language that
works with lots of escape sequences: without those it'll just print
any text passed to it (as plain text).


> Well, anyway, the printer specs say it supports LPR/LPD and the trick
> with the registry seems to be about getting the Windows machine to
> just pass through whatever comes its way, so I'm going to give it a go.
>
> For all the time I've spent on this so far, my boss could have bought a
> much nicer printer. ;-)

Good point. Next time get a postscript printer right away.


--
j p d (at) d s b (dot) t u d e l f t (dot) n l .

0 new messages