Thursday, October 29, 2009

Apache Directory Studio Fails to start on Ubuntu 9.04

I needed to install Apache Directory Studio this morning and after downloading unpacking version 1.4.0 I could not get it to run. Starting ADS at the command line resulted in the following output, the splash screen and a small sad blank window.

$ ./ApacheDirectoryStudio
0    [main] INFO  - Entering Apache Directory Studio.
4003 [main] INFO  - Exiting Apache Directory Studio.

Reading the logs in ~/.ApacheDirectoryStudio/.metadata/.log revealed an exception:

!ENTRY org.eclipse.ui.workbench 4 0 2009-10-29 09:29:30.476
!MESSAGE Widget disposed too early!
java.lang.RuntimeException: Widget disposed too early!
at org.eclipse.ui.internal.WorkbenchPartReference$1.widgetDisposed(
at org.eclipse.swt.widgets.TypedListener.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(

After a bit of a hunt through the ADS mailing lists I learned that this error is due to a problem with the Mozilla XULRunner version on my system.

In order to get ADS to run correctly I had to specify the version XULRunner it should run with manually:

./ApacheDirectoryStudio -vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner/xulrunner-1.9.1

The original Mozilla bug is detailed here, and this solution for ADS found here.

Wednesday, October 28, 2009

Building wget in Snow Leopard

I like Snow Leopard, it's a nifty OS, but occasionally something will baffle me. This evening it was the exclusion of wget from the command line tools.

Clearly this sucks and living without wget is not an option. Thankfully wget is free software so it's easy to grab the source and build it yourself.

Firstly you'll need to have Xcode installed with "Unix Dev Support". The Unix Dev Support option gives you gcc, make and other essential goodies. Xcode is on the Mac OS 10.6 DVD in the optional installs section (you can also download Xcode from Apple).

Next you'll need to grab the latest wget source from: or click here.

To compile and install wget complete the following:

  1. Unpack the wget tarball by double clicking it in Finder.
    Take note of the name of the newly unpacked directory (something like wget-1.12).
  2. Open a terminal and cd to where you just unpacked (by default this will be the directory below).
    cd ~/Downloads/wget-1.*
  3. Run the configure script:
  4. Run the build and installer:
    sudo make install
  5. All done. Now you can delete the wget folder and tarball in your ~/Downloads directory. 

Once your done you'll be able to run wget in your terminal.

Much better.

Thursday, October 22, 2009

When you forget to start screen...

Screen and nohup are great tools which can be used, by someone with forethought, to keep their processes running after they disconnect from a server.

The problem with both nohup and screen is that you need to use them before starting a process. If you forgot or didn't realize the process was going to take ages then your all out of luck.

Recently on a man page hunt I discovered a workaround for this situation using disown. At the terminal with the long running process enter the following:

ctrl + z  (pause the current process and background it)
bg        (resume the last backgrounded process in the background)
disown    (disassociate the last process from the current terminal) 
exit      (to close the current terminal)

Now your disconnected, your process is still running and you can go home. If you don't want to go home and instead want to check that your process is still running, ssh back into your server and run ps aux and hunt it down in the process list.