Skip to content

System monitor : how to start

Matthieu Houdebine edited this page Jun 23, 2024 · 47 revisions

Operating systems supported : macOS, Windows, Linux (incl. Raspberry Pi) and all OS that support Python3
Note: If you have a Raspberry Pi 0/1/2/3 you may need to follow this procedure to avoid your screen being too slow.

If you encounter any issue following this procedure, check the Troubleshooting page. Most common issues are listed here.

1. Install Python 3.x and Git

Download and install Python 3.x for your OS: https://www.python.org/downloads/
For Linux OS, you also need to install the Python Tk library: see here

Git is a software used to download open-source projects from public repositories. It will be used here to download some Python dependencies like this fork of GPUtil that I'm maintaining because its author has stopped supporting it.

  • Linux platforms: install git package from your Package Manager (apt, pacman...)
  • Windows platforms: download Git software from here and install it with default options.
  • MacOS platforms: follow instructions here

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 dependencies

NOTE: it is recommended to create and use a Python virtual environment for this project because it needs specific versions of its dependencies. Install required Python modules for this project:
python3 -m pip install -r requirements.txt / python.exe -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
Note: on Windows, run the wizard as administrator for best results (i.e. in a terminal run as admin.). If you don't have admin rights on your machine, just run it and follow instructions in red from the GUI.

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

Note: if you are on Windows and selected "Automatic" or "LibreHardwareMonitor" as Hardware Monitoring during configuration, then you need to start the program as administrator (i.e. in a terminal run as admin.). If you don't have admin rights on your computer, run the configuration wizard again and follow the instructions in red.

You should now see animated content on your smart screen!
If program is not working, check the log.log file content, and the Troubleshooting page. 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). To know where this program is located on your computer, run where pythonw.exefro a command-line.
  • In the "Add arguments" field, just type 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 or the program does not start at boot, check the log.log file in the program folder and the Troubleshooting page.

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

A systemd configuration file is provided for this project in the tools/ sub-folder.

First, copy/move the turing-smart-screen folder to /opt/ (or to use another folder, update tools/turing-smart-screen-python.service with your new WorkingDirectory=)

Note: if the turing-smart-screen folder is in your home directory, you need to edit tools/turing-smart-screen-python.service and remove the line ProtectHome=read-only otherwise you will have errors like OSError: [Errno 30] Read-only file system

Edit the systemd service file in tools/turing-smart-screen-python.service and replace User=YOUR_USERNAME_HERE

Install the systemd service by copying the configuration file using the command below.

# Note: you may need to run this command as root / with sudo
cp tools/turing-smart-screen-python.service /etc/systemd/system/

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. If you have any trouble or the program does not start at boot, check the log.log file in the program folder and the Troubleshooting page.