Someone gave me this old turing smart screen 3.5 mini display which can use as a system monitor to display hardware information like CPU,RAM,Network’s upload and download, GPU, Disk space etc. Initially I thought this will only works on Windows machine, so I immediately open my browser to see if it does work on Linux, and fortunately there’s an unofficial way using python. The project can be found in github.
https://github.com/mathoudebine/turing-smart-screen-python
Here are the steps on installing this on Ubuntu Linux. (Although there are some hiccups along the process, but I provided some fix that may work on you also)
- Download the zip file
2. Unzip the file on your desired folder
unzip turing-smart-screen-python-main.zip
3. Install python3 and dependencies
Note: Some programs that you needed here is of course python3 and pip
sudo apt install python3
sudo apt install python3-tk
sudo apt install pip
If you did not install the dependencies, you will encounter message like this:
hendrix@freelinux:~/Downloads/turing-smart-screen-python-main$ python3 configure.py
[ERROR] Python dependencies not installed. Please follow start guide: https://github.com/mathoudebine/turing-smart-screen-python/wiki/System-monitor-:-how-to-start
Install dependencies:
python3 -m pip install -r requirements.txt
Sample Output:
hendrix@freelinux:~/Downloads/turing-smart-screen-python-main$ python3 -m pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Ignoring pyadl: markers ‘sys_platform == “win32″‘ don’t match your environment
Ignoring pythonnet: markers ‘sys_platform == “win32″‘ don’t match your environment
Ignoring pywin32: markers ‘sys_platform == “win32″‘ don’t match your environment
Collecting Pillow~=9.5.0
Downloading Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 2.4 MB/s eta 0:00:00
Collecting pyserial~=3.5
Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.6/90.6 KB 4.5 MB/s eta 0:00:00
Collecting PyYAML~=6.0
Downloading PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 682.2/682.2 KB 5.7 MB/s eta 0:00:00
Successfully installed Cython-0.29.36 GPUtil-1.4.0 Pillow-9.5.0 PyYAML-6.0 babel-2.12.1 psutil-5.9.5 pyamdgpuinfo-2.1.4 pyserial-3.5 pystray-0.19.4 python-xlib-0.33 ruamel.yaml-0.17.32 ruamel.yaml.clib-0.2.7 sv-ttk-2.5.3
4. Configure system monitor
python3 configure.py
You will see something like this:
5. Run the main program
python3 main.py
During installation, I encountered Permission denied error on dev/ttyACM0
hendrix@freelinux:~/Downloads/turing-smart-screen-python-main$ python3 main.py
16/07/2023 11:45:48 [INFO] Loading theme LandscapeMagicBlue from res/themes/LandscapeMagicBlue/theme.yaml
16/07/2023 11:45:49 [DEBUG] Auto detected COM port: /dev/ttyACM0
16/07/2023 11:45:49 [ERROR] Cannot open COM port /dev/ttyACM0: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: ‘/dev/ttyACM0’
Here’s the fix: (posted by a user on Stack Overlow) https://stackoverflow.com/questions/27858041/oserror-errno-13-permission-denied-dev-ttyacm0-using-pyserial-from-pyth
a. Change the permission of the file to have read and write privileges
sudo chmod 666 /dev/ttyACM0
b. Create a rule in /etc/udev/rules.d that will set the permissions of the device
sudo vi /etc/udev/rules.d/turing-rules
Add the following line and save:
KERNEL==”ttyACM0″, MODE=”0666″
c. Reboot the machine
shutdown -r now
After reboot, start the program again, here’s a sample output without any permission errors now
hendrix@freelinux:~/Downloads/turing-smart-screen-python-main$ python3 main.py
16/07/2023 11:53:09 [INFO] Loading theme LandscapeMagicBlue from res/themes/LandscapeMagicBlue/theme.yaml
16/07/2023 11:53:12 [DEBUG] Auto detected COM port: /dev/ttyACM0
16/07/2023 11:53:13 [DEBUG] Using Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
16/07/2023 11:53:13 [INFO] Tray icon has been displayed
16/07/2023 11:53:13 [INFO] Display reset (COM port may change)…
16/07/2023 11:53:18 [DEBUG] Static COM port: /dev/ttyACM0
16/07/2023 11:53:18 [DEBUG] Drawing Image: BACKGROUND
16/07/2023 11:53:19 [DEBUG] Drawing Text: DISK_LABEL
16/07/2023 11:53:19 [DEBUG] Drawing Text: DISK_USED_LABEL
6. Run the program on startup
a. Copy the turing-smart-screen-python.service (located under the tools folder) to /etc/systemd/system/
sudo cp tools/turing-smart-screen-python.service /etc/systemd/system/
b. Make the file as executable
sudo chmod +x /etc/systemd/system/turing-smart-screen-python.service
c. Run the following commands to enable and start via systemctl
sudo systemctl daemon-reload
sudo systemctl enable turing-smart-screen-python.service
sudo systemctl start turing-smart-screen-python.service
Sample output:
hendrix@freelinux:~/turing-smart-screen-python-main$ sudo systemctl daemon-reload
hendrix@freelinux:~/turing-smart-screen-python-main$ sudo systemctl enable turing-smart-screen-python.service
Created symlink /etc/systemd/system/multi-user.target.wants/turing-smart-screen-python.service → /etc/systemd/system/turing-smart-screen-python.service.
hendrix@freelinux:~/turing-smart-screen-python-main$ sudo systemctl start turing-smart-screen-python.service
Now you can try to reboot again the machine and it should run automatically on startup