Page 1 of 1

CUPS rejects guests attempts to print

Posted: 5. Aug 2010, 00:20
by tea-drinker
Hi

I'm trying to set up a windows guest to print to an ubuntu (10.04) host. To cut a
long story short (I've been working on this for a few evenings) I started here:
http://forums.virtualbox.org/viewtopic.php?t=1465

So I set up a network printer in windows, with url:
http://DEFAULTGATEWAY:631/printers/PRINTERNAME

But once I've added in real values and clicked "Next", windows responds with
"Windows cannot connect to the printer. Either the printer name was
typed incorrectly, or the specified printer has lost its connection
to the server".

Sigh.

I'm using the NAT networking option for the guest, and I can surf the web
(but I can't access the host's cups web interface). I figured that cups was maybe
rejecting the guest's attempts to connect/print and I eventually verified this
when I found the cups error log, which has faithfully recorded each of the guest's
attempts to print. For example...

E [04/Aug/2010:21:48:20 +0100] Request from "localhost" using invalid Host: field "10.0.2.2:631"

I've tried various solutions, such as this one...
http://www.linuxforums.org/forum/mandri ... field.html
...and others which also involve tinkering with cupsd.conf & restarting cups
but still no joy.

I'm starting to run out of ideas. There must be an easy answer, certainly all the forum
posts I find comment about how easy this all is. Maybe there's a bug somewhere?
For the record: Ubuntu 10.04LTS, Cups 1.4.3, and VirtualBox 3.6.2 (closed source
version, because I need usb support). It's not a USB printer, alas.

Any ideas, anyone?


Thx

Re: CUPS rejects guests attempts to print

Posted: 5. Aug 2010, 00:24
by tea-drinker
I should also say the guest o/s is windows xp which I keep patched & up to date, and I have the virtualbox guest additions installed too.

Thx-

Re: CUPS rejects guests attempts to print

Posted: 5. Aug 2010, 00:32
by fixedwheel
Hi,
E [04/Aug/2010:21:48:20 +0100] Request from "localhost" using invalid Host: field "10.0.2.2:631"
10.0.2.2 is the VBox NAT Gateway ... i guess you shouldn't use NAT

try with setting the guests network to "bridged" or "host-only" instead => http://www.virtualbox.org/manual/ch06.html

Re: CUPS rejects guests attempts to print

Posted: 5. Aug 2010, 21:01
by Sasquatch
Or to make it easier for Windows, just install Samba on the Host and let that one share your printers.