Archive for May, 2009

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

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.

(more…)


Follow

Get every new post delivered to your Inbox.