Raspberry Pi Tkinter via shh and xming Raspberry Pi Tkinter via shh and xming tkinter tkinter

Raspberry Pi Tkinter via shh and xming


  1. First of all be sure that the X forwarding is actived on your raspberry, you can check that in /etc/ssh/sshd_config: X11Forwarding yes
  2. ssh -X username@<raspberry> (-X flag for the X11 forwarding)
  3. Run your script : (su) python /path/to/script.py

Sometimes when you try to run program via sudo you can have some error, you need to check the permissions of .Xauthority file


I had a similar problem. I know this Question is 3 years old. But my search landed me here. So just answering the question

sudo cp ~pi/.Xauthority ~root/

This just copies the X11 authority file directly to root without the xauth command management. This will make all active user pi X11 connections available for use by root without having to sort through and find the correct one.

P.S : I'm just copy pasting, credit goes to this answer in this forum