I'm trying to configure a Ubuntu Server 16.04.02 in Kiosk mode with Chrome. It's working but I'm not able to configure a Splash Screen instead of showing boot messages.
Working so far
Steps to create my Chrome Kiosk
- Installed Ubuntu Server 16.04.02 with OpenSSH Server
- Updates:
sudo apt update && sudo apt upgrade -y
Display Server + Windows Manager:
sudo apt install xorg openbox -y
Note: I tried to install openbox with
--no-install-recommends
but half of the screen (right side) was black.Google Chrome
sudo add-apt-repository 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt update && sudo apt install google-chrome-stable -y
- Create a "Kiosk" user:
sudo adduser kiosk
Start Script for Chrome:
sudo tee -a /home/kiosk/startchrome.sh <<EOF #!/bin/bash # Turn off DPMS (Display Power Management Signaling) xset -dpms # Disable screen saver blanking xset s off # Start OpenBox openbox-session & # Make sure Chrome is always started - restart if needed while true; do rm -rf ~/.{config,cache}/google-chrome/ google-chrome --ignore-certificate-errors --kiosk --no-first-run --disable-infobars --disable-session-crashed-bubble --disable-translate 'http://localhost:8080' done EOF
Make it executable and run on login:
sudo chmod +x /home/kiosk/startchrome.sh echo "/usr/bin/startx /etc/X11/Xsession /home/kiosk/startchrome.sh -- :0 &> /dev/null" | sudo tee -a /home/kiosk/.profile
Configure Auto-Login:
Configure Getty:
sudo mkdir /etc/systemd/system/getty@tty1.service.d/ sudo tee -a /etc/systemd/system/getty@tty1.service.d/autologin.conf <<EOF [Service] ExecStart= ExecStart=-/sbin/agetty --skip-login --noissue --autologin kiosk --noclear %I $TERM Type=idle EOF
Enable Getty:
sudo systemctl enable getty@tty1.service
Hide Banner message on boot
sudo touch /home/kiosk/.hushlogin sudo chown kiosk:kiosk /home/kiosk/.hushlogin
Problem - X not starting
I want to remove all Boot Messages. I tried GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
in /etc/default/grub
but now, all I see is a little cursor at the top left of the screen. Chrome is not displayed anymore?
Solution
The kiosk user must be added to the video group! Don't know why it was working before I installed plymouth:
sudo usermod -a -G audio kiosk
sudo usermod -a -G video kiosk
Note: I tried my own procedure in Ubuntu 17.04 and i had to do those additional steps:
sudo apt install xserver-xorg-legacy
sudo dpkg-reconfigure xserver-xorg-legacy
Now you select "Anyone" on the menu. Than modify /etc/X11/Xwrapper.config
and set:
needs_root_rights=yes
allowed_users=anybody
Question - How to configure a new theme
I also want a Splash Screen, I think that I have to install plymouth? What should I install and how to configure it?
Solution
I created a theme based on ubuntu-logo and copied it in /usr/share/plymouth/themes/
than I did:
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/MY_THEME/MY_THEME.plymouth 150
sudo update-alternatives --config default.plymouth
It will ask for theme selection, I select mine and after you must do:
sudo update-initramfs -u
sudo update-grub
Thanks!