Changing to root in konqi
James Gray
james at grayonline.id.au
Tue May 30 23:59:55 UTC 2006
On Tue, 30 May 2006 06:41 pm, Dotan Cohen wrote:
> On 5/30/06, James Gray <james at grayonline.id.au> wrote:
> > Make up your mind - you can't have it both ways :)
> >
> > What you are wanting is a single program to escalate and drop privileges
> > on the fly at the user's prompting. This is NOT supported in Konquerer
> > (and is non-trivial to implement too!). You either browse as root
> > (ALT-F2, "kdesu konqueror") or you edit as root as Tez described earlier
> > in this thread.
> >
> > Hope that clears it up :)
> >
> > James
>
> Thanks, I was beginning to think that a program cannot change it's
> privleges on the fly. How, then, does Konsole do it?
**Mono-space font warning**
This message contains ASCII art, it is best viewed with a
mono-spaced font like "Bitstream Vera Sans Mono" or "Courier"
------
Konsole doesn't - the shell that's running inside Konsole spawns a new process
with elevated privs. Think of Konsole as a "container" for running shells
and CLI programs.
So you start konsole as a normal user, the process tree looks like this:
kdeinit───konsole
└── bash
Now let's spawn a root shell from bash (sudo -H -s):
kdeinit───konsole
└── bash
└── bash(root shell)
See how it works? Konsole's privs haven't changed - all that has happened is
a TOTALLY NEW PROCESS with root privs has been spawned.
Here's something else to ponder, when I start "System Settings" with the time
and date module as a normal user the process tree looks like this:
kdeinit───systemsettings
Now have a look what happens when I hit the "Administrator Mode" button:
kdeinit───systemsettings───kdesu─┬─kdesu_stub
└─kdesu_stub───kcmshell
All that is happening is that "systemsettings" is launching a TOTALLY NEW
PROCESS inside it's own window, using kdesu, that has root privs :)
Hope that explains it a little better. I guess the konqueror developers
*could* add a "Administrator Mode" button to konqui that does similar magic
to the system settings module. Maybe go to "bugs.kde.org" and log a
wish-list item. If it gets enough votes, it might be added as a new
feature :)
Feature requests are an important part of the F/OSS development model. It's a
great opportunity for the developers to hear from their own users about what
they like and don't like. No wanky "focus groups" behind closed door al la
M$ and their ilk ;)
Cheers
James
--
An apple every eight hours will keep three doctors away.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20060531/6fcb77ff/attachment.sig>
More information about the kubuntu-users
mailing list