3

I am using VirtualBox to run Ubuntu 12.04 as a guest in a Windows 7 host. I would like execute a command in Windows that will launch Ubuntu's Firefox. I tried VirtualBox's VBoxManage guestcontrol function. The command seems to do something, but nothing seems to happen in Ubuntu:

C:\VirtualBox>VBoxManage.exe guestcontrol MyVirtualMachineUbuntu exec --image "/usr/bin/firefox" --username bob --password password --wait-stdout --verbose
Waiting for guest to start process ...
Waiting for process to exit ...
Exit code=1 (Status=500 [successfully terminated])

The /usr/bin/firefox command works when I run it in Ubuntu. Also, with guestcontrol, I can successfully call /bin/ls. But I can't actually get a major program like Firefox to run. Any ideas? Thanks.

SpaceRook
  • 185

1 Answers1

1

Could it be that it's not routed to the correct display?

As you have found you can solve it using the --enviroment flag. The command should be:

VBoxManage.exe guestcontrol MyVirtualMachineUbuntu exec --image "/usr/bin/firefox" --username bob --password password --wait-stdout --verbose  --environment "DISPLAY=:0"
Javier Rivera
  • 35,434