Complex system command output is suppressed when jruby is executed from GlassFish

#!/usr/local/bin/ruby
IO.popen(’( dbus-uuidgen > /var/lib/dbus/machine-id ; /usr/bin/Xvnc -rfbauth /etc/hosts & export DISPLAY=:0 ; ( /usr/bin/firefox & ) > /dev/null 2>&1 ; sleep 5 ; /usr/bin/killall firefox ; /usr/bin/killall Xvnc ; if [ -d /root/.mozilla ]; then echo “SUCCESS” ; else echo “FAILED” ; fi)’) {
|f| puts f.gets
}
The output is empty when the script is run from GlassFish environment