Jack477 / CommanderPi

Easy RaspberryPi4 GUI system managment
MIT License
188 stars 33 forks source link

Commander Pi won't start when using xrdp to remote in to Pi #7

Closed nikescar1 closed 4 years ago

nikescar1 commented 4 years ago
pi@raspberrypi:~/CommanderPi/src $ sudo python3 /home/pi/CommanderPi/src/main.py > a.txt
No protocol specified
No protocol specified
Traceback (most recent call last):
  File "/home/pi/CommanderPi/src/main.py", line 22, in <module>
    main()
  File "/home/pi/CommanderPi/src/main.py", line 18, in main
    start = g.Window()
  File "/home/pi/CommanderPi/src/gui.py", line 193, in __init__
    master = tk.Tk()
  File "/usr/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":10.0"

When remoting in and trying to run the program I get the above error. I solved it using THIS post.

Run sudo cp ~pi/.Xauthority ~root/ in the terminal. Then CommanderPi starts as expected.

Jack477 commented 4 years ago

Hmm, try with new version of CommanderPi

nikescar1 commented 4 years ago

It's not a problem with your program, it has to do with tkinter not finding the display because of some sort of X11 display permissions.

Also, I fixed the link in my original post. That should better explain the issue since I don't know much about linux or python libraries.

Jack477 commented 4 years ago

Ok so I close issue

ChaosBlades commented 4 years ago

Seems you have to run that command on every reboot. Very annoying.