Have you ever wanted to print from Windows XP running within a VirualBox to a printer connected to your Ubuntu “host”? I have. This is how I managed to do it. I am assuming that you already have your printer configured and that you can print for Ubuntu and that you have configured your VirtualBox Windows XP with networking.
Enable access to your printer from any host
First, you need to enable CUPS so that it will accept connections from your VirtualBox Windows XP. To do this do:
- Select the System menu -> Administration -> Printing. The Printer configuration window will appear.
- Select the Settings menu item from the Server menu.
- Make sure that there is a tick mark next to “Publish shared printers connected to this system”

Enabling Printer connections from any host
- Press OK
Identify the Printer URL
We now need to identify the URL of the printer so that we can use this inĀ VirualBox Windows XP.
- In your web browser, navigate to http://localhost:631/ to access the Common UNIX Printing System (CUPS) administration pages
- Press the “Manage Printers” button. This will display a list of your configured printers
- Click on the name of your printer. This will display a page about your printer.
- Copy the URL of the page from the address bar of your browser. For my printer it is http://localhost:631/printers/PhotosmartC5100 but will be different for your printer.
Test Accessing the printer from VirtualBox Windows XP
We now need to check we can access the CUPS web pages from the VirtualBox Windows XP.
- Start your web browser and open the url http://<ubuntu_host>:631/ where <ubuntu_host> is the IP address of your Ubuntu machine
- The web page that loads will be the Common UNIX Printing System (CUPS) administration pages
- Press the “Manage Printers” button. This will display a list of your configured printers
- Click on the name of your printer. This will display a page about your printer.
- Copy the URL of the page from the address bar of your browser. For my printer it is http://<ubuntu_host>:631/printers/PhotosmartC5100 but will be different for your printer. We will need this later when configuring the printer on Windows
Setting up the Windows printer
We now need to configure the printer in Windows XP.
- Open the Control panel and select Printers
- Press Add Printer. The Add Printer wizard will appear. Press Next
- Select “A network printer, or a printer attached to another computer” and press next
- Select “Connect to a printer on the Internet or on a home or office network” and enter the printer URL from step 5 above in the URL box and [press Next
- In the Add Printer Wizard window, either select your printer and press Next or press “Have Disk” and follow the instructions to install your printer.
- Wait for the printer to be installed and configured. This may take a moment or two.
- You will then be asked if you want to make this printer your default printer. Select Yes or No and press Next.
- Press the Finish button.
Testing the Windows printer
You should now be pack in the Printers section of the Control panel and your newly added printer will be listed. Lets test that the printer worked.
- Right click on the printer and select properties
- Press the “Print Test Page” button.
- Your printer should print a test page.
These are the steps that worked for me. I hope they work for you so that you can print from Windows running in VirtualBox.