2017年12月7日木曜日

VagrantでInkscape、LXDE Desktop環境、XRDPがインストールされた仮想マシン(Ubuntu16.04)を構築する

以下のVagrantfileを使用して、Inkscape、LXDE Desktop環境、XRDPをインストールした仮想マシンを構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はVagrant、パスワードもVagrantでログオンできます。

Vagrantfile
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "bento/ubuntu-16.04"
  config.vm.hostname = "ub1604lxdeinkscape"
  config.vm.network :public_network, ip:"192.168.1.113"
  config.vm.provider :virtualbox do |vbox|
     vbox.name = "ub1604lxdeinkscape"
     vbox.gui = true
     vbox.cpus = 4
     vbox.memory = 4096
  end
  config.vm.provision "shell", inline: <<-SHELL
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
apt-get -y install xrdp fcitx-mozc lubuntu-desktop language-pack-ja
im-config -n fcitx

# install inkscape
apt-get -y install apt-file
apt-get update
apt-get -y install software-properties-common
add-apt-repository ppa:inkscape.dev/stable
apt-get update
apt-get -y install inkscape

# Inkscapeのショートカットを作成
mkdir -p /home/vagrant/デスクトップ/
chown vagrant:vagrant /home/vagrant/デスクトップ/
cat << EOF > /home/vagrant/デスクトップ/Inkscape.desktop

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/inkscape
Icon=/usr/share/inkscape/icons/inkscape.svg
Name=Inkscape
EOF
chmod +x /home/vagrant/デスクトップ/Inkscape.desktop
chown vagrant:vagrant /home/vagrant/デスクトップ/Inkscape.desktop

init 5
SHELL
end

○Inkscapeの画面



○関連情報
・Inkscapeに関する他の記事はこちらを参照してください。

0 件のコメント:

コメントを投稿