In these instructions, we assume that you already have Linux installed on a computer. For this guide we are using Kubuntu 23.10.
To configure a computer for use with the announcement system, you must take the following steps.

  1. Set up a new user without admin rights
  2. Installation of xdotool
  3. Configuration of crontab
  4. Create the start script
  5. Add the script to the autostart
  6. Making sure the Computer does not restore an old session when it starts
  7. Configuration of the browser
  8. Configuring the automatic wake-up of the PC

Setup a new user without admin rights

To avoid having to constantly use the administrator account during continuous operation, we recommend creating another user on the system (e.g. User)

To create a new user, please follow these instructions.

To set up the system so that the user logs on automatically when the computer is started, please follow these instructions.

Installation of xdotool

When the system is started, the mouse is automatically positioned in the centre of the monitor. This is of course not good for the announcement system. That’s why we use the xdotool programme to move the mouse with a script.

To install xdotool, please follow the steps below:

1. make sure that you are logged in as the administrator

2. open the terminal

3. enter the command “sudo apt-get install xdotool”

4. answer the questions of the installation programme with Yes

Configuration of crontab

Crontab is a file in which time-controlled commands can be executed. Each user on the system has their own crontab file.

To specify when the announcement system should be switched off, please enter the command “crontab -e” in the terminal as administrator.

Then add the following line to the file:

00 19 * * * /sbin/shutdown -h -P now

This command automatically switches off the computer every day at 19:00. If you would like to switch off the system every day at 17:30, the command would look like this:

30 17 * * * /sbin/shutdown h P now

Please save the file and switch to your User account. Start the terminal again and open the crontab file again with the command “crontab -e”. Then add the following two lines to the file and save them.

*/2 * * * * * DISPLAY=:0 xdotool mousemove 0 1

*/4 * * * * * DISPLAY=:0 xdotool mousemove 0 0

These commands move the cursor by one pixel every two minutes. This is to prevent the monitor from automatically switching to energy-saving mode.

Create the start script

You must be logged in as an administrator for these steps.

Please enter the following commands in the terminal:

cd

nano start.sh

Enter the following script in the editor:

#!/usr/bin/bash
xdotool mousemove 0 0
ping 8.8.8.8 c2
while [ “$?” -ne “0”]; do
     sleep 5
     echo “still waiting for network…”
     ping 8.8.8.8 c2
done
firefox kiosk

 

Please save the file and exit the editor.

Enter the following command to configure the access rights to the file correctly: “chmod 777 start.sh”

This script should be executed after every start of the computer. First move the cursor to the edge of the monitor. Then it checks whether the computer is already successfully logged into the network. If this is the case, it starts Firefox in cinema mode.

Add the script to the autostart

  1. Open the “System – Settings” and go to “Startup and Shutdown”
  2. Select Autostart and click on “+ Add Application”

3. In the newly opened window, click on “Open File dialogue”. A new window opens. Here you select the start.sh file that we created earlier. It should be located under /homh/[your user name]/start.sh.

4. Once you have selected the file, open the “Terminal options” drop-down menu and tick the “Run in terminal” box.

5. Click on Ok.

Making sure the Computer does not restore an old session when it starts

Still in the “System Settings”, go back to the “Startup and Shutdown” area. This time, select the “Desktop Sessions” subsection. Please set the radio button there to “Start with empty session” and click on Apply.

Configuration of the browser

Two things must be configured in the Firefox browser. The URL of the desired slider must be opened by default when the browser is started and it must be ensured that the browser does not restore old sessions. To do this, please do the following:

  1. Open the settings
  2. Go to home > homepage and new windows
  3. Then enter the address of your slider under custom URLs.

To deactivate the session recovery mode, please do the following:

  1. Enter “about:config” in the address bar of the browser.
  2. Search for the item “browser.sessionstore.resume_from_crash” and set the value to “false”

Configuring the automatic wake-up of the PC

The exact procedure for configuring the wake-up time of your computer varies greatly from one computer to another. Basically, you must enter the bios when starting the computer. There is usually a “Power management” item there. There you can set the desired wake-up time at which the computer should start. In general, you can also specify certain days of the week on which the computer should start. For example, Monday to Friday if you do not want the announcement system to run at weekends.