This produces a full screen display of a web site that users cannot modify but Chrome is not in kiosk mode. This makes it easy for admins to remotely modify the display as things change.
These instructions are similar for the Ubuntu 18.0.4 OS. Some steps are easier since they are available from the GUI. A few changes need to be made though. The desktop needs to be changed to lightdm to reduce complexity of setting up a running X11VNC on startup. Automatic login on boot, adding startup programs and stopping the screen saver are available in the GUI. No need to start SSH; it’s already on. The chromium startup line also need the additional switch: --password-store=basic This bypasses an extra chromium login on startup.
When using an existing box, the chromium browser may not work properly for this on older versions of Jessie.
Update the OS and it’ll work as it should.
sudo apt-get update
sudo apt-get dist-upgrade
Install Raspbian OS from web site
Default is to boot into GUI desktop without using a password
Activate SSH connection
SSH has been deactivated by default since 2016
set keyboard layout to match your locale. Default is UK. This can cause problems with passwords having a special character when trying to connect with putty. Get access denied because passwords don’t match as the keyboards are not mapped the same. Found out the hard way.
——————————————————————————————————————————–
Permanently disable screen blanking, allow SSH, disable built in VNC
Now controlled under raspi-config app in terminal mode
or
from GUI select preferences>Raspberry Pi configuration.
Blanking: Select display tab and turn off screen blanking
SSH: Select interfaces tap and activate
VNC: Make sure it is not turned on.
check that SSH is active netstat -lt
SSH port will show in list if it’s active.
——————————————————————————————————————————
Install and configure the x11 VNC.
This shows the active GUI instead of spawning a new one. You can see the changes that will appear on the display screen. This allows you to use ctl + or ctl – to change font size and leave it set when you disconnect.
RealVNC server is installed on the raspberry pi and turned off by default. Do not turn it on. Doing so will result is multiple competing processes and you will be unable to connect.
I used UltraVNC to connect from the windows machine. It does not require a vendor account and email address.
https://www.megaleecher.net/Raspberry_Pi_VNC_Setup
sudo apt install x11vnc
Configure autostart for VNC in: /home/[user]/.config/autostart/x11vnc.desktop
create the file and directory if it does not exist
File contents:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNCx11
Exec=x11vnc -forever -usepw
StartupNotify=false
Terminal=false
Hidden=false
additional line to prevent errors at startup. Sometimes the browser starts before the network is finished configuring so you get errors in connection. I haven’t seen it in the latest OS version but has happened in the past
X-GNOME-Autostart-Delay=3
Create password for remote session. This is separate from the user login password, but the same password can be used in both.
x11vnc -storepasswd
reboot to start x11vnc
Set the browser to open full screen when the system boots into the GUI. Incognito mode is needed because of the way some web sites change between modes. Failure to go incognito may prompt for a user response.
Use systemd autostart configuration for the browser.
cd ~/.config/autostart
sudo nano browser.desktop
[Desktop Entry]
Type=Application
Name=browser
Exec=/usr/bin/chromium-browser --start-fullscreen --incognito http://yoursite
Note: some browsers display the double hyphen as a single dash.
Check https://peter.sh/experiments/chromium-command-line-switches/ for correct style if in doubt
To display a web page with mixed secure and unsecure content.
add the switch. --allow-running-insecure-content
Note: Advanced settings in chrome allow mixing secure and unsecure content from specific websites. Privacy and Security > Site Settings > Additional content settings > Insecure content > Allow > add
However, this is not applied when starting from a command line in the autostart
You can now disconnect the keyboard and mouse. The unit will boot into a full screen display of the web site and the users cannot modify the settings. You can remote in and change the display easily. Patience on startup. The web site may take 30 seconds to appear and fully display. Usually less but it varies by website.
———————————————————————————————————————————Allow remote user to reboot the display
Create user account; I use reset as the user name.
In /etc/sudoers.d create a file with the following line. File name doesn’t matter; I use reset-display.
reset ALL=NOPASSWD: /sbin/reboot
This allows the named user to run the reboot command without sudo privileges.
To do it remotely from a windows environment, install Putty and use the Plink utility to send the reboot command to the box.
plink reset@192.168.1.100 -pw password sudo reboot
sudo will run without an admin password because of the file created in sudoers.d
Include it in a .bat file with an exit command and you can just double click to reboot the box.
The password is in clear text but it’s not an issue in our environment.
Other resources
https://en.wikipedia.org/wiki/Google_Chrome_version_history
https://peter.sh/experiments/chromium-command-line-switches/
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————-