Announcement

Collapse
No announcement yet.

How to copy to root partition?

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

    [SOLVED] How to copy to root partition?

    I have a icon theme folder 'oxygencolors-v6-3' available offline. I want to copy this folder to '/usr/share/icons'. How to do this in kubuntu 18.04?

    #2
    You will have to do it as root.
    Open a Konsole and issue
    sudo -i
    Then issue
    sudo apt update
    sudo apt install mc

    That installed mc (Midnight Commander), a two panel text based file manager similar to Krusader but a LOT faster.
    Mount your "offline" storage device. In the left panel navigate to that storage device and to the directory that contains the directory you want to copy over. Hit the tab to change to the right panel. Navigate to /usr/share/icons.
    Using your mouse move to the left panel and right click on the directory you want to copy over. That will cause it to be highlighted in yellow. Then hit the F5 key. A dialog will appear. It should have the proper settings, especially "preserve attributes". Left click on the OK button. When the copying is done hit F10 to exit the program. Then type "exit" to exit the root shell, and "exit" again to close the Konsole.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Thanks GreyGeek.
      I shall install it next time I need it.
      Meanwhile, in konsol, I ran
      Code:
      sudo ark
      and extracted the .tar.gz2 file to /usr/share/icons directory.

      Comment


        #4
        Nice clean solution - almost. You should never run a GUI program with "sudo" use "kdesudo" instead. This protects your home folder. If I were you, I would scan your home folder right now for files owned by root to be safe. I can't count how many times this has caused problems.

        Really, ark is an end-around that could be used to send files to root folders anytime you wanted.

        Please Read Me

        Comment


          #5
          Originally posted by oshunluvr View Post
          You should never run a GUI program with "sudo" use "kdesudo" instead.
          Except that new installs of 18.04 do not have kdesudo; it looks like a dead project.

          Another thread about this suggested kdesu, but it is noisy (lots of messages on stderr). It seems it is only intended for internal use by KDE, because it isn't in the default path. But this worked for me:
          Code:
          /etc/alternatives/kdesu ark &
          Regards, John Little

          Comment


            #6
            Originally posted by oshunluvr View Post
            You should never run a GUI program with "sudo" use "kdesudo" instead. This protects your home folder.
            'kdesudo' is not available in Kubuntu 18.04. What is the experts' advise for the average users then?...Is it ideal using mc as recommended by GreyGeek?
            Code:
             If I were you, I would scan your home folder right now for files owned by root to be safe. I can't count how many times this has caused problems.
            Will you please guide how to scan? I am not a much advanced user but using Linux at home since last 10 years.

            Regards.

            Comment


              #7
              Originally posted by Jag59 View Post
              'kdesudo' is not available in Kubuntu 18.04. What is the experts' advise for the average users then?...Is it ideal using mc as recommended by GreyGeek?
              Code:
               If I were you, I would scan your home folder right now for files owned by root to be safe. I can't count how many times this has caused problems.
              Will you please guide how to scan? I am not a much advanced user but using Linux at home since last 10 years.

              Regards.
              Well that sucks. Why is something as basic as kdesudo no longer needed in the devs mind? I don't get that at all.

              Anyway, the easiest way to see way root owns in your home folder is to open konsole and type:

              find ~ -user root

              this will list every file that's owned by root in your home. Not all files are bad if owned by root, but some will actually prevent logging into your user account. For example, I have a hidden folder called .rpmdb in my home because I convert an occasion rpm to deb file and root does that. Also my mail program has a few root owned cache files (which seems odd, but it works).

              If you find anything owned by root that you question, post back.

              Please Read Me

              Comment


                #8
                Originally posted by jlittle View Post
                Except that new installs of 18.04 do not have kdesudo; it looks like a dead project.

                Another thread about this suggested kdesu, but it is noisy (lots of messages on stderr). It seems it is only intended for internal use by KDE, because it isn't in the default path. But this worked for me:
                Code:
                /etc/alternatives/kdesu ark &
                Odd. as I just booted my 18.04 VM install and kdesudo is in it but my new 18.04 install from 3 weeks ago it is not. What are we supposed to do if we want to use a graphical program as root? Has the entire Linux world flipped over and decided that having a root account that you can log into is suddenly a good idea?

                Please Read Me

                Comment


                  #9
                  Seems kdesu is actually in /usr/lib/kde4/libexec/kdesu-distrib/ and linked to two other places.

                  Code:
                  stuart@office:~$ ll /subvol/@Kubuntu_1804/etc/alternatives/kdesu 
                  lrwxrwxrwx 1 root root 41 Apr 27 12:47 /subvol/@Kubuntu_1804/etc/alternatives/kdesu -> /usr/lib/kde4/libexec/kdesu-distrib/kdesu*
                  
                  stuart@office:~$ ll /subvol/@Kubuntu_1804/usr/lib/kde4/libexec/kdesu
                  lrwxrwxrwx 1 root root 23 Apr 27 12:47 /subvol/@Kubuntu_1804/usr/lib/kde4/libexec/kdesu -> /etc/alternatives/kdesu*
                  
                  stuart@office:~$ ll /subvol/@Kubuntu_1804/usr/lib/kde4/libexec/kdesu-distrib/kdesu 
                  -rwxr-xr-x 1 root root 51280 Dec  1 10:04 /subvol/@Kubuntu_1804/usr/lib/kde4/libexec/kdesu-distrib/kdesu*
                  
                  stuart@office:~$

                  Please Read Me

                  Comment


                    #10
                    Apparently, you can configure kdesu to use "sudo" instead of "su" but isn't this still running a GUI program as root using sudo?

                    Please Read Me

                    Comment


                      #11
                      Weird indeed. It's as if the devs have discovered security holes in KDE apps that are exposed when run with kdesudo and are trying to discourage such use because fixing those holes would involve a total revamp of the Qt SDK.

                      There are two ways to run an AppImage:
                      1) Just click on it and it will unzip and run, but when you are through it zips back up to leave just a single file.
                      2) To allow it to load faster, unzip it into a subdirectory and execute the AppRun file. When this method is used the subdirectory under that app contains files owned by root.

                      Also, when using sagemath's notebook() browser function files owned by root are created in ~/.sage
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Completely off-topic but I'm not understanding why we don't just copy the icon folder to ~/.local/share/icons
                        we see things not as they are, but as we are.
                        -- anais nin

                        Comment

                        Working...
                        X