〇KioskモードのFirefoxの画面
〇構築方法
以下のVagrantfileを使用して、Xfce Desktop環境でFirefoxをKioskモードで起動する仮想マシン(Ubuntu18.04)を構築できます。
Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.hostname = "ub1804xfce"
config.vm.network :public_network, ip:"192.168.1.114"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1804xfce"
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 update
apt-get -y install fcitx-mozc xfce4 $(check-language-support -l ja) lightdm unclutter firefox
localectl set-locale LANG=ja_JP.UTF-8
localectl set-keymap jp106
im-config -n fcitx
apt-get -y purge xserver-xorg-hwe-18.04 linux-image-generic-hwe-18.04 xserver-xorg-legacy-hwe-18.04 xserver-xorg-core-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
apt-get -y autoremove
apt-get -y --no-install-recommends install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
echo "xfce4-session" > /home/vagrant/.xsession
chown vagrant:vagrant /home/vagrant/.xsession
mkdir -p /home/vagrant/.config/autostart/
cat << EOF > /home/vagrant/.config/autostart/.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/firefox --kiosk https://www.google.com
Name=firefox kiosk mode
EOF
chown -R vagrant:vagrant /home/vagrant/.config
rm /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
mkdir -p /home/vagrant/.config
cp -R /etc/xdg/* /home/vagrant/.config
chown -Rf vagrant:vagrant ~/.config
#[SeatDefaults]
#greeter-session=unity-greeter
#user-session=xfce
cat << EOF > /usr/share/lightdm/lightdm.conf.d/50-xfce-greeter.conf
[SeatDefaults]
autologin-user=vagrant
autologin-user-timeout=0
user-session=xfce
EOF
# suppress system prgoram problem dialog
sudo rm -rf /var/crash/*
apt-get -y purge light-locker xscreensaver
init 5
SHELL
end
0 件のコメント:
コメントを投稿