Nov-11-2020, 09:59 AM
I have a python program and executed (python3 myprogram1.py) from the terminal in the RPI4B works perfectly.
I wanted to run on RPI4B without the keyboard and mouse and not want use an VNC.
But when I use a terminal from windows 10 on my pc with SSH remote and tried to run my program, it said:
I wanted to run on RPI4B without the keyboard and mouse and not want use an VNC.
But when I use a terminal from windows 10 on my pc with SSH remote and tried to run my program, it said:
Output:pi@raspberrypi:~/python $ python3 myprogram1.py
Traceback (most recent call last):
File "myprogram1.py", line 12, in <module>
from pynput.mouse import Controller
File "/home/pi/.local/lib/python3.7/site-packages/pynput/__init__.py", line 40, in <module>
from . import keyboard
File "/home/pi/.local/lib/python3.7/site-packages/pynput/keyboard/__init__.py", line 31, in <module>
backend = backend(__name__)
File "/home/pi/.local/lib/python3.7/site-packages/pynput/_util/__init__.py", line 82, in backend
if resolutions else '')
ImportError: this platform is not supported: ('failed to acquire X connection: Bad display name ""', DisplayNameError(''))
Try one of the following resolutions:
* Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly
I think I must something missing with the command line?