LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-20-2020, 10:39 AM   #1
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Rep: Reputation: Disabled
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?
 
Old 10-20-2020, 02:33 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Trent29 View Post
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.
 
Old 10-20-2020, 06:56 PM   #3
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-20-2020, 07:30 PM   #4
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Try running "which bleachbit" in a terminal. If that does not work then "ls /usr/bin/bleachbit" or "ls /usr/sbin/bleachbit" should give the result.

If it is in your path then you do not need to enter the full path to run it from the command line.
 
Old 10-20-2020, 07:39 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by Trent29 View Post
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.
 
Old 10-21-2020, 04:35 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.

But to answer your question:
  • go to /usr/share/applications
  • find the file labeled "Bleachbit (as root)".
  • open it in a plain text editor
  • find the command in the Exec= line
  • open a terminal and execute that command
  • show us the output
 
1 members found this post helpful.
Old 10-22-2020, 02:05 PM   #7
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Original Poster
Rep: Reputation: Disabled
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 View Post
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?

Also,in usr/share/applications/bleachbit-root.desktop, Exec=pkexec bleachbit
Code:
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#
 
Old 10-22-2020, 03:15 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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?
 
Old 10-22-2020, 04:07 PM   #9
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Original Poster
Rep: Reputation: Disabled
Why shouldn't I use Bleachbit as root?

Yes, it asked for a password.

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?
 
Old 10-22-2020, 11:46 PM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Trent29 View Post
Why shouldn't I use Bleachbit as root?

Yes, it asked for a password.

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.
 
Old 10-23-2020, 04:21 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.

Last edited by ondoho; 10-23-2020 at 04:23 AM.
 
Old 10-23-2020, 07:41 PM   #12
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-24-2020, 07:15 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Trent29 View Post
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).
 
Old 10-25-2020, 06:27 PM   #14
Trent29
Member
 
Registered: Dec 2018
Posts: 44

Original Poster
Rep: Reputation: Disabled
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] After having a successful installation of Debian Buster, Lenovo computer refuses to boot into Debian Buster 10.2 PicardDefendingData Debian 4 12-21-2019 07:51 PM
LXer: Debian 11 "Bullseye" and Debian 12 "Bookworm" Are Coming After Debian 10 "Buster" LXer Syndicated Linux News 0 04-18-2018 12:26 PM
bleachbit as root mike3644 Linux - Software 4 05-04-2016 01:19 AM
[SOLVED] bleachbit v bleachbit(as root) acein1 Linux - Newbie 3 02-22-2013 12:35 PM
adding mirror to yum.repo.d/<any-repo> ashwin_cse Fedora 1 03-10-2005 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration