Python Forum
Start my program in RPI4B from SSH and Failed
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Start my program in RPI4B from SSH and Failed
#1
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:
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?
Reply


Messages In This Thread
Start my program in RPI4B from SSH and Failed - by ATARI_LIVE - Nov-11-2020, 09:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to start the program from the beginning. iamaghost 5 2,959 Feb-23-2021, 03:40 AM
Last Post: deanhystad
  program will not run, errno 11001: getaddrinfo failed idioticWixen 2 3,125 Feb-29-2020, 03:14 AM
Last Post: idioticWixen
  Problem: Once I cancel the process my program will start working! Hadad 0 1,660 Jul-24-2019, 04:09 PM
Last Post: Hadad
  How can I start a python program out of a python program? peer 3 2,322 Oct-30-2018, 05:07 PM
Last Post: Larz60+
  What's the difference b/w assigning start=None and start=" " Madara 1 2,327 Aug-06-2018, 08:23 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020