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 <
#!/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
EOFMake 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/.profileConfigure 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 <[Service]
ExecStart=
ExecStart=-/sbin/agetty --skip-login --noissue --autologin kiosk --noclear %I $TERM
Type=idle
EOFEnable 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!
The boot messages are avoided by GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
. I don't know why you still get the cursor though.
Anyway, to answer your question about the plymouth, you want to install it by running the command sudo apt-get install plymouth
. This should install it to the system. Then, your want to copy all of the contents of /usr/share/plymouth/themes/ubuntu-logo
to another folder (Preferably somewhere in the /usr/share/plymouth/themes
directory). Then, your most likely want to change the image ubuntu-logo
in your newly copied folder. Then, to make the change to the new boot logo, edit the configuration file for plymouth located at /etc/alternatives/default.plymouth
. There, change the address for the two lines below to the new folder you created earlier:
ImageDir=/usr/share/plymouth/themes/ubuntu-logo
ScriptFile=/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo.script
So, for example, I might edit the lines to be like this:
ImageDir=/usr/share/plymouth/themes/mytheme
ScriptFile=/usr/share/plymouth/themes/mytheme/ubuntu-logo.script
Then, save the configuration and reboot. You now should have your boot logo image instead of the regular Ubuntu one.
No comments:
Post a Comment