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?
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 want to enter the Desktop GUI, you can modify the Vagrantfile to add vb.gui = true
. For example:
config.vm.provider "virtualbox" do |vb| # Display the VirtualBox GUI when booting the machine vb.gui = true # Customize the amount of memory on the VM: # vb.memory = "1024" end
Then you can vagrant up
and enter it from virtualbox.