Announcement

Collapse
No announcement yet.

Dolphin Root

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

    #16
    I do believe that it is being worked on ,,,,that is implementing something like what was done for Kate to edit root files with an admin password , so all the things we like to do with a root Dolphin can be done with the password prompt .

    VINNY
    i7 4core HT 8MB L3 2.9GHz
    16GB RAM
    Nvidia GTX 860M 4GB RAM 1152 cuda cores

    Comment


      #17
      +vinnywright where can I learn about this Kate edit root files?

      Comment


        #18
        Originally posted by hallergard View Post
        +vinnywright where can I learn about this Kate edit root files?
        just open the one you want to edit with kate ,,,,edit it ,,,when you click save you will get a password prompt ,,enter your password ,,,,done

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment


          #19
          I edited the Dolphin Service settings and added the "sudoeditKate" service. Works for me.

          $ cat /usr/local/bin/sudoeditkate.sh
          #!/bin/sh

          export EDITOR=/usr/bin/kate
          export SUDO_ASKPASS=/usr/local/bin/sudoeditpass.sh
          sudoedit -A "$1"

          $ cat /usr/local/bin/sudoeditpass.sh
          #!/bin/sh
          kdialog --password 'sudoedit needs user (sudo) password to execute the kate'
          $ cat /usr/share/bash-completion/completions/sudoedit
          # bash completion for sudo(8) -*- shell-script -*-

          _sudo()
          {
          local cur prev words cword
          _init_completion || return

          local i mode=normal
          [[ $1 == *sudoedit ]] && mode=edit

          [[ $mode == normal ]] &&
          for (( i=1; i <= COMP_CWORD; i++ )); do
          if [[ ${COMP_WORDS[i]} != -* ]]; then
          local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
          local root_command=${COMP_WORDS[i]}
          _command_offset $i
          return
          fi
          if [[ ${COMP_WORDS[i]} == -e ]]; then
          mode=edit
          break
          fi
          [[ ${COMP_WORDS[i]} == -@(u|U|g|C|p) ]] && ((i++))
          done

          case "$prev" in
          -u|-U)
          COMPREPLY=( $( compgen -u -- "$cur" ) )
          return
          ;;
          -g)
          COMPREPLY=( $( compgen -g -- "$cur" ) )
          return
          ;;
          -C|-p)
          # argument required but no completions available
          return
          ;;
          esac

          if [[ "$cur" == -* ]]; then
          COMPREPLY=( $( compgen -W '-A -b -C -E -e -g -H -h -i -K -k -L -l -ll
          -n -P -p -S -s -U -u -V -v' -- "$cur" ) )
          return
          fi
          if [[ $mode == edit ]]; then
          _filedir
          fi
          } && complete -F _sudo sudo sudoedit

          # ex: ts=4 sw=4 et filetype=sh
          "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


            #20
            I am repeating myself, but with KDE Frameworks version 5.34+ (you can check your installed version with 'kf5-config --version') there is no root evocation needed to edit files you don't have permissions to edit.

            Just open a file normally with kate (or any other editor that uses KTextEditor from KDE Frameworks, like kwrite), edit and save...if you do not have permissions to write, you'll be prompted for authorization. This all happens automagically.

            Similar functionality is in the pipeline for file operations (for dolphin), but that has not been released yet.

            Comment


              #21
              Originally posted by kubicle View Post
              Similar functionality is in the pipeline for file operations (for dolphin), but that has not been released yet.
              That's the jist of the thread. Glad to see it's coming (back)
              ​"Keep it between the ditches"
              K*Digest Blog
              K*Digest on Twitter

              Comment


                #22
                Thanks guys!

                Comment


                  #23
                  Originally posted by Teunis
                  When I needed to edit fstab I found Konsole gave me this option:
                  [CODE]SUDO_EDITOR=kate sudoedit fstab/CODE]
                  It works
                  It works (with editors, not with dolphin), but isn't necessary anymore. You can just run "kate /etc/fstab".

                  Comment


                    #24
                    Well good news has come - The code to return kio-as-root functions has landed. Soon to be released in a distro near you.

                    The KIO patches that Chinmoy had been working on for his GSOC project, to support doing actions as root has been merged!
                    ​"Keep it between the ditches"
                    K*Digest Blog
                    K*Digest on Twitter

                    Comment


                      #25
                      Originally posted by dequire View Post
                      Well good news has come - The code to return kio-as-root functions has landed. Soon to be released in a distro near you.
                      Landed for the 2nd time. Hope the patch set doesn't get reverted again like it did before!
                      On #kubuntu-devel & #kubuntu on libera.chat - IRC Nick: RikMills - Launchpad ID: click

                      Comment

                      Working...
                      X