Skip to content

System monitor : how to start

Matthieu Houdebine edited this page Feb 27, 2023 · 47 revisions

Operating systems supported : macOS, Windows, Linux (incl. Raspberry Pi) and all OS that support Python3

1. Install Python 3.x

Download and install the latest Python 3.x (min. 3.7) for your OS: https://www.python.org/downloads/

2. Download this project

You can download a specific release from the Releases sections
Click on a release then download "Source code" archive below.
If you want a more up-to-date version, you can clone the repository with Git.

3. Install Python modules

Install required Python modules for this project:
python3 -m pip install -r requirements.txt

4. Configure system monitor

Plug your smart screen to your computer (install the drivers on Windows if necessary)
Identify your smart screen model

Start the configuration wizard: run python3 configure.py, python.exe .\configure.py, py -3 configure.py ... depending on your OS
Select your theme, display model, network interfaces... then click Save settings

You can also edit the config.yaml manually in the root directory.

5. Start the program

  • From the configuration wizard, once you have configured the program, click on Save and run
  • In a terminal, run python3 main.py, python3.exe .\main.py, py -3 main.py ... depending on your OS

You should now see animated content on your smart screen!
If program is not working, test your screen first with python3 simple_program.py. If this works, your config.yaml / theme.yaml may contains errors.
If you find some issues, please search or report it here
While the program is running, a tray icon Icon is created in your tray / status bar / notification area depending on your OS.

6. Stop the program

To stop the program:

  • use the tray icon Icon right-click on it and select "Exit"
  • from the terminal: enter Ctrl+C to stop the program

Both ways will stop the program cleanly, by sending current frame to the screen before exit.

7. Run system monitor at startup

This step depends on your OS. You can find online documentation by searching "[your OS] run program at startup". Here is the procedure for popular OS:

a. Windows

Because the system monitor needs to be run as administrator on Windows, the only way to start it at boot is by creating a Scheduled Task.

  • From your search bar, search and open "Task Scheduler"
  • From the scheduler, select "Create Basic Task" from the right panel.
  • From the trigger page, select "When I log on".
  • From the action page, select "Start a program".
  • In the "program/script" field, browse and select the pythonw.exe program (note the 'w' in the name). It is usually located in C:\Users\YourUser\AppData\Local\Programs\Python\Python3XX\.
  • In the "Add arguments" field, enter main.py
  • In the "Start in" field, enter the complete path to the folder of this project e.g. C:\Users\You\Documents\turing-smart-screen-python\
  • In the "Finish" tab, select "Open the properties dialog for this task..."
  • In the Task Properties dialog on the General tab, select "Run with highest privileges"

You now have created the scheduled task that will start your project at logon.
Be sure to have configured the system monitor correctly in config.yaml.

To test the task, on the left panel of the Task Scheduler select "Task Scheduler Library" then find your task in the list. Right-click on it and select "Run".
Use the Task Scheduler interface to start/stop the program from the task (right-click then "Run" / "End").
The system monitor will run in background with pythonw.exe.
If you have any trouble, temporarily replace pythonw.exe by python.exe from the same folder. The system monitor will open a command window with logs.

b. Linux OS with systemd (Ubuntu, Debian...)

A systemd configuration file is provided for this project in the tools/ sub-folder.
Copy/move the turing-smart-screen folder to /opt/ (or to use another folder, edit the service file line starting with WorkingDirectory=)
Install the systemd service by copying the provided configuration file using the command below.

# Note: you may need to run these commands as root / with sudo
cp tools/turing-smart-screen-python.service /etc/systemd/system/
chmod +x /etc/systemd/system/turing-smart-screen-python.service

Enable, then start the new turing-smart-screen-python.service:

# Note: you may need to run these commands as root / with sudo
systemctl daemon-reload
systemctl enable turing-smart-screen-python.service
systemctl start turing-smart-screen-python.service

This service will now automatically run the python script on boot.

Clone this wiki locally