BleachBit GUI will not open in Centos 7.4

Forums: 

Hi!

I installed successfully BleachBit on my VPS server but when running the command line 'bleachbit' it will not open the GUI (could not open display). Please, check the error in lines 40, 64 and 52 below. Any advice to solve this issue is welcome!

Rgs

IM


libXrandr.x86_64 0:1.5.1-2.el7
pycairo.x86_64 0:1.8.10-8.el7
pygobject2.x86_64 0:2.28.6-11.el7
pygtk2.x86_64 0:2.24.0-9.el7

Complete!
[root@server ~]# bleachbit
Traceback (most recent call last):
File "/usr/bin/bleachbit", line 40, in
import gtk
File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 64, in
_init()
File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
_gtk.init_check()
RuntimeError: could not open display
[root@server ~]#

BleachBit version: 
1.12Centos
Your operating system: 
Apache 2.4.29 with Centos 7.4

Two questions

1. Can you run any X (graphical) applications?

2. Can you run any GTK+ versions 2 applications?

---
Andrew, lead developer

Hi Andrew,

I see now that my server has not GTK installed. Which one suits best for Bleachbit, GTK+2.24 or the last version GTK+ 3.22?

Rgs

IM

BleachBit 2.0 requires GTK+ version 2, so 2.24 is best

---
Andrew, lead developer

Thank you. It will not work.

Here are the steps:

1. Installed python
yum install pygtk2 python-simplejson
2. Installed GTK+ 2
yum groupinstall "Development Tools"
yum install gtk+-devel gtk2-devel
3. Installed BleachBit

The server informed at each step above that the installs were completed successfully.

However, when I try to run Bleachbit it will result in error.

On checking which GTK version I had installed, it tells me there is no install.

Any advice is welcome.

Rgs

IM

systemtap-client.x86_64 0:3.1-5.el7_4
systemtap-devel.x86_64 0:3.1-5.el7_4
systemtap-runtime.x86_64 0:3.1-5.el7_4
trousers.x86_64 0:0.3.14-2.el7

Complete!
[root@server ~]# bleachbit
Traceback (most recent call last):
File "/usr/bin/bleachbit", line 40, in
import gtk
File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 64, in
_init()
File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
_gtk.init_check()
RuntimeError: could not open display

[root@server ~]# pkg-config --modversion gtk+-2.0
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
[root@server ~]#

Yes, it seems like GTK+ is correctly installed.

You mentioned this is a VPS server, so the next question is whether any graphical interfaces work. Here are some examples of applications to test this. I picked a few such that at least one is probably installed on your system. Do any one of these work?

oclock
xeyes
xterm
xclock
xman
gedit

If these do not run, then you need to either set up your X system or run BleachBit in command line mode.

I assume you are connecting to the VPS over SSH, so you will need to set up X forwarding. There are guides online on how to do this.

By the way, BleachBit version 2.0 is out. It won't fix this problem, but it is good to upgrade for the other benefits.

---
Andrew, lead developer