I have a shell script that gets updates from github and then runs the code that it retrieved. it is located at /home/me/Desktop/refreshCode.sh
-- refreshCode.sh -- #!/bin/bash cd /home/me/src/ProductionMonitor sudo /usr/bin git -C /home/me/src/ProductionMonitor pull sudo cp /home/me/src/ProductionMonitor/* /home/me/Desktop/Production cd /home/me/Desktop/Production sudo /usr/bin/python3 prodmain.py >> logfile.data
I know that the shell can launch and runs as expected manually. It opens up the tkinter window and I can interact with the screen.
However I cannot seem to get anything to launch correctly.
I have tried setting up a crontab for @reboot and was not successful. It never showed the ui
I set up a Systemd service as such.
-- prodmon.service -- [Unit] Description=Service to run production monitor After=multi-user.target [Service] Type=forking ExecStart=/home/me/Desktop/refreshCode.sh User=caleb Group=caleb WorkingDirectory=/home/me/Desktop/Production/ PIDFile=/var/run/prodmon.pid [Install] WantedBy=multi-user.target
Checking the status of the service after boot, it says that it is running. however the tkinter UI never shows up.