Announcement

Collapse
No announcement yet.

Bleachbit as root fails to launch

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by Qqmike View Post
    obviously, Kate did not open
    Ah ha!

    So I'm fairly certain that the problem isn't
    --> Bleachbit won't run as root after it runs as normal user
    but instead the problem is
    --> Running Bleachbit (as a normal user) creates a situation in which subsequent attempts to run any graphical program with elevated rights will fail
    See the difference?

    What's the output of sudo ls -al /root?

    Comment


      #47
      Yes, I see this now.

      Code:
      sudo ls -al /root
      [sudo] password for mike: 
      total 32
      drwx------  6 root root 4096 Oct  1 11:33 .
      drwxr-xr-x 22 root root 4096 Oct  9 08:28 ..
      -rw-r--r--  1 root root 3106 Feb 19  2014 .bashrc
      drwxr-xr-x  3 root root 4096 Oct  1 16:59 .config
      drwx------  3 root root 4096 Oct  1 11:17 .dbus
      drwxr-----  2 root root 4096 Oct  7 09:50 .hplip
      drwxr-xr-x  3 root root 4096 Oct  1 11:17 .kde
      -rw-r--r--  1 root root  140 Feb 19  2014 .profile
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #48
        Crap. No /root/.Xauthority ... one theory thwarted.

        1. Restart X (or reboot).

        2. Open a Kate window (for subsequent pasting of stuff).

        3. Run xauth list and paste the output into the opened Kate window.

        4. Do a normal user Bleachbit run (to recreate the broken condition).

        5. Run xauth list again and paste the output into the opened Kate window. Is it the same as the previous time?

        6. Try kdesudo kcalc -- it should fail similarly.

        7. Run xauth -b

        8. Try kdesudo kcalc -- what happens now? Same error and failure, or does the calculator run?

        Comment


          #49
          1. Restart X (or reboot).
          Ctrl-Alt-Del

          2. Open a Kate window (for subsequent pasting of stuff).

          3. Run xauth list and paste the output into the opened Kate window.
          ~$ xauth list
          mike-desktop14/unix:0 MIT-MAGIC-COOKIE-1 -looks like a UUID here, 32 digits-

          4. Do a normal user Bleachbit run (to recreate the broken condition). --OK

          5. Run xauth list again and paste the output into the opened Kate window. Is it the same as the previous time?
          No, it is different:
          ~$ xauth list
          xauth: file /tmp/kde-mike/xauth-1000-_0 does not exist

          6. Try kdesudo kcalc -- it should fail similarly.
          Yes, failed.

          7. Run xauth -b
          Code:
          ~$ xauth -b
          Attempting to break locks on authority file /tmp/kde-mike/xauth-1000-_0
          xauth:  file /tmp/kde-mike/xauth-1000-_0 does not exist
          Using authority file /tmp/kde-mike/xauth-1000-_0
          8. Try kdesudo kcalc -- what happens now? Same error and failure, or does the calculator run?
          Calculator did NOT run:
          xauth> kdesudo kcalc
          xauth: (stdin):1: unknown command "kdesudo"
          xauth>
          Last edited by Qqmike; Oct 10, 2014, 10:00 PM.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #50
            Ha! Thunderbird is now asking for my PW each time I click New Messages! Yep, something is messing with my super sudo root-o thingy, or something. I clicked the Passwoord Manager thing in T-Bird to try to save the PW.
            Last edited by Qqmike; Oct 10, 2014, 09:36 PM.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #51
              OK! We're getting somewhere. The output of #5 tells me that your XAuth cookie is getting deleted when BleachBit purges /tmp. But why is your cookie there? Mine isn't. More investigation...

              1. Reboot again.

              2. Show the output of
              Code:
              xauth info
              
              printenv | grep HOME
              
              printenv | grep X
              
              ls -al ~/.X*
              
              ls -al /tmp/kde-mike
              3. Do a normal user Bleachbit run (to recreate the broken condition).

              4. Repeat all the commands in #2.

              Comment


                #52
                The maintainer upped the importance of the bug to High. This is probably why! It messes with your ability to run graphical apps as admin, without a re-boot.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #53
                  Yeah, I saw that. Generally, deleting /tmp while a system is booted isn't a good idea. In your case, this kills your XAuth cookie, which has all kinds of weird side effects. I'm trying to find out why your cookie is getting placed into /tmp rather than being written to ~/.Xauthority. Please do run that next set of commands -- let's try to find out what's going on.

                  n.b.: I've never been a fan of Bleachbit for this exact reason. It's too much of a sledgehammer.

                  Comment


                    #54
                    1. Reboot again.
                    Ctrl-Alt-Del

                    2. Show the output of ...

                    Code:
                    mike@mike-desktop14:~$ xauth info
                    Authority file:       /tmp/kde-mike/xauth-1000-_0
                    File new:             no
                    File locked:          no
                    Number of entries:    1
                    Changes honored:      yes
                    Changes made:         no
                    Current input:        (argv):1
                    mike@mike-desktop14:~$ printenv | grep HOME
                    HOME=/home/mike
                    PROFILEHOME=
                    mike@mike-desktop14:~$ printenv | grep X
                    XDG_VTNR=7
                    XDG_SESSION_ID=c8
                    XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/mike
                    SELINUX_INIT=YES
                    XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3
                    XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
                    SSH_AUTH_SOCK=/tmp/ssh-pxr3mgXKL2e6/agent.20323
                    XDG_CONFIG_DIRS=/etc/xdg/xdg-kde-plasma:/usr/share/upstart/xdg:/etc/xdg
                    XDG_SEAT=seat0
                    XCURSOR_THEME=oxy-white
                    XDG_DATA_DIRS=/usr/share:/usr/share/kde-plasma:/usr/local/share/:/usr/share/
                    TEXTDOMAIN=im-config
                    XDG_RUNTIME_DIR=/run/user/1000
                    XDG_CURRENT_DESKTOP=KDE
                    TEXTDOMAINDIR=/usr/share/locale/
                    XAUTHORITY=/tmp/kde-mike/xauth-1000-_0
                    mike@mike-desktop14:~$ ls -al ~/.X*
                    -rw------- 1 mike mike 59 Oct 10 21:40 /home/mike/.Xauthority
                    mike@mike-desktop14:~$ ls -al /tmp/kde-mike
                    total 12
                    drwx------  2 mike mike 4096 Oct 10 21:42 .
                    drwxrwxrwt 23 root root 4096 Oct 10 21:41 ..
                    -rw-rw-r--  1 mike mike   59 Oct 10 21:40 xauth-1000-_0
                    mike@mike-desktop14:~$
                    3. Do a normal user Bleachbit run (to recreate the broken condition).
                    --OK.

                    4. Repeat all the commands in #2.

                    Code:
                    mike@mike-desktop14:~$ xauth info
                    xauth:  file /tmp/kde-mike/xauth-1000-_0 does not exist
                    Authority file:       /tmp/kde-mike/xauth-1000-_0
                    File new:             yes
                    File locked:          no
                    Number of entries:    0
                    Changes honored:      yes
                    Changes made:         no
                    Current input:        (argv):1
                    mike@mike-desktop14:~$ printenv | grep HOME
                    HOME=/home/mike
                    PROFILEHOME=
                    mike@mike-desktop14:~$ printenv | grep X
                    XDG_VTNR=7
                    XDG_SESSION_ID=c8
                    XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/mike
                    SELINUX_INIT=YES
                    XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3
                    XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
                    SSH_AUTH_SOCK=/tmp/ssh-pxr3mgXKL2e6/agent.20323
                    XDG_CONFIG_DIRS=/etc/xdg/xdg-kde-plasma:/usr/share/upstart/xdg:/etc/xdg
                    XDG_SEAT=seat0
                    XCURSOR_THEME=oxy-white
                    XDG_DATA_DIRS=/usr/share:/usr/share/kde-plasma:/usr/local/share/:/usr/share/
                    TEXTDOMAIN=im-config
                    XDG_RUNTIME_DIR=/run/user/1000
                    XDG_CURRENT_DESKTOP=KDE
                    TEXTDOMAINDIR=/usr/share/locale/
                    XAUTHORITY=/tmp/kde-mike/xauth-1000-_0
                    mike@mike-desktop14:~$ ls -al ~/.X*
                    -rw------- 1 mike mike 59 Oct 10 21:40 /home/mike/.Xauthority
                    mike@mike-desktop14:~$ ls -al /tmp/kde-mike
                    total 8
                    drwx------  2 mike mike 4096 Oct 10 21:51 .
                    drwxrwxrwt 23 root root 4096 Oct 10 21:41 ..
                    mike@mike-desktop14:~$
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #55
                      XAUTHORITY=/tmp/kde-mike/xauth-1000-_0

                      Then it's gone after running Bleachbit -- as you said.
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #56
                        We're getting close!

                        You have the environment variable XAUTHORITY being set, and it contains /tmp/kde-mike/xauth-1000-_0. Even though you also have the file ~/.Xauthority, the presence of the environment variable and thus the XAuth file it points to overrides the XAuth file in your home directory. After the Bleachbit run, your XAuth file in /tmp is gone. But the variable still exists, so the system attempts to use that XAuth file rather than the one in your home directory. Since it doesn't exist, goofiness happens.

                        Now...what on your system is triggering the creation of that variable? I don't have it on mine. Must think...

                        Comment


                          #57
                          And, btw, again, this was not an issue in 12.04; only now in my 14.04. And, fwiw, whatthefunk said he has the same issue in 14.04.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #58
                            I'm not sure we can say further without knowing how Bleachbit works?
                            Under KDE, there is temporary files. It is checked (=> clean it)
                            Under System, there is temporary files. It is checked (=> clean it)
                            I tried unchecking (=> do NOT clean) each of these, one by one. But that didn't "fix" this issue: I still could not run as admin afterwards (and I was re-booting each time etc.).

                            Thinking out loud here ... Maybe mañana ... let it go tonight?
                            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                            Comment


                              #59
                              Hm. Maybe Bleachbit isn't following its own settings?

                              Anyway...trying to suss out what's setting XUAHTORITY could take a while. Here are couple things to try. If these don't reveal anything obvious, we can return later.
                              Code:
                              sudo grep -isR xauthority /etc /bin /sbin /lib /lib32 /lib64 /usr/bin /usr/sbin /usr/lib /usr/lib32 /usr/lib64 /opt
                              
                              ps $(sudo grep -lsz '^XAUTHORITY=' /proc/[0-9]*/environ | cut -d / -f 3)
                              Last edited by SteveRiley; Oct 10, 2014, 11:23 PM. Reason: removed regex shortcut

                              Comment


                                #60
                                One more data point first:
                                I unchecked BOTH temporary files in KDE and in System. That fixed this issue, of course (or so we would hope, based on what we knwo so far).
                                Now I'll look at you recent post.
                                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                                Comment

                                Working...
                                X