Author Topic: Share a networked printer to a VirtualBox windows guest  (Read 5143 times)

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12519
Share a networked printer to a VirtualBox windows guest
« on: July 21, 2009, 10:58:22 PM »
Original Poster: Redeemed-05

Ever wonder how to setup a networked printer from a linux host to a windows guest in VirtualBox? So did I, and this is how I did it.

VirtualBox Personal version 3.0.2
Host OS: PCLinuxOS 2009 (Fully updated)
Guest OS: Windows XP Pro SP3 (Fully updated minus IE7, guest additions installed)

First things first. You need to have your windows guest installed with a working network. In other words you can connect to the Internet.

You also need your linux printer to be published. If your not sure if your linux printer is published, open a web browser and go to http://localhost:631/, click on the printers tab, and look for Printer State: four lines below your default printers name. Should look something like this > Printer State: idle, accepting jobs, published.

If your printer is not publised, publish it by clicking the Publish Printer button. You will be asked for a user name and password, enter root and your root password.

Now on to VirtualBox

From the windows guest log in as a administrator, and go to conrtol pannel > printers and faxes > add a printer.

When the add printer wizard opens:

1. Click next
2. Select "A network printer, or a printer attached to another computer"
3. Click next
4. Select "Connect to a printer on the internet or on a home or office network"
5. In the URL input box enter http://192.168.0.000:631/printers/NameOfPrinter
6. Change 192.168.0.000 to match the ip address of your host computer, and NameOfPrinter to match the name of your printer as listed in CUPS.
7. Click next
8. Select your printer from the list, and click ok
9. At this point drivers should load for your printer
10. Click finish to complete the process

From the windows guest go to conrtol pannel > printers and faxes >

11. Right click on your printer, and select properties
12. Click Print Test Page on the bottom of the general tab
13. If your printer prints the test page like mine did, your done.
14. From here you can also adjust your printing preferences.

If you can, please try this with the OSE version of VirtualBox to see if it works the same. Perhaps someone could even confirm if it works with Vista, or even a older verson of windows. It should most certainly work with a linux guest, with the exception of needing a URI of ipp://192.168.0.000:631/printers/NameOfPrinter

Anyway, hope this helps someone. Happy printing!

Thanks to everyone who donates. You keep the servers running.