〇Eclipse 2019-03の画面
○構築方法
以下のVagrantfileを使用して、Eclipse 2019-03とAdoptOpenJDK11、Cinnamon Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.6)を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はvagrant、パスワードもvagrantでログオンできます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.6"
config.vm.hostname = "db96cinnamoneclipse201903"
config.vm.network "public_network", ip:"192.168.1.107", :netmask => "255.255.255.0"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db96cinnamoneclipse201903"
vbox.gui = true
vbox.cpus = 2
vbox.memory = 2048
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install task-japanese gawk
sed -i -e 's/# ja_JP.UTF-8 UTF-8/ja_JP.UTF-8 UTF-8/' /etc/locale.gen
locale-gen
update-locale LANG=ja_JP.UTF-8
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
apt-get update
cat << EOF > /etc/default/keyboard
XKBMODEL="pc106"
XKBLAYOUT="jp"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
EOF
cat << EOF > /home/vagrant/.xsessionrc
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
sed -i -e "s/^EnabledIMList.*$/EnabledIMList=fcitx-keyboard-jp:True,mozc:True,fcitx-keyboard-us:False/" /home/vagrant/.config/fcitx/profile
fcitx-remote -r
fcitx -r -d
EOF
chown vagrant:vagrant .xsessionrc
apt-get -y install xrdp fcitx-mozc task-cinnamon-desktop tigervnc-standalone-server
apt-get -y install build-essential module-assistant dkms
wget http://download.virtualbox.org/virtualbox/5.2.22/VBoxGuestAdditions_5.2.22.iso
mount -o loop -t iso9660 VBoxGuestAdditions_5.2.22.iso /media/
/media/VBoxLinuxAdditions.run
im-config -n fcitx
sudo -u vagrant bash -i -c "export DISPLAY=:0.0 && fcitx -r"
cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.org
cat /etc/xrdp/xrdp.ini.org | gawk '/\\[Globals\\]/,/\\[Xorg\\]/' | sed -e 's/\\[Xorg\\]//' > /etc/xrdp/xrdp.ini
cat << EOF >> /etc/xrdp/xrdp.ini
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
EOF
systemctl restart xrdp
systemctl enable xrdp
# install AdoptOpenJDK11
cd /opt
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
tar xvfz OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
cat << EOF > /etc/profile.d/jdk.sh
export JAVA_HOME=/opt/jdk-11.0.3+7
export PATH=\\$PATH:\\$JAVA_HOME/bin
EOF
# install eclipse 201903
wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/2019-03/R/eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz
tar xvfz eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz
cat << EOF > /usr/share/applications/eclipse.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=bash -c "source /etc/profile.d/jdk.sh && /opt/eclipse/eclipse"
Name=eclipse
Categories=Development;
Icon=/opt/eclipse/icon.xpm
EOF
init 5
SHELL
end