From: shendrix@pcs.cnu.edu (Shannon Hendrix) Subject: Trouble with vgalib demo program Date: 8 Oct 1993 10:58:24 -0400
pdrap@ctp.com (Patrick Draper) writes:
>Hi,
>I've got a problem with the demo program that shows off the vgalib
>graphics routines.
>I can't use it unless I'm root. If I'm logged on as a user, then it
>gives me an error saying it can't use the device or something.
>I don't want to write graphics programs when I'm logged on as root, so
>what should I do?
When I asked this question several months ago, I got the answer that
one really must be root to do svgalib/vgalib program development.
What Linux needs is the idea of "priviledged" libraries. In other
words, if a certain library call has "root" access then the kernel
will allow it access to things like the VGA card ports. IBM
mainframes have this kind of idea and it's pretty neat. The reason
IBM did it was so programmers could access parts of the system without
bothering the operators and yet they didn't have total access to the
machine. It's a good compromise that doesn't hurt security that much.
Of course, I doubt this is easy nor is Linux likely to get it... but
it's still a neat idea.
Surely there is a better way.. Someone just has to make it up.
Use a program like asroot which will run a command as root for any
user. Of course, the root user specifies exactly which commands can
be run with asroot (some versions... even the parameters). I guess
you'll just have to trust yourself... :) This program and variations
can be found here and there... I cannot remember a specific place right
now. Anyway, you just place an "asroot 4755 $(TARGET)" or something
like that in your Makefile and you should be just fine.
csh / shendrix@pcs.cnu.edu / Christopher Newport University