Hello,
I have more or less the same problem as described here:
viewtopic.php?p=470818&hilit=%24DISPLAY#p470818
But I did not get the solution yet.
I have a Pi 3B with TFT display attached. Programmed a little Tkinter GUI and when I run the script from within the Pi, the GUI shows up on the TFT as expected. (echo $DISPLAY shows :0)
For more convenient programming I use VSCode on my Windows-PC with Remote-SSH Extension. The remote SSH connection with the Pi can be established w/o problems. A simple python script with terminal output (print("Hello world")) also works perfectly.
BUT... when starting the Tkinter GUI script from remote VSCode, no output appears on the TFT. Variable DISPLAY is empty
Of course I can manually do "export DISPLAY=:0". Then the GUI shows up.
Problem is, how to set DISPLAY permanently without loosing this setting every power ON/OFF?
I was searching for hours, but no hint did the job. I suppose this is a "SSH issue"?!
Since the same problem appears, when SSH'ing with putty. DISPLAY is first empty, but can be set to ":0" and everything works...
stemaka
I have more or less the same problem as described here:
viewtopic.php?p=470818&hilit=%24DISPLAY#p470818
But I did not get the solution yet.
I have a Pi 3B with TFT display attached. Programmed a little Tkinter GUI and when I run the script from within the Pi, the GUI shows up on the TFT as expected. (echo $DISPLAY shows :0)
For more convenient programming I use VSCode on my Windows-PC with Remote-SSH Extension. The remote SSH connection with the Pi can be established w/o problems. A simple python script with terminal output (print("Hello world")) also works perfectly.
BUT... when starting the Tkinter GUI script from remote VSCode, no output appears on the TFT. Variable DISPLAY is empty
Of course I can manually do "export DISPLAY=:0". Then the GUI shows up.
Problem is, how to set DISPLAY permanently without loosing this setting every power ON/OFF?
I was searching for hours, but no hint did the job. I suppose this is a "SSH issue"?!
Since the same problem appears, when SSH'ing with putty. DISPLAY is first empty, but can be set to ":0" and everything works...
stemaka
Statistics: Posted by stemaka — Fri Oct 18, 2024 1:32 pm