Virtualbox: How to connect to the display when launched via vagrant?

I've used vagrant to set up ubuntu 12.10. How can I actually connect to the graphical desktop? There doesn't seem to be a way in the Virtualbox manager. It shows a preview but the 'show' icon is disabled.

It's a bit of a fiddle but I can suspend the vagrant then use the VirtualBox manager to start the VM and it connects to the display. I'd rather I didn't have to do this though because it might mess up NFS shares/IP addresses, etc.


Solution 1:

config.vm.boot_mode = :gui

See http://docs-v1.vagrantup.com/v1/docs/config/vm/boot_mode.html

Solution 2:

you edit the Vagrantfile and you add this line in section provider:

   config.vm.provider "virtualbox" do |vb|

     vb.gui = true

   end