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

Re: Running processes unniced as a normal user.

Hello Mike!

At Thursday 24 July 2003 22:50 Mike Mestnik wrote:

> I was hoping there was an easy unix(debian,posix) way of doing this.
>  Running processes unniced as
> a normal user.  AFAIN I need to be suid0 for this, but I can't find
> any examples in yahoo.
> The problem is that I'm using ANDeamon that puts gkrellm at
> 15(nice:), this is what I like.  What
> I don't like is an exec xmms from the niced gkrellm.  This causes
> xmms to be unusable(as exec
> keeps the nice), it must be not nice and RTS even.  A nice value of
> 0 is needed for xmms ALL WAYS.
>  Thankfully you also need to be in group audio to use xmms, so I
>  don't mind uses in that group to
> initially run xmms suid0.
> Problem 1: I can't just use a shell script suid0 to renice and drop
> privs.  I'm told this is wrong, I have no reason to question this.
> Problem 2: There is no util currently available that I know of that
> deals with this.  su, nice,
> renice, and the like don't touch it.  Non of them have a config like
> sudo saying who and when can nice what.
> Problem 3: I could not find any example of sudo doing this.
> Caveats: I only wont to be nice 0, that's all.

You could setup sudo to allow this and only this type of invocation:
renice 0 -p $(pidof xmms)
and run it after starting xmms.

See the man pages for further info.


Reply to: