'could not open display' error when import gtk - how fix?

S

seberino

Why can't I import gtk (pygtk) module? It appears gtk module want X
perms?

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line
37, in ? from _gtk import *
RuntimeError: could not open display
 
N

ngw

Why can't I import gtk (pygtk) module? It appears gtk module want X
perms?


Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line
37, in ? from _gtk import *
RuntimeError: could not open display

You have to run the pyshell under the right permissions. Are you
trying to import pygtk from the root/toor account ?

ngw
 
R

rainbow.cougar

Why can't I import gtk (pygtk) module? It appears gtk module want X
perms?


Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line
37, in ? from _gtk import *
RuntimeError: could not open display

An error like this usually happens when X security is on, or the
display name isn't known.

#before you run it, try (for csh):
setenv DISPLAY host:0.0
#where host is your computers name

#If that doesn't get it, do:
xhost +
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top