Sharing Ubuntu “host” printer with Windows XP running in VirtualBox

May 22, 2009

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:

  1. Select the System menu -> Administration -> Printing. The Printer configuration window will appear.
  2. Select the Settings menu item from the Server menu.
  3. Make sure that there is a tick mark next to “Publish shared printers connected to this system”

    Enabling Printer connections from any host

    Enabling Printer connections from any host

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

  1. In your web browser, navigate to http://localhost:631/ to access the Common UNIX Printing System (CUPS) administration pages
  2. Press the “Manage Printers” button. This will display a list of your configured printers
  3. Click on the name of your printer. This will display a page about your printer.
  4. 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.

  1. Start your web browser and open the url http://<ubuntu_host&gt;:631/ where <ubuntu_host> is the IP address of your Ubuntu machine
  2. The web page that loads will be the Common UNIX Printing System (CUPS) administration pages
  3. Press the “Manage Printers” button. This will display a list of your configured printers
  4. Click on the name of your printer. This will display a page about your printer.
  5. Copy the URL of the page from the address bar of your browser. For my printer it is http://<ubuntu_host&gt;: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.

  1. Open the Control panel and select Printers
  2. Press Add Printer. The Add Printer wizard will appear. Press Next
  3. Select “A network printer, or a printer attached to another computer” and press next
  4. 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
  5. 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.
  6. Wait for the printer to be installed and configured. This may take a moment or two.
  7. You will then be asked if you want to make this printer your default printer. Select Yes or No and press Next.
  8. 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.

  1. Right click on the printer and select properties
  2. Press the “Print Test Page” button.
  3. 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.

Advertisements

Auto starting Jira Server on Ubuntu 9.04

May 5, 2009

Having installed Jira standalone on my Ubuntu 9.04 server, I wanted the Jira server to auto start when it boots. Jira does not provide an auto start script with the installation for Linux.

After several failed attempts at creating the start up script from scratch, I decided to modify the Tomcat start up scripts that are provided with Tomcat6 so that they start my Jira server instead.

I have documented below what I ended up doing so that if I ever need to redo the steps, I have recorded it somewhere. These steps may be useful to other people too but there is no guarantee that they will work and no warranty (implied or otherwise) that they will not do something horrible to your server.

Read the rest of this entry »

Fixing skype audio problem on Ubuntu 9.04

April 20, 2009

When running Skype on Ubuntu 9.04, I get the following error message when making a test call:

“Problem with Audio Playback”

The problem is that Ubuntu uses pulse audio and Skype does not play nicely with it. To fix it, do the following:

  1. Open Skype options and select Sound Devices
  2. Change Sound In, Sound Out and Ringing to use “pulse”
  3. Clear the check mark next to “Allow Skype to automatically adjust my mixer levels” (This step may not be required)
  4. Press the Apply button and then the Close button.

You should now be able to place a test call.

Update: Microphone issue.

Several people have posted comments saying that they have had problems with their microphone not working in Skype. I did not run into this problem so I don’t know how to fix it. However, Chris did post the following comment on this blog entry:

To fix the microphone problem!
Change the sound in (in the Skype sound options) to your motherboard instead of Pulse. Now it should work for ya!

Thanks Chris for this suggestion. Hopefully it will work for you too.

Extra repositories for Ubuntu

March 18, 2009

One of the great things about Ubuntu is the large number of applications that are available in its default repositories. However, sometimes you need an application that is not in the Ubuntu repositories or you need a later version. Often there are other repositories that can be used to meet your needs.

The following post contains a nice set of extra repositories for Ubuntu.

http://blog.ibeentoubuntu.com/2009/03/extra-repositories-for-ubuntu-810-you.html

Grep in colour

March 18, 2009

Grep can use colours to highlight the matching text using the –color parameter

grep --color=auto <pattern> <file>

I found this tip at:

http://unstableme.blogspot.com/2009/03/highlight-match-with-color-in-grep.html