[mythtv-users] Starting up mythfrontend automatically?

Cymen Vig cymenvig at gmail.com
Mon Dec 26 20:58:19 EST 2005

On 12/26/05, Piers Kittel <mythtv at biased.org> wrote:
> OK that sounds good to me.  But how to do that? :)

Start X and "x11vnc" so I can interact with MythTV remotely with VNC viewer:

x:12345:respawn:/bin/su - mythtv -c /home/mythtv/startup.sh
vnc:12345:respawn:/bin/su - mythtv -c 'sleep 2 && x11vnc -forever
-rfbport 5900 -rfbauth ~/.vnc/passwd'

startup.sh (remember to "chmod +x" it to make it executable):
startx &
sleep 3
export DISPLAY=:0.0
/usr/bin/mythfrontend -l /var/log/mythtv/frontend.log

Finally, here is my ~mythtv/.xinitrc
# Merge X resources from ~/.Xdefaults
[ -f $HOME/.Xdefaults ] && xrdb $HOME/.Xdefaults

# Set the background and root cursor shape
xsetroot -solid black #\#400040
xsetroot -cursor_name top_left_arrow

# Start evilwm - snap to borders within 10 pixels
#/usr/bin/evilwm -snap 6 -bw 0 &
ratpoison &

/usr/X11R6/bin/xset s noblank &
/usr/X11R6/bin/xset s off &
/usr/X11R6/bin/xset -dpms &
#xterm &

export QT_XFT=1


#mythfrontend -l /var/log/mythtv/mythfrontend.log &
#/usr/local/bin/mythfrontend -l /var/log/mythtv/mythfrontend.log &

# sleep makes it so irxevent works
# uncomment these if you don't compile lirc into mythtv
#(set the lirc USE variable to compile lirc support into mythtv)
#sleep 3
#irxevent &

# when the window manager exits, allow the X server to be torn down
wait $wmpid

So it's a bit muddle and I could take it out of a script and put it
all in one line in the inittab but I prefer it like this (for simple
kiosk system at work I did move it all to the inittab but I like to
tinker with MythTV). With this setup, if you exit MythTV/X it will be
restarted by init in 3 seconds.

More information about the mythtv-users mailing list