Set up a signage or kiosk machine with Debian 9 Linux

26 June, 20182 min readLinux

Installation

Install Debian with debian-9.4.0-amd64-netinst.iso. Use MBR and create a single root partition filling the entire disk.

Choose minimal with no graphical desktop environment. Only choose standard system utilities.

Create the default root user and a separate user with username tv.

Install the following packages as root:

apt-get install -y chromium xorg xinit vim openssh-server less curl net-tools

Configure ssh (optional)

Using SSH makes it easier to update remotely. You can then SSH into the machine remotely and run your update commands apt-get update && apt-get -y dist-upgrade

Set up the authorized_keys file then configure the SSH config file /etc/ssh/sshd_config if desired. On my test machine, I set the following in /etc/ssh/sshd_config

PermitRootLogin yes
PasswordAuthentication yes

You may wish to use PermitRootLogin without-password.

Enable the SSH service

systemctl enable ssh.service
systemctl start ssh.service

Configure auto login on tty1

Create a new directory

mkdir -p "/etc/systemd/system/getty@tty1.service.d/"

Then create a new file /etc/systemd/system/getty@tty1.service.d/autologin.conf with:

[Service]
ExecStart=-/sbin/agetty --autologin tv --noclear %I $TERM

Enable multi-user target with

systemctl set-default multi-user.target

Disable console blanking

Add the following to the end of /etc/profile

setterm -blank 0 -powersave off &> /dev/null

Disable X blanking and auto start chromium

Create a new file /home/tv/.xinitrc and add

#!/bin/bash
xset s noblank
xset s off -dpms

# open chrome in incognito mode with full screen at HD window size
exec /usr/bin/chromium --incognito --start-fullscreen --window-size=1920,1080 '$URL'

My experience is that you have to explicitly specify the window size with --window-size as otherwise it does not open to the monitor size.

Start X automatically for tv user

Add to the end of /home/tv/.profile

exec startx -- -nocursor

Shutdown technique

Press the power button. ACPI power shutdown sequence should begin automatically.

© Andy Gock 2009−2019