How do I install a Vagrant Linux box that has a Desktop GUI (gnome, kde, ...).
Is there a Vagrant box distribution that already has a Desktop environment?
After I do a "vagrant up" how do I log into this virtual box and with the GUI active?
This question is a duplicate with an extensive answer here: Using vagrant to run virtual machines with desktop environment
Yes, you need to enable the GUI in your vagrant file, but first you need to:
From one of the answer in the link above (https://stackoverflow.com/a/33138627/1412348), you can use the following vagrant file:
Vagrant.configure(2) do |config|
# Ubuntu 15.10
config.vm.box = "ubuntu/wily64"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
end
# Install xfce and virtualbox additions
config.vm.provision "shell", inline: "sudo apt-get update"
config.vm.provision "shell", inline: "sudo apt-get install -y xfce4 virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11"
# Permit anyone to start the GUI
config.vm.provision "shell", inline: "sudo sed -i 's/allowed_users=.*$/allowed_users=anybody/' /etc/X11/Xwrapper.config"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With