root cant use display????
Hi!, I'm trying to run a python application (which uses Tkinter), and even when it has no problem running with my user, when I run it as root, it says something like:
_tkinter.TclError: no display name and no $DISPLAY environment variable And if I do: export DISPLAY=:0.0 it says: _tkinter.TclError: this isn't a Tk applicationcouldn't connect to display ":0.0" Any idea what could be the problem??? Thanks in advance!!! Haora |
Try doing "xhost +" as a normal user, then run your app as root.
|
It works!!!
Great!, now, how do I make that change permanent??? |
I added this line to the .bashrc file of my root user:
export DISPLAY=:0.0 And now every time I log in as root, I can use my graphic programs, but (there's allways a but....), the cron jobs still don't work... I have some jobs that require graphic programs (made in python with Tkinter) to be loaded, but every time cron tryes to run those programs the same thing happens: _tkinter.TclError: no display name and no $DISPLAY environment variable Any idea as to what else can I do??? Thanks! |
All times are GMT -5. The time now is 03:20 PM. |