Bug 7379 - Python needs DISPLAY environment var set b/4 tkinter works
Summary: Python needs DISPLAY environment var set b/4 tkinter works
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-11-27 20:57 UTC by ddmeyer
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-11-30 16:00:53 UTC

Attachments (Terms of Use)

Description ddmeyer 1999-11-27 20:57:53 UTC
When I attempt to do a simple Hello World type example of using python and
tkinter (from the "Learning Python" book), I get an abort due to "no
display name or DISPLAY environment varible not set".  Since there's
nothing in the Python book, or on any tkinter web page I could find, about
this DISPLAY variable, it seems that it should be a standard assignment of
some sort.  What is missing from my configuration?

To reproduce:

>>>  from tkinter import *
>>>  w = Button(text="Hello World!", command='exit')

Comment 1 Riley H Williams 1999-11-28 22:50:59 UTC
It's a variable that's set automatically if you're running in an xterm window,
and the usual reason for it not being set is that you're not running in an xterm
window. Are you?

Comment 2 Michael K. Johnson 1999-11-30 16:00:59 UTC
tkinter only runs under X.  If DISPLAY isn't set, it's because you
aren't running X.  Run X.  The manual explains how to do that.

Note You need to log in before you can comment on or make changes to this bug.