Bleachbit from repo fails to run as root on Debian 10 Buster
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Bleachbit from repo fails to run as root on Debian 10 Buster
When I click on the "Bleachbit (as root)" icon, the password prompt appears, the password is entered and accepted, then that disappears and nothing happens.Incidentally, the non-root Bleachbit installation seems functional, since 'bleachbit', by itself does run bleachbit, but not with the ability to clear out files that require root permission, so that's not very helpful. Anyone know how to fix this so that I can run Bleachbit as root?
Also, in which folder would I be able to find the bleachbit executable?
When I click on the "Bleachbit (as root)" icon, the password prompt appears, the password is entered and accepted, then that disappears and nothing happens.Incidentally, the non-root Bleachbit installation seems functional, since 'bleachbit', by itself does run bleachbit, but not with the ability to clear out files that require root permission, so that's not very helpful. Anyone know how to fix this so that I can run Bleachbit as root?
Also, in which folder would I be able to find the bleachbit executable?
If you can run bleachbit as a regular user then running it from the cli using sudo should gain root permissions.
Thanks. Being that I'm still new to Linux, does anyone know the file path to find the bleachbit executable so that I can open in terminal and run it with sudo in the CLI as suggested?
So far I've just been running bleachbit using the shortcut icons in "Activities".
Last edited by Trent29; 10-20-2020 at 07:02 PM.
Reason: clarification
Thanks. Being that I'm still new to Linux, does anyone know the file path to find the bleachbit executable so that I can open in terminal and run it with sudo in the CLI as suggested?
So far I've just been running bleachbit using the shortcut icons in "Activities".
Curious: Which password are you entering? I had troubles with the (as root) selection until I figured out it wanted my (the user password) not the root password. When I gave the program (Not bleachbit, any program) the wrong password, it behaved as you described.
Um.
I would not use bleachbit at all, and I would definitely not give it root privileges.
The potential dangers are much larger than the potential benefits.
scasey, right now my root pw and user pw are one and the same. I know this is a no-no in real practice, but I'm trying to keep it simple right now as I learn.
Quote:
Originally Posted by ondoho
Um.
I would not use bleachbit at all, and I would definitely not give it root privileges.
The potential dangers are much larger than the potential benefits.
ondoho, could you explain further why you don't like bleachbit and what the potentil dangers of giving it root privileges are?
user@debian:~$ pkexec bleachbit
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
user@debian:~$ sudo pkexec bleachbit
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
user@debian:~$ sudo su
root@debian:/home/user# pkexec bleachbit
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
root@debian:/home/user#
Don't do this as root.
Did it not ask for a password?
Anyhow the message "could not open display" sounds clear and simple. Are you running a GUI at all?
Yes I'm running a GUI. The non-root Bleachbit GUI works fine. I access both the Bleachbit and Bleachbit (as root) icons by going to Activities and typing Bleachbit in the search box.
Why do you think it won't open the display?
Yes I'm running a GUI. The non-root Bleachbit GUI works fine. I access both the Bleachbit and Bleachbit (as root) icons by going to Activities and typing Bleachbit in the search box.
Why do you think it won't open the display?
There are 2 possible passwords it could ask for.
1. The superuser (root) password
2. Your users password so it can run as sudo.
Try one. If that fails try the second. If both fail then please do as asked by ondoho in his post yesterday.
The (as root) one fails because it did not get the proper password to allow it to run as root and it cannot suid to root without the proper permission.
Ignore the comment about not running as root. I would assume you know the risks of inadvertently wiping out a needed system file and bleachbit is designed to allow it to run as root so just be cautious.
Last edited by computersavvy; 10-22-2020 at 11:49 PM.
In post #6 I voiced my opinion about bleachbit in general. Sorry, could not resist.
In post #8, however, I specifically said: don't run "pkexec bleachbit" as root. It defeats the purpose of pkexec - which is to grant root privileges through polkit - and might have unforeseen consequences.
So, these are 2 different things. About the latter:
There's many reasons not to run a graphical application directly as root (as you did on the command line with pkexec): https://wiki.archlinux.org/index.php...ations_as_root
One of the potential detriments mentioned in the article could have something to do with the "could not open display" message you're seeing. It's difficult to say more if bleachbit doesn't log things. Or maybe it does?
You can try removing all bleachbit's config files (look in ~/.config, ~/.local/share and ~/.cache, then the same under /root) before trying again - not at a root prompt please, use pkexec!
PS: can you run anything with pkexec? Try e.g. gparted. Maybe the problem is with pkexec and not bleachbit.
computersavvy, right now my root pw and user pw are one and the same. I know this is a no-no in real practice, but I'm trying to keep it simple right now as I learn. And I did exactly as ondoho instructed and posted it above.
ondoho,I apologize but I don't know where to find those config files when you give a file location that begins with a ~
Regarding pkexec gparted:
Code:
user@debian:~$ pkexec gparted
Cannot run program gparted: No such file or directory
user@debian:~$
Can you suggest a different program to use pkexec with other than gparted?
Sorry for being such a newbie with this.
I have to admit you have me a bit scared at this point to run bleachbit as root and I'm starting to question why I even need to do it. I almost never log in as root, so if everywhere I've browsed, visited, connected to, folders and files I've clicked on within Debian etc. are under user, is there anything that would be in root that has browsing history or private info that I'd need to eradicate with bleachbit anyway?
I don't know where to find those config files when you give a file location that begins with a ~
that's equivalent to "$HOME". Try 'echo ~' or 'echo $HOME' in a terminal (without the '' quotes).
Quote:
I have to admit you have me a bit scared at this point to run bleachbit as root and I'm starting to question why I even need to do it. I almost never log in as root, so if everywhere I've browsed, visited, connected to, folders and files I've clicked on within Debian etc. are under user, is there anything that would be in root that has browsing history or private info that I'd need to eradicate with bleachbit anyway?
Erm, it's not "in root".
Root permissions are required to alter (in the case of bleachbit: remove I guess) things in so-called system directories, e.g. /usr/share, /etc etc.
Although it is perceivable that bleachbit would find something in the actual root directory "/" (not to be confused with the root user's home directory, "/root").
OK, here's the thing: is your hard drive full? Do you desperately need to free up even a few dozen MB of space? If not, then you don't need to run bleachbit as root. It won't make your machine faster.
The only useful thing I can see on their home page is to vacuum Firefox, that should speed it up. And doesn't require root privileges.
The "privacy" aspect seems tacked on to me and extremely overrated (unless you manually select which files to shred, but that can be done, well, manually, no need to install bleachbit).
ondoho, thank you for the tips. After poking around in some of the Bleachbit config files as you suggested, I've decided that I just don't want to push it and risk screwing up the whole OS. I'll be happy with Bleachbit being run as a regular user, so I guess this will remain unsolved unless there are any other brave souls out there who want to try to run it as root. As for me, I'm not going to make perfect the enemy of good enough!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.