Announcement

Collapse
No announcement yet.

Dolphin has no Open as administrator

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

    Dolphin has no Open as administrator

    I use 20.04. How can I open a folder as administrator ? I would like to do it through a file manager, if possible. Thanks.

    #2
    I have an icon link to application on my desktop which uses this command:

    pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin /
    DO NOTE the closing slash which has a space between it and the dolphin app name.

    This is a 'work around' because the devs have chosen to remove the ability to start dolphin as root user.

    Hopefully, sometime in the future, in my lifetime maybe, the devs will restore the ability to start dolphin as root user. But that has not happened yet, to my knowledge.
    Kubuntu 23.11 64bit under Kernel 6.8.8, Hp Pavilion, 6MB ram. All Bow To The Great Google... cough, hack, gasp.

    Comment


      #3
      Thanks @TWPonKubuntu

      I am new to Kubuntu. I do not know how to make an icon link.

      Hopefully, sometime in the future, in my lifetime maybe, the devs will restore the ability to start dolphin as root user. But that has not happened yet, to my knowledge.
      Is there any plugin which does that ? Assuming Plasma support plugins. I am a 5 days old in the Plasma experience.

      Comment


        #4
        I don't know of a plugin which will solve this problem.

        On your desktop, Right click->Create New->Link to Application

        Enter an application name. I use "Dolphin as root", on the General tab.

        Enter the pkexec command from my first reply, on the Application tab, in the command field.

        If you're not familiar with this process, then this is the chance to learn by experimentation.

        You can edit the configuration of your desktop icons by Right Clicking on them and selecting Properties.

        Sorry that this is abbreviated. You can find better instructions via a NON-google websearch for "create a desktop icon". Don't trust Google...
        Kubuntu 23.11 64bit under Kernel 6.8.8, Hp Pavilion, 6MB ram. All Bow To The Great Google... cough, hack, gasp.

        Comment


          #5
          I can confirm this does work in 20.04.

          My app entry looks like this:

          Click image for larger version

Name:	Screenshot_20200507_135936.png
Views:	1
Size:	41.6 KB
ID:	644699

          [AH] And the result looks something like:

          Click image for larger version

Name:	Screenshot_20200507_140437.png
Views:	1
Size:	66.7 KB
ID:	644700

          (root user doesn't use dark themes :·)
          Last edited by Don B. Cilly; May 07, 2020, 06:07 AM.

          Comment


            #6
            You could also put the command in a "ServiceMenu" in which case it will be shown in the context menu (when right-clicking on a folder)
            File to create: $HOME/.local/share/kservices5/ServiceMenus/open_dolphin_as_root.desktop
            Contents:
            Code:
            [Desktop Entry]
            Type=Service
            X-KDE-ServiceTypes=KonqPopupMenu/Plugin
            X-KDE-Priority=TopLevel
            MimeType=inode/directory;
            Actions=OpenDolphinRoot;
            
            [Desktop Action OpenDolphinRoot]
            Name=Open as root
            Icon=system-file-manager
            Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin %u
            Restart dolphin and it should be available
            Last edited by kubicle; May 07, 2020, 06:08 AM.

            Comment


              #7
              Just a word of caution: The reason root access from the file manager is not available by default is because it's a bad idea, especially for a user new to Linux.

              Files and folders that require root access are set that way so users don't damage their installs by doing something they shouldn't or don't have the experience to do properly. I say this because, in my experience, if you continue to access your system this way you will eventually leave it unusable or unbootable. This forum and many others are full of users desperate to repair damage they created themselves. If you need to edit a file at the root level, you can simply open the file with Kate and save it with your root password, but even then you should know what you are doing, why you are doing it, and how to recover from it.

              Not that it really matters, but there are many forums out there where this question would have been left unanswered or the replies would have been unpleasant. because the prevailing notion is if you have to ask how to do something like this you probably shouldn't be doing it.

              Do yourself a big favor and keep a good backup of your home folder and a bootable USB drive so you will have half a chance to recover or reinstall.

              Please Read Me

              Comment


                #8
                Thank you all. Appreciate the instructions.

                @oshunluvr appreciate your word of caution. I was on default Ubuntu before. New to Plasma. But yes, still a lot to learn and can make mistakes. You are awesome

                Comment


                  #9
                  Note that "create new" only appears on the right-click menu if your desktop layout is "Folder view".

                  If it is "Desktop", IMO the easiest way is to right-click the K menu, and choose "Edit applications". Then add a "new submenu" give it a name you like, then click on it on the left scroll box, click new, give it a name, then set it up as above. Click save, exit, then find the item in the K menu, and maybe test it. Then drag it from the K menu to the desktop, or a panel. I like this because if I accidentally lose the icon, I can reestablish it very quickly. The menu can be marked as hidden if you don't like it appearing.

                  You can achieve something similar by creating a .desktop file, then dragging it to the desktop from dolphin. But IME there's pitfalls that way.
                  Regards, John Little

                  Comment


                    #10
                    Thanks. K Menu is called in by alt + space, right ?

                    Comment


                      #11
                      Originally posted by Grahm View Post
                      Thanks. K Menu is called in by alt + space, right ?
                      (Not on my 20.04. I can press and release Meta.)
                      No don't open the menu. Move the cursor over the Click image for larger version

Name:	kde.png
Views:	2
Size:	4.4 KB
ID:	644704 and press right-click. At least, that's what it looks like for me, maybe yours is different. It's usually at the bottom left.
                      Regards, John Little

                      Comment


                        #12
                        The meta key works for me to open the application launcher. Same as a right mouse click on the kubuntu logo in the bottom left position.
                        Kubuntu 23.11 64bit under Kernel 6.8.8, Hp Pavilion, 6MB ram. All Bow To The Great Google... cough, hack, gasp.

                        Comment


                          #13
                          Understood now

                          Comment


                            #14
                            Originally posted by Grahm View Post
                            Thank you all. Appreciate the instructions.

                            @oshunluvr appreciate your word of caution. I was on default Ubuntu before. New to Plasma. But yes, still a lot to learn and can make mistakes. You are awesome
                            Glad you took my comment in the spirit it was intended. It did occur to me later that maybe you weren't new to Linux, just to Kubuntu. Regardless, welcome to Kubuntu Forums! We look forward to your participation.

                            Please Read Me

                            Comment


                              #15
                              Thanks. Loving Plasma.

                              Comment

                              Working...
                              X