Re: A Few Ideas



On Fri, 18 Sep 1998, Haukur Hreinsson wrote:

> >> 1.  Add the ability to run programs as processes
> >>     under other user names, like "root" from another
> >>     account.  A right-button click over a program
> >>     icon could bring up dialog to specify the user
> >>     and password.
> 
> >
> >An interesting idea.  This could be useful at times, but I, personally,
> >would just as well su from an Eterm and run my program.
> >
> 
> I would like this functionality, and more. Demanding that ppl open up a
> terminal window and issue "cryptic" (sorry, people _will_ think so) commands
> to do this is a cop-out. It should be possible through the visual interface.
> 
> I have recently chosen a new root password, this time picking a good one
> using spwgen 8. It takes a while to type though, and I'd only like to do it
> once per session. That's easily acheivable by having one root terminal
> window (regardless of whether you start it through something that asks for a
> username and password, or you just start a normal one and su -). But then,
> whenever I want to run something as root, I have to do it through the term.
> What, then, is the point of having such programs accessible through the
> menus? Also, chances are I'll have to switch desktops to get to the terminal
> window and then I'll have to either a) wait until the program window appears
> and drag it to the desktop I want or b) race to the intended desktop before
> window appears.
> 
> What I would like is program that sits on the desktop or panel and runs
> executables that are dropped onto it (from the menus or gmc or whereever)
> under its own userid. That way you can start one of these things as root and
> use it from there on as a root-program-factory of sorts.
> 
> What do others think about this?

I have a few thoughts on this whole issue:

There are not that many programs I ever run as root. But when I *do* want
to, I invariably forget to su before starting it, and then I get a cryptic
error when I don't have the permissions to do whatever it is I'm trying to
do. This, for me, is quite irritating, since I have to quit the program,
su, then wait for it to start again. Ideally a program would make it
obvious when I don't have the permissions to do what I'm trying to do and
would prompt me for the root password. Now, I don't know a whole lot about
POSIX programming, but I would guess that a running process would not be
able to change the user it runs as, so the only way to make this work is
if the process providing the interface forks off a "worker" process to do
the real work (which isn't all that bad an idea anyway). So under this
scheme, before forking the worker process, it checks whatever resource its
working on for permission to do whatever it's trying to do as whatever
user it's doing for. If it does not have the necessary permissions, it
tells the user something to that effect (providing a "Huh?" button which
brings up information about Unix permissions for newbies) and asks for the
root password (or a user name and password, I suppose) or lets you cancel
the action. As an extra bonus, if you cancel (presumably because you don't
*have* the root password) it could offer to create a boilerplate email
message to root asking them to do whatever it is you were trying to do,
though I'm not so sure about this part.

Additionally, it would be useful to have an applet which gets a user name
and password, and then puts that user's program menu in your panel. I
think this is the graphical analogue of su at the shell. So if I run the
applet as root, I get root's foot menu in my panel next to my own, and any
programs I run from that menu get run as root. Obviously there's going to
have to be some visual distinction between the menus, but that's a detail.

And speaking of visual distiction, programs run as the super user really
should be noticibly marked as such. This could be a simple matter of root
setting up their gtkrc so that e.g., all of the controls have a red
background, but it would be nice if GNOME programs could automatically
detect if they're running as root and do something different by default.
What that different thing is could be themable.

Tim Moore




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]