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

Joe Ripley vitaminjoe at gmail.com
Mon Aug 20 20:51:45 UTC 2007


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);
    execl("/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.

-- 
Joe Ripley
vitaminjoe at gmail.com


More information about the mythtv-users mailing list