CUPS rejects guests attempts to print

Discussions related to using VirtualBox on Linux hosts.
Post Reply
tea-drinker
Posts: 2
Joined: 5. Aug 2010, 00:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: windoze

CUPS rejects guests attempts to print

Post 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
tea-drinker
Posts: 2
Joined: 5. Aug 2010, 00:14
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: windoze

Re: CUPS rejects guests attempts to print

Post 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-
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: CUPS rejects guests attempts to print

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: CUPS rejects guests attempts to print

Post by Sasquatch »

Or to make it easier for Windows, just install Samba on the Host and let that one share your printers.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply