I have a RaspberryPi with a PiTFT 3.5 display connected. The display is configured to mirror the HDMI output and the Pi is running Raspbian desktop.
Now what I am trying to do is to run a python program on the desktop but start it over the ssh connection. The problem is that when I just run my python script over the terminal as such:
sudo python3 /usr/local/project/main.py
it gives the following error:
_tkinter.TclError: no display name and no $DISPLAY environment variable
So is there a way of starting the python program on the desktop through ssh or maybe passing the display variable to Tkinter so that the program displays on my PiTFT screen.