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.
- Set up a new user without admin rights
- Installation of xdotool
- Configuration of crontab
- Create the start script
- Add the script to the autostart
- Making sure the Computer does not restore an old session when it starts
- Configuration of the browser
- 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. 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
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.
00 19 * * * /sbin/shutdown -h -P now
This command automatically switches off the computer every day at 19:00.
Start the terminal again and open the crontab file again with the command “crontab -e”.
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.
cd
nano start.sh
Enter the following script in the editor:
#!/usr/bin/bash
xdotool mousemove 0 0
while [ “$?” -ne “0”]; do
sleep 5
echo “still waiting for network…”
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
- Open the “System – Settings” and go to “Startup and Shutdown”
- Select Autostart and click on “+ Add Application”
3. In the newly opened window, click on “Open File dialogue”. 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.
- Then enter the address of your slider under custom URLs.
To deactivate the session recovery mode, please do the following:
- Enter “about:config” in the address bar of the browser.
- 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.