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

    #16
    Originally posted by kubicle View Post
    @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.
    And now it magically works again...I'm officially baffled :P

    Originally posted by Snowhog View Post
    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.
    I was about to say that 'which' would have reported an alias, but seemed to recall that the regular which (that bash uses) doesn't do that (I use zsh myself and it has a more featureful 'which' as a shell builtin)...so an alias is one possibility for a "working kdesu command"

    Comment


      #17
      Originally posted by kubicle View Post
      And now it magically works again...I'm officially baffled :P
      Well some debug progress on my end:

      I noticed starting kate from a root filemanager works for the first root filemanager instance launched after a fresh login. After I close and reopen the filemanager, launching kate errors out.

      If I kill root's klauncher process, it works again for the next the filemanager instance, but not subsequent ones (unless I kill root's klauncher again). So this is not really a "solution", but may help track down the problem (which I still think is dbus related, but I have no hard evidence of it)

      Comment


        #18
        Yes, that's exactly the behaviour. It works once and then the next time the error appears. I also think it's a DBUS registration issue but haven't been able to pinpoint it, yet.

        The kdesu symlink is in /usr/lib/kde4/libexec.

        kdesu works (as part of a command) when placed in a menu item (since I assume the KDE menu environment 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.
        Last edited by perspectoff; May 06, 2012, 09:54 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


          #19
          Originally posted by perspectoff View Post
          The kdesu symlink is in /usr/lib/kde4/libexec.

          kdesu works (as part of a command) when placed in a menu item (since I assume the KDE menu environment 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).
          That would explain it. I was sort of fixated on the command line as I thought you were running it from cli...so I did not think of the launchers.

          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.
          I think that decision was made upstream (KDE), moving kdesu to /usr/lib/kde4/libexec and IIRC they were quite aware that the executables in there are not commonly in $PATH...(although there was at one point a symlink in /usr/bin as well)...of course this is rather academical as kdesu is in kubuntu just a symlink to kdesudo (which you are "supposed" to use in kubuntu) so it has no effect on the issue at hand...(the old kdesu that is not a link to kdesudo is installed on kubuntu systems as well, but not used, is /usr/lib/kde4/libexec/kdesu-distrib/kdesu)

          Comment


            #20
            Originally posted by perspectoff View Post
            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 have asked about this before. Is there a way to set the path used by KDE? Settings in ~/.profile and friends are not used.
            Regards, John Little

            Comment


              #21
              Right-Click K-Menu
              Left-Click "Edit Applications..."
              On the left side, left click the little arrow beside "Utilities"
              Under that, Left-Click "Kate"
              On the Right side you will see "Command: kate -b %U"
              Change it to "kdesudo kate %U" (you are adding "kdesudo" to the beginning and removing the "-b". The "-b" is the whole problem.)

              In the same manner as above, find Dolphin under System and add kdesudo to the beginning

              Save

              Now every time you open kate or open a file from dolphin in kate it will be as sudo! (Use with caution!)



              Originally posted by perspectoff View Post
              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?

              Comment

              Working...
              X