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

Jon Boehm boehm100 at comcast.net
Mon Aug 20 23:40:41 UTC 2007

Thats really interesting.  Thanks for the lead.  I do this in a script 
so this might be a natural way of doing it.  I wonder if the & at the 
end of the xine command will properly allow for continued execution of 
the script.  If the & doesn't do it I might have to look into forking 
the script.  I might also have to sleep a few cycles while xine launches 
before grabbing the PID.

f=$(/bin/ps axu | /bin/grep mythfrontend | /bin/grep :0.0)
if [ "$f" ]; then

xine -pfhq --post tvtime:method=Greedy2Frame --no-splash dvd:/ &
PID=$(ps -C xine -o pid=)
chrt --verbose --fifo --pid 10 $PID
ionice -c1 -p $PID

Hmm, I reread you post again.  It look like I might have the same sudo 
problem.  I'll look into the sudo config file.


Andrew Burgess wrote:
>> I'm experimenting with DVD players that have dvdnav.  Currently xine is 
>> the front runner but I still get the occasional dropped frame even after 
>> increasing its buffer size.
>> So I want to try increasing its run time priority.  I have a script, 
>> dvd.sh, that  kicks off xine in the DVD Player field of Myth.  The OS is 
>> punting because of the "sudo nice --5."  How do I tell the OS that 
>> anyone can run dvd.sh and they don't need to be root to do this.
> I don't know how to do that for the script.
> But, perhaps of interest, I set xine to realtime priority to
> get it to work well on a busy server. I also set the i/o
> priority. "Works for me." (tm)
>   chrt --verbose --fifo --pid 10 $PID
>   ionice -c1 -p $PID
> I suppose you could run a little shell script daemon
> as root and look for xine processes periodically...
> or if you don't have multiple users to worry about just
> allow the owner of the myth process to sudo without a
> password, that's in the sudo config file.
> PS chrt and ionice are in the util-linux package.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

More information about the mythtv-users mailing list