Tkinter problem: TclError> couldn't connect to display ":0

gemjack.pb at gmail.com gemjack.pb at gmail.com
Thu Feb 4 09:47:22 EST 2016


On Sunday, 29 December 2013 20:20:00 UTC, Michael Matveev  wrote:
> Hi,
> I use live Debian on VM and trying to compile this code.
> 
> 
> import Tkinter
>  
> root = Tkinter.Tk()
>  
> root.title("Fenster 1")
> root.geometry("100x100")
>  
> root.mainloop()
> 
> 
> The shell gives out that kind of message:
> 
> File "test.py", line 5, in <module>
> root = Tkinter.Tk()
> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
> self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
> _tkinter.TclError: couldn't connect to display ":0"
> 
> 
> 
> thanks for helping out.
> 
> greets.
> Mike

This fixed my problem with thkinter.....   sudo cp ~/.Xauthority ~root/


More information about the Python-list mailing list