Announcement

Collapse
No announcement yet.

Strange system behavior after running app as root

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

    Strange system behavior after running app as root

    Hi,
    I just switched to Kubuntu 12.10 on my linux laptop (Dell Latitude E5510, i3, Intel graphics). When running an app as root (typically Konqueror, via Konsole and "sudo konqueror") then after closing it the system behaves very strange - when I try to run almost every app, it takes about 30 seconds or more (opening Home folder in Konqueror, opening small image in Gwenview etc.). All these apps normally start immediately so this is strange. Forcing logout helps.

    I checked ksysguard but found nothing suspicious. Do you have any idea where could be problem?

    Thanks

    PS: the system is fully updated now
    Dell Latitude E5510, Intel i3, Kubuntu 16.04 Xenial Xerus (LTS)

    #2
    First, never launch and use a graphical application using sudo. This is a sure way to bork your user account /home directory.

    Open a console and type:
    Code:
    sudo chown -R username:username /home/username/*
    where username is the username you log in with. My username is paul, so the command (for me) would be:
    Code:
    sudo chown -R paul:paul /home/paul/*
    This will change the owner and group of all files in your /home directory to you, which they all should be.

    The issue you face with launching and using a graphical application with sudo is that owner:group designations can get changed to root, not a good thing within your /home directory.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Originally posted by Snowhog View Post
      First, never launch and use a graphical application using sudo. This is a sure way to bork your user account /home directory.
      Ok,
      I do not intend to use file manager in root mode within my home directory, however I sometimes need root access - for example for adding new icons to usr/share/icons or last time I tried to manually edit a ksplash theme. I already used different file managers (Konqueror, PCmanFM, Thunar etc.) in root mode in various distros (Sam Linux, TinyME, PCLOS, OpenSuse) and never had problem. OK, I must admit, that there was mostly possibility to set "Run as ROOT" in run dialog or direct shortcut like "Thunar - superuser mode".

      Is it possible to achieve something similar safely also in Kubuntu? I do not want to use always CMD.

      thanks
      Dell Latitude E5510, Intel i3, Kubuntu 16.04 Xenial Xerus (LTS)

      Comment


        #4
        When you desire/need to use a graphical application with root privileges, just launch it with kdesudo. You don't have to be in a console to do this. You can press Alt+F2 to bring up the run dialog and type, for example, kdesudo dolphin and press enter to launch dolphin 'as root'. To launch kate 'as root' you would type, kdesudo kate.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          thanks Snowhog,
          that was what I needed. I will follow your advice.
          Dell Latitude E5510, Intel i3, Kubuntu 16.04 Xenial Xerus (LTS)

          Comment


            #6
            Just had a similar discussion about this on another forum, and I pointed out that once you enter sudo mode, even after you exit the program you are still in sudo mode for 5 minutes. That's the default time in *ubuntu that keeps you in sudo mode. So anything you do from the CLI is automatically done with the elevated privileges of sudo. To cancel this you can issue this to kill it.
            Code:
            sudo -K
            There is also a way to change this default by inserting a line in the sudoers file using visudo. Any changes to the sudoers file should always be made using visudo.
            Here is good link that shows you some of the things you can do with the sudoers file.
            http://www.howtogeek.com/116757/8-wa...udo-on-ubuntu/

            Comment


              #7
              Originally posted by Detonate View Post
              So anything you do from the CLI is automatically done with the elevated privileges of sudo.
              No, that's not right surely. For 15 minutes you can use sudo without retyping your password, but you still need to prefix with "sudo":
              Code:
              $ touch /x
              touch: cannot touch `/x': Permission denied
              $ sudo touch /x
              [sudo] password for john: 
              $ touch /y
              touch: cannot touch `/y': Permission denied
              $ sudo touch /y
              $ sudo -K
              $ sudo touch /y
              [sudo] password for john: 
              $
              If "anything you do from the CLI is automatically done with the elevated privileges of sudo" then my first touch /y would have been allowed.

              Regards, John Little
              Regards, John Little

              Comment


                #8
                That's correct. I should have said that it really only affects things you do prefixed with sudo.

                Comment


                  #9
                  Thanks guys,
                  in fact first time I was afraid, that I could make something bad while not knowing that I am working with superuser rights. However, then I though about a little bit and also came to the fact, that system only keeps the password and not the root mode for all the time (in contrast to other distros where you once open the root console and you remain logged as root until you close the konsole window).

                  so this is ok, I though about turning it off using the useful link supplied by Detonate (thanks ), but finally realized that this is not problem for me.
                  Dell Latitude E5510, Intel i3, Kubuntu 16.04 Xenial Xerus (LTS)

                  Comment

                  Working...
                  X