I am trying to start selenium and the headless Xvfb X server using a init script and the daemon tool.

But when I start my environment using this method, Firefox fails to launch. It looks like it can not find Firefox 2 and then stops. When I start that environment normally, it also does not find Firefox 2 but then it searches for Firefox 3, finds it and starts properly.