Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 7379 - Python needs DISPLAY environment var set b/4 tkinter works
Python needs DISPLAY environment var set b/4 tkinter works
Product: Red Hat Linux
Classification: Retired
Component: python (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Michael K. Johnson
Depends On:
  Show dependency treegraph
Reported: 1999-11-27 15:57 EST by ddmeyer
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-11-30 11:00:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description ddmeyer 1999-11-27 15:57:53 EST
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 17:50:59 EST
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 11:00:59 EST
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.