BleachBit as root fails to launch after running as user (KDE)

Bug #1377719 reported by mike on 2014-10-05
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
BleachBit
High
Andrew Ziem
bleachbit (Ubuntu)
Undecided
Unassigned

Bug Description

If I run Bleachbit as user, and then try to run it as admin, it won't run (either from GUI or from Konsole). The output from Konsole is:

~$ kdesudo bleachbit
kdesudo(18196) KDESu::KDESuPrivate::KCookie::getXCookie: No X authentication info set for display ":0"

Bus: : open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
Could not open X display

Note (1): If I re-boot the PC, or if I do a Ctrl_Alt-Del, then Bleachbit will run as admin again; but if I run it as user, then I can not run it as admin again until/unless I re-boot or do a Ctrl-Alt_Del

Note (2): I do not have this problem in Kubuntu 12.04.

Note (3): Note the behavior indicated by this experiment:

I run Bleachbit as user: OK, no problem.
I try to run Bleachbit as admin: Failed: it would not open.
I rebooted the PC.
Then successfully ran Bleachbit as admin 3 times in a row.
Then ran Bleachbit as user: OK.
Then tried to run Bleachbit as admin: Failed: it would not open.

Then did Ctrl-Alt-Backspace.
Then ran Bleachbit as admin: OK, no problem.
Then ran Bleachbit again as admin: OK, no problem.
Then ran Bleachbit as user: OK.
Then ran Bleachbit as admin: Failed: it would not open.

(So, in particular, running Bleachbit as user BEFORE running it as admin, causes a failure to open as admin. Thus far, at least 3 members at kubuntuforums have noticed and reported this.)

System:
Kubuntu 14.04
Two Bleachbit versions exhibited this problem:
Bleachbit 1.4
Bleachbit an older version, 0.9.x? (Installed by Muon Package Manager)

Revision history for this message
mike (mikeq) wrote :

KDE version: 4.13.3
32-bit

Also, running Bleachbit as user from Konsole gives this message (prior to the GUI opening and clicking on Clean):

~$ bleachbit
info: starting BleachBit version 1.4
/usr/share/bleachbit/Unix.py:44: ImportWarning: Not importing directory '/usr/share/gnome': missing __init__.py
import gnome.vfs

(Then, of course, it does proceed to clean as user OK. The error message for admin has been posted above.)

Revision history for this message
mike (mikeq) wrote :

Testing ...

With this system:

Kubuntu 14.04
32-bit
KDE 4.13.3

the problem exists in Bleachbit versions: 1.1, 1.2, and 1.4.

Andrew Ziem (ahziem1) on 2014-10-06
Changed in bleachbit:
importance: Undecided → High
milestone: none → 1.8
Revision history for this message
vmc (vmclark) wrote :

I can only run bleachbit as root, only once . From then on it fails as above.

Andrew Ziem (ahziem1) on 2014-11-02
Changed in bleachbit:
milestone: 1.8 → 1.6
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Potential fix committed: 8aecd14

Changed in bleachbit:
assignee: nobody → Andrew Ziem (ahziem1)
status: New → In Progress
Andrew Ziem (ahziem1) on 2014-11-03
Changed in bleachbit:
status: In Progress → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :
Andrew Ziem (ahziem1) on 2014-11-07
Changed in bleachbit:
status: Fix Committed → Fix Released
Andrew Ziem (ahziem1) on 2014-11-07
summary: - Bleachbit as root fails to launch after running as user
+ BleachBit as root fails to launch after running as user (KDE)
tags: added: crash kde
Revision history for this message
mike (mikeq) wrote : More testing: note! Re: [Bug 1377719] Re: BleachBit as root fails to launch after running as user (KDE)

Hi Andrew. I did find something of note.

First, I re-ran your test, and had no problems (i.e., after running as
user, Bleachbit would run OK as admin, repeatedly, in fact). That test was:
1. Reboot Kubuntu
2. Start BleachBit as a normal use, but do not clean anything yet
3. Clean only "_System_ - Temporary Files" (If you do not want to
uncheck other boxes, please note you can right click on this option to
clean just the one option.)
4. Copy the list of files that were deleted, and save the list in a text
file.
5. Close BleachBit
6. Run "kdesudo bleachbit"
If #6 fails, would you please send me a list of files (step #4)?

And #6 did NOT fail -- it ran OK.

- - - - -
Then, I re-booted the PC
- - - - -

Then I did the 6-step test again, but this time the ONLY file I chose to
clean (as a normal user) was _*KDE*_-temporary files (I did not clean
any other files on this test run.)

It cleaned as follows (I'm no expert, but xauth does not look good!):

Delete 4.1kB /home/mike/.kde/tmp-mike-desktop14/xauth-1000-_0

Disk space recovered: 4.1kB
Files deleted: 1

Then, I closed Bleachbit and tried to run Bleachbit as admin, and it
failed to open, with this message:

No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning:
could not open display
   warnings.warn(str(e), _gtk.Warning)
Could not open X display

=> Thus, it looks like cleaning *KDE*-temporary files is causing the
problem?

--Mike

On 11/07/2014 04:01 PM, Andrew Ziem wrote:
> Hi Mike. Do you think rebooting Kubuntu (just once) helped resolve any
> issues caused by the older version? Do you agree the new version is
> fixed?
>

Andrew Ziem (ahziem1) on 2014-11-08
Changed in bleachbit:
status: Fix Released → In Progress
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Thank you. This needs to be whitelisted: ~.kde/tmp-mike-desktop14/xauth-1000-_0

I'm going to look into the best way to do that, and for now, you may want to avoid KDE - Temporary Files.

Revision history for this message
Andrew Ziem (ahziem1) wrote :

The same KDE Temporary files are also cleaned here in rekonq, so whatever solution should apply to both

https://github.com/az0/cleanerml/commit/be47522d805b3523a634e456ab5fc0817b515236#diff-bc0ce7a925ca0dc07f2b570deed90712R37

Revision history for this message
Andrew Ziem (ahziem1) wrote :

For BleachBit 1.6 I am adding a warning
https://github.com/az0/bleachbit/commit/9421f350d92b0f979ecc05ca95208b7354c1bbf5

BleachBit 1.6 also added a better KDE whitelist for /tmp, but the same whitelist is not as easy to add to the CleanerML files, so I plan a whitelist for BleachBit 1.8.

Changed in bleachbit:
milestone: 1.6 → 1.8
Andrew Ziem (ahziem1) on 2015-06-20
Changed in bleachbit:
milestone: 1.8 → 1.10
Andrew Ziem (ahziem1) on 2015-07-31
tags: added: linux
Revision history for this message
Andrew Ziem (ahziem1) wrote :
Changed in bleachbit:
status: In Progress → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Please test the fix in BleachBit 1.9.2 beta
http://bleachbit.sourceforge.net/news/bleachbit-192-beta

And please feel free to add a comment to this bug ticket whether the new release fixes the reported issue. If you notice new issues, please open a new bug ticket for each issue.

Changed in bleachbit:
status: Fix Committed → Fix Released
Revision history for this message
Tog (tony-hessler) wrote :

~$ kdesudo bleachbit
kdesudo(7851) KDESu::KDESuPrivate::KCookie::getXCookie: No X authentication info set for display ":0"

No protocol specified
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Could not open X display

BleachBit 1.12
Kubuntu 16.10

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bleachbit (Ubuntu):
status: New → Confirmed
affects: ubuntu → bleachbit (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers