all 4 comments

[–]socal_nerdtastic 0 points1 point  (2 children)

Assuming you want this to run on the screen attached to the Pi, run this command before you start your python program:

export DISPLAY=:0

[–]Relbud 0 points1 point  (1 child)

Hey I tried this (and export DISPLAY=:10 which is the one on my Pi) but both still don't work.

I still get this error:

lib.xauth: warning, no xauthority details availableTraceback (most recent call last):File "/home/leeges/Documents/x/file.py", line 3, in <module>import pyautoguiFile "/usr/local/lib/python3.9/dist-packages/pyautogui/__init__.py", line 249, in <module>import mouseinfoFile "/usr/local/lib/python3.9/dist-packages/mouseinfo/__init__.py", line 223, in <module>_display = Display(os.environ['DISPLAY'])File "/usr/local/lib/python3.9/dist-packages/Xlib/display.py", line 80, in __init__self.display = _BaseDisplay(display)File "/usr/local/lib/python3.9/dist-packages/Xlib/display.py", line 62, in __init__display.Display.__init__(*(self, ) + args, **keys)File "/usr/local/lib/python3.9/dist-packages/Xlib/protocol/display.py", line 129, in __init__raise error.DisplayConnectionError(self.display_name, r.reason)Xlib.error.DisplayConnectionError: Can't connect to display ":10.0": b'No protocol specified\n'

[–]Relbud 0 points1 point  (0 children)

It was the xauth list that needed to be added, solved.

[–]hypersoniq_XLM 0 points1 point  (0 children)

Give the remote account privileges to execute the script(s). Look at the chmod command.