[mythtv-users] Problem with wife-friendly feature

Brian LeFevre blefevre at ida.net
Mon Dec 6 05:47:58 UTC 2004


Phill Edwards wrote:
> I've been trying to get the wife-friendly power button to work. I found 
> that creating a symlink in .kde/AutoStart to irexec wasn't working for 
> me, so I put this line in /etc/rc.local:
> 
> irexec --daemon /home/mythtv/.mythtv/lircrc
> 
> Problem is that I can't get the script to start mythfrontend. I can get 
> it to kill it and I know the shell script is getting executed because of 
> that and because I'm echoing some stuff to a /tmp file from it. My shell 
> script looks like this:
> 
> #!/bin/bash
> PROG=/usr/bin/mythfrontend
> STATUS=`ps -e | grep mythfrontend | grep -v grep | wc -l | awk '{print 
> $1}'`
> if [ $STATUS -eq 0 ]
> then
>    ( $PROG & )
> else
>    killall $PROG
> fi
> echo "mythrestart.sh executed at `date`" >> /tmp/mythrestart.log
> echo "STATUS = $STATUS" >> /tmp/mythrestart.log
> /usr/bin/mythfrontend
> exit 0
> 
> When mythfrontend is running it correctly kills it, but when it's not 
> running it doesn't start it up and I don' t understand why. One other 
> point that may be relevant here is that when this gets executed 
> mythbackend resets its idle timer which I presume means it thinks it saw 
> a frontend connect - but where is the frontend, 'cos I can't see it?


do a /usr/bin/mythfrontend >somelog

or even (for stderr)
/usr/bin/mythfrontend 2>&1 >somelog

My bet is that is is not running in X so it won't open up the file.  Try 
setting the display
export DISPLAY=0:0
you may need to have xhost set correctly.

Good luck


More information about the mythtv-users mailing list