Announcement

Collapse
No announcement yet.

Kate won't start from Dolphin as root

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

    Kate won't start from Dolphin as root

    One of my most common tasks is editing configuration files which have root (superuser) privileges.

    In all previous versions, I could start Dolphin with root (superuser) privileges using

    kdesudo dolphin or kdesu dolphin

    and then "Open with Kate..." to edit any file with root (superuser) privileges.

    However, in Precise when I do this, the error

    KDEInit could not launch '/usr/bin/kate'

    appears.

    This only happens in Dolphin; I am able to start kate as the superuser from the command-line:

    kdesudo kate or sudo kate

    and edit files without problems.

    Any solutions?
    Last edited by perspectoff; May 05, 2012, 05:16 PM.

    UbuntuGuide/KubuntuGuide

    Right now the killer is being surrounded by a web of deduction, forensic science,
    and the latest in technology such as two-way radios and e-mail.

    #2
    DON'T launch GUI applications using sudo. Use kdesudo application_name instead.

    That said however, start Dolphin and click on Settings > Configure Dolphin... > Services > Download New Services... and click on Rating (Order by: ) then click on Rootactions Servicemenu and click on Install.

    This will add a Root actions service menu to Dolphin. This is one of the first things I install after installing a fresh Kubuntu. Very useful addition.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      I sometimes get the same message, KDEInit could not launch '/usr/bin/kate', but not often...
      kdesu kate <path-to-file-name> always works for me.
      Kubuntu 12.04 - Acer Aspire 5750G

      "I don't make a great deal of money, but I'm ok with that 'cause I don't hurt a lot of people in the process either"

      Comment


        #4
        Originally posted by bra|10n View Post
        I sometimes get the same message, KDEInit could not launch '/usr/bin/kate', but not often...
        kdesu kate <path-to-file-name> always works for me.
        That's not a very good solution. That means I would have to type the entire path of the filename by hand every time. Kinda defeats the purpose of having a file manager...

        UbuntuGuide/KubuntuGuide

        Right now the killer is being surrounded by a web of deduction, forensic science,
        and the latest in technology such as two-way radios and e-mail.

        Comment


          #5
          [QUOTE=Snowhog;297427]DON'T launch GUI applications using sudo. Use kdesudo application_name instead.


          I've used both kdesudo dolphin, kdesu dolphin, and sudo dolphin rather interchangeably for a long time (over several versions of Kubuntu) without any noticeable problems. Of course, I can't use sudo (and must use kdesudo or kdesu) from a menu item.

          Besides, my problem occurs when launching Dolphin using kdesudo (or using kdesu from a menu item) anyway, and only in Precise -- not in Oneiric.

          I did install the Root Actions Servicemenu in Dolphin as suggested, and that is working (thanks). I installed ruby first (per the module instructions).

          sudo apt-get install ruby

          The service menu only appears in Dolphin after a complete reboot. Also, I had to install the Root Actions Servicemenu separately in the kdesudo dolphin instance (the root (superuser) instance) and for the regular dolphin instance.

          Installing the Root Actions Servicemenu in the regular dolphin instance only is insufficient because many folders are only accessible with root privileges (so I must use the kdesudo dolphin instance to access them).

          Wow, this took a lot of effort to fix something that used to work fine. There's always a bit of reinventing the wheel with every new version, I guess...
          Last edited by perspectoff; May 06, 2012, 10:00 AM.

          UbuntuGuide/KubuntuGuide

          Right now the killer is being surrounded by a web of deduction, forensic science,
          and the latest in technology such as two-way radios and e-mail.

          Comment


            #6
            Originally posted by perspectoff View Post
            Originally posted by Snowhog View Post
            DON'T launch GUI applications using sudo. Use kdesudo application_name instead.
            That's nonsense.
            There is a 'risk' in running graphical applications launched using sudo. See Running Sudo Graphically by psycho cat.
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Originally posted by Snowhog View Post
              There is a 'risk' in running graphical applications launched using sudo. See Running Sudo Graphically by psycho cat.
              So where is the .ICEauthority in Kubuntu that the Psychocats link references? Is that the same as the .Xauthority ?
              Last edited by perspectoff; May 05, 2012, 04:26 PM.

              UbuntuGuide/KubuntuGuide

              Right now the killer is being surrounded by a web of deduction, forensic science,
              and the latest in technology such as two-way radios and e-mail.

              Comment


                #8
                Originally posted by perspectoff View Post
                KDEInit could not launch '/usr/bin/kate'
                I've seen this error using the legacy kdesu (/usr/lib/kde4/libexec/kdesu-distrib/kdesu) launching kate from dolphin works if you use kdesudo instead of kdesu.

                On that note, on newer kubuntu releases, kdesu (/usr/bin/kdesu) either does not exist or is a symlink to kdesudo (through /etc/alternatives), is your system setup differently?

                Comment


                  #9
                  Originally posted by kubicle View Post
                  I've seen this error using the legacy kdesu (/usr/lib/kde4/libexec/kdesu-distrib/kdesu) launching kate from dolphin works if you use kdesudo instead of kdesu.

                  On that note, on newer kubuntu releases, kdesu (/usr/bin/kdesu) either does not exist or is a symlink to kdesudo (through /etc/alternatives), is your system setup differently?
                  No, the error happens no matter whether I launch using kdesudo dolphin or kdesu dolphin.

                  Yes, I note kdesudo in /usr/bin but I can't find kdesu (it's not in /usr/bin).

                  I'm using a brand new installation of 12.04 LTS Precise Pangolin which I downloaded and installed yesterday. It has KDE 4.8.2.
                  Last edited by perspectoff; May 05, 2012, 04:38 PM.

                  UbuntuGuide/KubuntuGuide

                  Right now the killer is being surrounded by a web of deduction, forensic science,
                  and the latest in technology such as two-way radios and e-mail.

                  Comment


                    #10
                    Originally posted by perspectoff View Post
                    No, the error happens no matter whether I launch using kdesudo dolphin or kdesu dolphin.

                    Yes, I note kdesudo in /usr/bin but I can't find kdesu (it's not in /usr/bin).

                    I'm using a brand new installation of 12.04 LTS Precise Pangolin which I downloaded and installed yesterday. It has KDE 4.8.2.
                    I'm on quantal, but it shouldn't be much different from precise yet, what do you get with:
                    'which kdesu'
                    'which kdesudo'

                    Comment


                      #11
                      Originally posted by kubicle View Post
                      I'm on quantal, but it shouldn't be much different from precise yet, what do you get with:
                      'which kdesu'
                      'which kdesudo'
                      which kdesu

                      returns no output (from my default bash), whereas

                      which kdesudo returns

                      /usr/bin/kdesudo

                      Wait... I found it where you mentioned: in /usr/lib/kde4/libexec

                      It is a symlink to /etc/alternatives/kdesu which in turn is a symlink to /usr/bin/kdesudo. So you are correct: kdesu is now essentially just a symlink to kdesudo.

                      kdesu works when placed in a menu item (since I assume the KDE menu envrionment includes the /usr/lib/kde4/libexec in its PATH) but does not work from the command line (since I don't think the PATH used by bash includes /usr/lib/kde4/libexec).

                      In a way I think this is a problem in Kubuntu -- having separate PATHS for the command-line environment and for the graphical environment. I like to script lots of things for the command-line environment, but if they are happening to files in different PATHS, well, that can be a problem.

                      BTW, you're the kubicle who wrote the Root Actions Servicemenu ? Thanks for that...
                      Last edited by perspectoff; May 06, 2012, 09:48 AM.

                      UbuntuGuide/KubuntuGuide

                      Right now the killer is being surrounded by a web of deduction, forensic science,
                      and the latest in technology such as two-way radios and e-mail.

                      Comment


                        #12
                        Originally posted by perspectoff View Post
                        I just can't find where it is located. I suspect there is a symlink somewhere, as you mentioned...
                        It's linked to /usr/bin/kdesudo, and that link is in /etc/alternatives:
                        Code:
                        ls -la /etc/alternatives/kdesu
                        lrwxrwxrwx 1 root root 16 Mar 3 13:50 kdesu -> /usr/bin/kdesudo
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by Snowhog View Post
                          DON'T launch GUI applications using sudo. Use kdesudo application_name instead.

                          That said however, start Dolphin and click on Settings > Configure Dolphin... > Services > Download New Services... and click on Rating (Order by: ) then click on Rootactions Servicemenu and click on Install.

                          This will add a Root actions service menu to Dolphin. This is one of the first things I install after installing a fresh Kubuntu. Very useful addition.
                          Thanks for the tip! Very useful indeed...

                          Comment


                            #14
                            Originally posted by Snowhog View Post
                            It's linked to /usr/bin/kdesudo, and that link is in /etc/alternatives:
                            Code:
                            ls -la /etc/alternatives/kdesu
                            True, but /etc/alternatives is commonly not in $PATH, so I'm not exactly sure how perspectoff can use 'kdesu', On my end using kdesu results in "command not found"

                            @perspectoff:
                            Now I tried it again with 'kdesudo dolphin' and got the error when launching kate...and I'm positive it worked 15 minutes ago when I tried it before my earlier posts...so there is something fishy there. I'm leaning towards a dbus issue, but not sure yet.

                            EDIT:
                            BTW, you're the kubicle who wrote the Root Actions Servicemenu ? Thanks for that...
                            I am, thanks for the thanks
                            Last edited by kubicle; May 05, 2012, 05:35 PM.

                            Comment


                              #15
                              Originally posted by kubicle View Post
                              True, but /etc/alternatives is commonly not in $PATH, so I'm not exactly sure how perspectoff can use 'kdesu', On my end using kdesu results in "command not found"
                              Same here. One would have to assume that he either has kdesudo aliased as kdesu or that he has specified the use of kdesu via update-alternatives.
                              Last edited by Snowhog; May 05, 2012, 05:42 PM.
                              Using Kubuntu Linux since March 23, 2007
                              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                              Comment

                              Working...
                              X