LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-05-2005, 08:58 AM   #1
thinkgeek
LQ Newbie
 
Registered: Jun 2005
Posts: 15

Rep: Reputation: 0
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?
 
Old 07-06-2005, 01:22 AM   #2
asgeirss
Member
 
Registered: Aug 2003
Location: Vancouver, Canada
Distribution: RH, SL
Posts: 37

Rep: Reputation: 15
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.
 
Old 07-06-2005, 08:15 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,314

Rep: Reputation: 175Reputation: 175
Are you running in X windows?
Your DISPLAY should normally be set if you're running
X.
 
Old 07-06-2005, 08:36 AM   #4
thinkgeek
LQ Newbie
 
Registered: Jun 2005
Posts: 15

Original Poster
Rep: Reputation: 0
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.
 
Old 07-06-2005, 08:38 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,314

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

What are the scripts for?
 
Old 07-06-2005, 11:24 PM   #6
thinkgeek
LQ Newbie
 
Registered: Jun 2005
Posts: 15

Original Poster
Rep: Reputation: 0
this are python tkinter GUI scripts.
 
  


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
Problem withChanging DISPLAY environment variable to display on someone else's screen wantsri Linux - Networking 1 10-25-2005 12:14 PM
Modifying DISPLAY environment variable on-the-fly ktulu1115 Linux - Software 1 10-07-2005 03:18 PM
setting environment variable DISPLAY jpan Debian 4 10-15-2004 07:09 PM
Environment Variable: how to change env DISPLAY in Redhat 9 lucastic Linux - General 2 07-21-2004 05:15 PM
DISPLAY environment variable danahata Slackware 2 02-26-2004 04:30 PM


All times are GMT -5. The time now is 11:34 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration