Fedora 12: BleachBit will only run as root...

Forums: 

If I attempt to run BleachBit as a regular user, this is the result:

[steve@localhost ~]$ bleachbit
Traceback (most recent call last):
File "/usr/bin/bleachbit", line 41, in
import gtk
ImportError: No module named gtk
[steve@localhost ~]$

If I run as "root", then BleachBit starts and operates fine.

I am running Fedora 12 (fully updated) and I got BleachBit from Fedora's Yum repository:
bleachbit-0.6.4-1.fc12.noarch

As an experiment, I will try compiling and running from a source tarball, as well as SVN.

Steven P. Ulrick

That's odd.

Yes, do try a newer version. Version 0.6 is old, and SVN and source tarball (0.7.3) are currently the same. Also I do have RPM packages on this site ready for Fedora 12.

Also you may want to open a terminal, run 'python' and paste these commands

import pygtk
pygtk.require('2.0')
import gtk
import gobject

By the way, my main system where I develop BleachBit is Fedora 11.

---
Andrew, lead developer

Hello Again
Didn't know for sure if I was supposed to paste all four commands in at once, or just do one at a time.

Here is the result if I just run "python" in a terminal and then paste "import pygtk":
[steve@localhost ~]$ python
Python 2.6.1 (r261:67515, Jan 29 2010, 21:06:02)
[GCC 4.2.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pygtk
>>>

Here is the result if I run "python" and paste all four commands in:
[steve@localhost ~]$ python
Python 2.6.1 (r261:67515, Jan 29 2010, 21:06:02)
[GCC 4.2.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
pygtk.require('2.0')
import gtk
import gobjectTraceback (most recent call last):
File "", line 1, in
ImportError: No module named pygtk
>>> Traceback (most recent call last):
File "", line 1, in
NameError: name 'pygtk' is not defined
>>> Traceback (most recent call last):
File "", line 1, in
ImportError: No module named gtk
>>>

The outcome if I try all of that as root is as I expected: no errors.

I have to assume that something is wrong with my system. Either that, or the other person I read about that runs BleachBit on Fedora 12 is running it as root also :)

Ooops, almost forgot: I tried running BleachKit from SVN. The results were the same as I described in my initial message: it runs as root, but not if I run it as a regular user.

Steven P. Ulrick

What if you set SELinux to permissive mode?

---
Andrew, lead developer

SElinux has been set to "Disabled" since VERY shortly after my last installation of Fedora 12.

It seems PyGTK is broken. PyGTK is a library used by many applications. Do any other PyGTK apps work? Here is a list

http://www.pygtk.org/applications.html

You probably already have some of these (such as GNOME Screenshot Applet) installed.

---
Andrew, lead developer

I'll check that out when I get home from work. I have had either inconsistent behavior like this before, or I have issues with all applications that use PyGTK. Inquiring minds want to know... You say that you develop on a Fedora 11 box, right? Do you have this same problem?
If the version of PyGTK in Fedora Rawhide is not broken, I can try rebuilding the SRPM and see it that works. I could even try just using the SPEC file from the SRPM and use a non-broken version of PyGTK as the source... I have many options...

Steven

No, I haven't seen this on Fedora or elsewhere. If other PyGTK apps fail, then either your installation is corrupt or there is a bug in Fedora. My personal preference is to not mess with the base installation, so I would prefer getting the binary RPM from the Fedora repo rather than building it myself.

---
Andrew, lead developer

Here is a list of the pygtk2 RPM's that I have installed, along with the repo that I got them from:
pygtk2.x86_64 2.16.0-1.fc12 @anaconda-InstallationRepo-200911081904.x86_64
pygtk2-codegen.x86_64 2.16.0-1.fc12 @fedora
pygtk2-devel.i686 2.16.0-1.fc12 @fedora
pygtk2-devel.x86_64 2.16.0-1.fc12 @fedora
pygtk2-doc.noarch 2.16.0-1.fc12 @fedora
pygtk2-libglade.x86_64 2.16.0-1.fc12 @anaconda-InstallationRepo-200911081904.x86_64

So, I can't get the binary RPM(s) from Fedora, since I think I have them all...

Also, I tried running "listen" (a pygtk2 based app) as a regular user, and the error was as follows:
[steve@localhost ~]$ listen
Traceback (most recent call last):
File "listen", line 37, in
import gobject
ImportError: No module named gobject
[steve@localhost ~]$

As you've probably come to expect from my situation by now, "listen" ran perfectly as root...

So, I suppose I will now take this to the Fedora list.

Steven P. Ulrick

I took a known risk and rebuild the pygtk SRPM from Fedora Rawhide. Now BleachBit, Listen & Caffeine work as desired :) That's all well and good, but I still wonder: is the Fedora 11 version of pygtk NOT broken? You did say that you do not have the same problem that I do...

This comment leads me to believe that there is at least one person running Fedora 12 and BleachBit successfully:
http://bleachbit.sourceforge.net/forum/bleachbit-and-fedora-12#comment-65

Did he install a different version of pygtk like I ended up doing, or is there some other reason that it works for him? Really, I'm only curious...

Anyway, I have a successful workaround, and that will satisfy me for now :)

Thank you for your help,
Steven P. Ulrick

I have had a lot of problems with Python based applications before. Now I am pretty convinced that it is NOT the fault of the individual applications, but it is an issue with Fedora/pygtk. I just rebooted after a kernel update, and guess what? All of the applications that I said were working do not work anymore (as a regular user, of course.) They all fail with the same errors that they failed with before.

I am still running the pygtk RPM's recompiled from the Rawhide SRPM. Unless someone has a new idea, I think I won't bother with caffeine or bleachbit until I upgrade to Fedora 13. Again, I don't think it's a BleachBit problem, I think it is Fedora/pygtk.

Anyway, thanks again for your help,
Steven P. Ulrick