[mythtv-users] sudo nice --5 xine Permissions?

Jon Boehm boehm100 at comcast.net
Mon Aug 20 21:12:39 UTC 2007


So your example is the equivalent of

nice --5 ls -lR /

likewise
nice --5 /usr/bin/xine -pfhq --post tvtime:method=Greedy2Frame 
--no-splash dvd:/

would turn into
nice(-5);
execl("/usr/bin/xine", "xine", "-pfhq", "--post", 
tvtime:method=Greedy2Frame", "--no-splash", "dvd:/", NULL );

Do I have that right?

Jon

Joe Ripley wrote:
> On 8/20/07, Jon Boehm <boehm100 at comcast.net> wrote:
>> That stinks.  I need to wrap the script in an executable??  I've no idea
>> how to do that.
> 
> Try this:
> 
> #include <stdio.h>
> #include <unistd.h>
> 
> int main(void) {
>     nice(-5);
>     ("/bin/ls", "ls", "-lR", "/", NULL );
> 
>     return 0;
> }
> 
> Change the code to whatever you want to run.  Then, compile with:
> gcc wrapper.c -o wrapper
> 
> chown root.root wrapper
> chmod 4755 wrapper
> 
> Then it should work.  No need to use nice if you don't want to... the
> nice() function should set the priority properly.  My quick test was
> using 'ls', not sure if this will cooperate with xine.
> 


More information about the mythtv-users mailing list