Skip to content

Instantly share code, notes, and snippets.

@jrenouard
Last active September 28, 2021 07:24
Show Gist options
  • Save jrenouard/1a705f34b79ef776ab7202833cc79350 to your computer and use it in GitHub Desktop.
Save jrenouard/1a705f34b79ef776ab7202833cc79350 to your computer and use it in GitHub Desktop.
Ubuntu Server for Digital Signage with Chromium starting fullscreen and Teamviewer

Ubuntu Server for Digital Signage with Chromium starting fullscreen and Teamviewer

Install Ubuntu Server then

sudo apt-get update
sudo apt-get upgrade

Install X Server and openbox

sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox

Install Chromium

sudo apt-get install --no-install-recommends chromium-browser

Openbox configuration

sudo vim /etc/xdg/openbox/autostart

File content to paste in autostart

# Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms

# Allow quitting the X server with CTRL-ATL-Backspace
setxkbmap -option terminate:ctrl_alt_bksp

# Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --disable-infobars --kiosk 'http://your-url-here'
If you want to try it run
startx -- -nocursor

Start X automatically on boot

sudo vim .bashrc

Add the following line to the file

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor

If Chromium (or the X server) crashes, press Ctrl-Alt-Backspace to kill the X server and restart it with

startx -- -nocursor.

If you need a terminal session, you can switch to one of the other consoles by pressing Ctrl-Alt-F2 (or any other function key).

Pressing Ctrl-Alt-F1 brings you back to the first console where Chromium is running.

Autologin

sudo systemctl edit getty@tty1.service

Add the following, replacing myusername with your user name:

[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERM
Type=idle

Install Teamviewer

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb 
sudo dpkg -i teamviewer_amd64.deb 
sudo apt -f install 
sudo teamviewer setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment