CUPS rejects guests attempts to print

Discussions related to using VirtualBox on Linux hosts.

CUPS rejects guests attempts to print

Postby tea-drinker » 5. Aug 2010, 00:20

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/mandriva-linux-help/151962-solved-cups-printing-error-request-localhost-using-invalid-host-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

Postby tea-drinker » 5. Aug 2010, 00:24

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-
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

Postby fixedwheel » 5. Aug 2010, 00:32

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

Re: CUPS rejects guests attempts to print

Postby Sasquatch » 5. Aug 2010, 21:01

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


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Google [Bot] and 14 guests