以下のVagrantfileを使用して、Aptana Studio、Gnome Desktop環境、XRDPをインストールした仮想マシン(Debian Stretch/9.3 )を構築できます。
XRDPがインストールされているので、Windowsのリモートデスクトップで接続することができます。ユーザ名はVagrant、パスワードもVagrantでログオンできます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/debian-9.3"
config.vm.hostname = "db93gnomeaptanastudio"
config.vm.network "public_network", ip:"192.168.1.114", :netmask => "255.255.255.0"
config.vm.provider :virtualbox do |vbox|
vbox.name = "db93gnomeaptanastudio"
vbox.gui = true
vbox.cpus = 4
vbox.memory = 4096
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
#DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -y install task-japanese
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/.xprofile
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 .xprofile
apt-get -y install xrdp fcitx-mozc task-gnome-desktop tigervnc-standalone-server
apt-get -y install build-essential module-assistant dkms
wget http://download.virtualbox.org/virtualbox/5.2.6/VBoxGuestAdditions_5.2.6.iso
mount -o loop -t iso9660 VBoxGuestAdditions_5.2.6.iso /media/
/media/VBoxLinuxAdditions.run
export DISPLAY=:0.0
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 oracle java
apt-get -y install software-properties-common
add-apt-repository ppa:webupd8team/java
apt-get update
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
apt-get install -y --allow-unauthenticated oracle-java8-installer oracle-java8-set-default
# install aptana studio
apt-get -y install unzip
wget https://github.com/aptana/studio3/releases/download/v3.6.1/Aptana_Studio_3_Setup_Linux_x86_64_3.6.1.zip
unzip Aptana_Studio_3_Setup_Linux_*
mv Aptana_Studio_3 /opt
apt-get -y install chromium libjpeg62 libwebkitgtk-1.0-0
cat << EOF > /usr/share/applications/aptana.desktop
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/Aptana_Studio_3/AptanaStudio3
Icon=/opt/Aptana_Studio_3/icon.xpm
Name=Aptana Studio
Categories=Development;
EOF
init 5
SHELL
end
〇Aptana Studioの画面
○関連情報
・Aptana Studioに関する他の記事はこちらを参照してください。
0 件のコメント:
コメントを投稿