LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Tcl Error no display name and no DISPLAY environment variable (http://www.linuxquestions.org/questions/programming-9/tcl-error-no-display-name-and-no-display-environment-variable-340184/)

thinkgeek 07-05-2005 08:58 AM

Tcl Error no display name and no DISPLAY environment variable
 
I am getting the error: Tcl Error no display name and no DISPLAY environment variable,
when I am running python tkinter scripts on my system.

Can anyone explain and help?

asgeirss 07-06-2005 01:22 AM

Hi,

The DISPLAY is indeed an environment variable, you can reference it firstly from a shell (like BASH or CSH) and also from tcl scripts.

type "env" in a shell and you can see the environment variables defined in your login environment.

type "echo $DISPLAY" in a shell to see the current value of the variable. Chances are it is empty.

If you set it to ":0" then it should just use the display of your machine. Otherwise you can attempt to pipe the screen output to another machine by "machineip:0" that will only work if they have permitted the connection.

Hopefully that is the only problem you need to fix.

bigearsbilly 07-06-2005 08:15 AM

Are you running in X windows?
Your DISPLAY should normally be set if you're running
X.

thinkgeek 07-06-2005 08:36 AM

My scripts are running at login and my default runlevel is 3.
Then I am issuing command 'startx' to start X. But when it is
entering the X then the script is showing error.

bigearsbilly 07-06-2005 08:38 AM

Well, you can't run the scripts before X has started if
it is looking for an X session.

What are the scripts for?

thinkgeek 07-06-2005 11:24 PM

this are python tkinter GUI scripts.


All times are GMT -5. The time now is 10:14 AM.