Hello,
I have a Python 2.7 script that works fine when starting it from a terminal. The script creates a GUI using PySide. I want the script to run automatically at every bootup, so I created a systemd service. The service creation itself works satisfactory when used with simple test scripts, but not with the script containing the GUI. The line of code that the script chokes on when started by the systemd service is:
app = QtGui.QApplication(sys.argv)
Thinking that the sys.argv may be an issue when not started in a terminal, I modified this line to:
app = QtGui.QApplication([r'/home/pi/Desktop/myScript.py'])
This still works starting from a terminal, but again, not when started as a service. Any ideas on how to get this to work? Thanks.