LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2005, 08:29 AM   #1
haora
Member
 
Registered: Mar 2005
Distribution: SuSE 9.1, Ubuntu 5.10
Posts: 69

Rep: Reputation: 15
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
 
Old 06-27-2005, 08:32 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Try doing "xhost +" as a normal user, then run your app as root.
 
Old 06-27-2005, 08:36 AM   #3
haora
Member
 
Registered: Mar 2005
Distribution: SuSE 9.1, Ubuntu 5.10
Posts: 69

Original Poster
Rep: Reputation: 15
It works!!!

Great!, now, how do I make that change permanent???
 
Old 07-05-2005, 07:45 AM   #4
haora
Member
 
Registered: Mar 2005
Distribution: SuSE 9.1, Ubuntu 5.10
Posts: 69

Original Poster
Rep: Reputation: 15
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot open display as root tethysgods Linux - Software 14 12-10-2010 03:16 PM
root not able to use display?? browny_amiga Linux - Security 5 06-17-2005 03:01 AM
only root can open the display for mplayer shobhit Linux - Software 5 06-16-2005 03:34 PM
Can't open display as root dicou Linux - Newbie 7 04-18-2005 02:25 PM
root cannot open display m_yates Linux - Software 7 03-14-2004 10:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration