Bug 173827 - Fatal Python error: could not import _gtk when I try to run an x-window app that is exported to my display
Fatal Python error: could not import _gtk when I try to run an x-window app t...
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: system-config-users (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nils Philippsen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-21 13:28 EST by Edward K Sellitto
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-22 10:48:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Edward K Sellitto 2005-11-21 13:28:37 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
When I log into any of my RHEL servers and export my display I can't run 
programs like redhat-config-printer or system-config-users, etc... 
 
I get this error from an RHEL WS v3 server (Fatal Python error: could not 
import _gtk) 
I get this error from an RHEL AS v3 server (redhat-config-users requires a 
currently running X server) 
I get this error from an RHEL AS v4 server (system-config-users requires a 
currently running X server) 
 
My system is running RHEL AS v4 w/kernel 2.6.9-22 

Version-Release number of selected component (if applicable):
python-2.3.4-14.1 gtk2-2.4.13-18 pygtk2-2.4.0-1 

How reproducible:
Always

Steps to Reproduce:
1.log into remote server 
2. export DISPLAY to my machine 
3. run any x-windows app 
   

Actual Results:  I get this error from an RHEL WS v3 server (Fatal Python error: could not 
import _gtk) 
I get this error from an RHEL AS v3 server (redhat-config-users requires a 
currently running X server) 
I get this error from an RHEL AS v4 server (system-config-users requires a 
currently running X server) 

Expected Results:  The x-windows apps should display on my machine 

Additional info:
Comment 1 Nils Philippsen 2005-11-22 03:55:07 EST
Do any system-config-* programs run for you in a remote X setting? Have you
tried using these applications over SSH-forwarded X ("ssh -X <otherhost>
<command>")?
Comment 2 Edward K Sellitto 2005-11-22 08:00:45 EST
I'm getting errors running all system-config-* programs... for example... 
[root@stilts root]# echo $DISPLAY 
localhost:10.0 
[root@stilts root]# export DISPLAY=10.32.72.254:0 
[root@stilts root]# redhat-config-printer 
Fatal Python error: could not import _gtk 
Aborted 
 
[root@stilts root]# redhat-config-users 
redhat-config-users requires a currently running X server. 
 
[root@stilts root]# redhat-config-network 
ERROR: Unable to initialize graphical environment. Most likely cause of 
failure is that the tool was not run using a graphical environment. Please 
either start your graphical user interface or set your DISPLAY variable. 
 
[root@stilts root]# redhat-config-services 
Unable to initialize graphical environment. Most likely cause of failure 
is that the tool was not run using a graphical environment. Please either 
start your graphical user interface or set your DISPLAY variable. 
Caught exception: could not open display 
 
I connected to the server via ssh -X in the above case... 
 
Thanks - Ed 
 
Comment 3 Edward K Sellitto 2005-11-22 08:03:51 EST
One more note...this used to work fine on this system. Something I installed 
on my machine must have messed this up somehow. 
 
Thanks - Ed 
Comment 4 Nils Philippsen 2005-11-22 09:13:28 EST
Please try this again ("ssh -X") without setting the DISPLAY variable, X
connections should be forwarded through an SSH tunnel then (would have been
forwarded via the "localhost:10.0" DISPLAY above hadn't you set the DISPLAY
variable to the remote value).
Comment 5 Edward K Sellitto 2005-11-22 10:29:50 EST
WOW...the ssh -X solution worked fine. Up until now I've always just telent'd 
into the server and exported my display... 
 
Is there a simple explanation for why I can't do that any longer? 
 
In any case thanks for the help - Ed 
Comment 6 Nils Philippsen 2005-11-22 10:48:18 EST
I suspect some X authentication issues, perhaps X is running with "-nolisten
tcp" on your local host. Hard to tell from here ;-).

Closing as this is not a s-c-users bug.

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