Set up a signage or kiosk machine with Debian 9 Linux

Tested on Debian 9.4.0

Initial installation

Install with debian-9.4.0-amd64-netinst.iso and perform graphical install, partition with MBR and single root partition filling the entire disk without any swap partition. You can use your own partitioning preference if you’d like here.

Choose minimal selections with no graphical desktop environment.

Create the default root user and a separate user tv.

Set up networking if desired, but we’ll assume here you’re using default settings on a network with a DHCP server automatically assigning IP addresses.

Install the following packages as root

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

Configure ssh (optional)

Create ssh key with ssh-keygen and set up the authorized_keys file. Configure /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 for better security. Using ssh makes it easier to update remotely. Just ssh into the machine remotely and run your typical apt-get update && apt-get -y dist-upgrade

Enable the service

systemctl enable ssh.service
systemctl start ssh.service

Configure auto login on tty1

Create a new dir:

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

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

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

Enable non-graphical console as the default runlevel with

systemctl set-default

Disable console blanking

This probably isn’t needed as we’ll be running X, but I like to add it anyway. Add the following to the end of /etc/profile

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

Disable X blanking

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

xset s noblank
xset s off -dpms
exec /usr/bin/chromium --kiosk --window-size=1920x1080 'https://YOURWEBSITE.COM/'

I’ve had to use the --window-size option as otherwise it would open with a incorrect window size which only took up half the monitor (not sure of the reason behind this)

Replace the URL with your desired URL to open. I prefer the following, but it allows user to press F11 and exit fullscreen mode, access web developer tools, and the print dialog. This might not be desirable in an actual real kiosk.

exec /usr/bin/chromium --incognito --start-fullscreen 'https://YOURWEBSITE.COM/'

Set up to start X automatically for tv user

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

exec startx -- -nocursor

The -nocursor hides the mouse pointer. Don’t use this if you want the mouse pointer to be visible.

Start up

Reboot the machine, on starting up, the machine should autologin with user tv and start X with chromium running, loading your desired URL. You should not be able to exist this shell.

You can open a separate login console at tty2 if you wish by pressing CTRL + ALT + F2.

Shutting down machines

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

How to remove old Linux kernel images from /boot

For RedHat based OS

e.g RHEL or CentOS

Install yum-utils

yum -y install yum-utils

Check current running kernel version

rpm -q kernel

Remove old kernels, but leave the 2 latest ones.

package-cleanup --oldkernels --count=2

Edit /etc/yum.conf and set:


This will delete old kernels automatically but leave the latest two next time you perform a yum update

For Debian based OS

e.g Ubuntu

apt-get -f autoremove

If that doesn’t work, you may need to manually remove files from /boot using rm. Then run update-grub after.

You can always check what kernel is currently loaded by running uname -a

Shutter Actuation Count using gPhoto2

This method can be used to obtain the shutter actuation count on the following cameras:

  • Canon 1D Mark II
  • Canon 50D
  • Canon 5D Mark II
  • Canon 5D Mark III
  • Canon 7D
  • Canon T2i

There may be a few other compatible cameras too. Let me know if you have confirmed another model which works using this method.

Jump to instructions for: Mac | Linux | Windows

Mac OS X

gPhoto2 can be installed using MacPorts or Homebrew. This is how to do it using MacPorts. You’ll need to be connected to the internet while you do this.

  1. Install XCode Developer Tools for your version of OS X from the Apple Developer web site. Skip this if you already have it installed.
  2. Visit the MacPorts web site and download the .pkg installer. Run the installer and follow the instructions and install it to your computer.
  3. Open the Terminal.
  4. Update macports if needed, by running the command sudo port -v selfupdate
  5. Install the gphoto2 package by running the command sudo port install gphoto2
  6. Test whether gphoto2 is properly installed by typing gphoto2 --version
  7. Connect your camera to the USB port, using a USB cable
  8. Wait a few seconds after connecting your camera, and type killall PTPCamera – every time you replug your camera to the computer, you’ll need to type this before using gphoto2. This is needed, to kill any running processes connected to the USB device.
  9. To check the number of actuations, on the attached camera, type gphoto2 --get-config /main/status/shuttercounter
  10. If your camera is compatible, the shutter actuation count will be displayed.


Install gPhoto2 using package manager of our distribution.

For Centos, RHEL and other distributions which use the yum package manager:

yum install gphoto2

For Debian, Ubuntu and other distributions which use the apt package manager:

apt-get install gphoto2

Some Linux distributions may not have gphoto2 as precompiled package in which case you’ll need to download and compile it from source.


Using a LiveCD

This is the simplest way for non tech heads. Download the live CD, I have created and write it to a CD or DVD. You can do this by right clicking on the ISO file in Windows Explorer and selecting “Burn disc image”.

Reboot your computer boot from the CD. To boot your computer from a CD, there is usually key you can press to change the boot device (e.g F12). This usually flashes up on the monitor when it boots up.

Alternatively, you can enter the BIOS settings and change the boot order, and set the CD/DVD drive as the first device.

Once you have rebooted, it should start up in Debian (on the live CD), and a command prompt will be shown along with a message.

live_cdPlug the camera into the computer using a USB cord, some messages may be displayed on scren as you do this. You can check whether the computer has detected the camera by typing dmesg.

To check shutter count, type shuttercounter, to read camera information, you can type camerainfo, this will display information such as the camera’s serial number. These commands shortcuts to the gphoto2 program. You can also run all other gphoto2 commands if needed. See the full features by typing man gphoto2.

Using a Virtual Machine

If you have experience using virtualisation software such as Virtualbox or VMWare Workstation, then another way is to install or use an existing virtual Linux installation of your choice. Install gphoto2 from inside the virtual machine.