[英]How do I install a Vagrant Linux box that has a GUI (gnome, kde, …)?
如何安装具有桌面GUI(gnome,kde,...)的Vagrant Linux盒子。
是否有已经拥有桌面环境的Vagrant盒子分发?
在我做了“流浪汉”后,如何登录此虚拟框并激活GUI?
这个问题是重复的,在这里有一个广泛的答案: 使用vagrant来运行具有桌面环境的虚拟机
是的,您需要在流浪文件中启用GUI,但首先需要:
从上面链接中的一个答案( https://stackoverflow.com/a/33138627/1412348 ),您可以使用以下vagrant文件:
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
如果要进入桌面GUI,可以修改Vagrantfile以添加vb.gui = true
。 例如:
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
然后你可以vagrant up
并从virtualbox输入它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.