Re: Equivalent of su for GUI?

From: OKB (not okblacke) (BrenBarn_at_aol.com)
Date: 07/07/04

  • Next message: Roberto Selbach Teixeira: "Re: Equivalent of su for GUI?"
    Date: 7 Jul 2004 16:16:40 GMT
    
    

    Roberto Selbach Teixeira wrote:

    > It depends on what you use, I think. For example, KDE allows you to
    > specify the user an specific application should run as (in your
    > case: root)[1]. GNOME and Redhat extensively use something called
    > consolehelper to do the same. The problem with consolehelper is
    > that it requires a little bit more configuration in the system than
    > kdesu, but the result is pretty much the same.
    >
    > Roberto.
    >
    >
    > Footnotes:
    > [1] It uses a utility called kdesu to do so. You can try running
    > something as "kdesu foobar", where foobar is your application to
    > see how it works (and to verify that I understood what you want)

                Yeah, I looked at kdesu, and it seems like that's the way to
    proceed. The problem is, I want a really general way to hook it into
    the GUI. I don't want to have to open a konsole and do "kdesu foo", I
    want to be able to click on the "foo" icon like I normally would, only
    click some other button first, or hold down Ctrl-Shift or something, and
    have my GUI actions take effect with root privs.

                I was able to get something like this with a servicemenu in
    Konqueror, but it's limited. What it lets me do is right click a file,
    then do "Open as root". Behind the scenes it runs "kdesu kfmclient exec
    %u", so it opens the file with the regular association, only as root.
    There are two problems, though. First, it pops up an error message
    saying 'Konqueror couldn't find program "kdesu kfmclient exec %u"' (with
    a literal %u in there); but it does open the file correctly anyway.
    More importantly, though, this doesn't allow me to, say, right-click a
    file and do "Open With" one of the other associated programs, but do it
    as root. I would like to be able to do anything I can do in the GUI as
    a normal user, but do it in the GUI as root.

                Is there any very general hook in KDE (or any of the other desktops
    -- I'd switch if it would get me this) where you can step in before it
    runs any command? I'd effectively like to be able to say to KDE,
    "before you run any program, check this file/key
    combination/button/whatever, and if it's in the right state, then
    prepend kdesu to the command you were about to run".

    -- 
    --OKB (not okblacke)
    Brendan Barnwell
    "Do not follow where the path may lead.  Go, instead, where there is
    no path, and leave a trail."
    	--author unknown
    

  • Next message: Roberto Selbach Teixeira: "Re: Equivalent of su for GUI?"