[mythtv-users] start mythfrontend through ssh

Tom Dexter digitalaudiorock at gmail.com
Sat Sep 1 14:51:41 UTC 2007

On 8/31/07, Mitch Gore wrote:
> Hi,
> I always want to be able to restart the FE when i am ssh'ed into the myth
> box.  how can i do that?  I can kill mythfrontend with killall mythfrontend.
>  Now how to do start mythfrontend on display 0.
> thanks,
> Mitchell

What I do may be similar to what you're trying to accomplish...that is
being able to stop and start the frontend remotely.  I use a method
that, if I remember correctly, I saw suggested on the Gentoo forums.

I have my frontend machine setup to automatically start mythfrontend
at boot time (and respawn it if needed, if for example you hit
Ctrl-Alt-Backspace) by changing the terminals section of my
/etc/inittab as follows:

c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty 38400 tty6 linux
c6:2345:respawn:/usr/bin/openvt -fwc 2 -- /bin/su - mythtv -c
/usr/bin/startx > /dev/null

...so terminal 6 always su's to the mythtv user and runs startx.  The
.xinitrc for the mythtv user (/home/mythtv/.xinitrc) looks like this:

# .xinitrc
[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l
/usr/bin/xset s noblank
/usr/bin/xset s off
/usr/bin/xset -dpms
/usr/bin/evilwm &
exec /usr/bin/mythfrontend -l /var/log/mythtv/mythfrontend.log -v

That would be different depending on the window manager you're using.

If I ever want to stop it without having it restart, I first comment
out the c6 line in inittab, and then enter:

init q

...to make init reload the inittab.  The either killing it, or just
exitting from the frontend itself will not respawn it.  When I want to
start it again, I just uncomment it, and enter 'init q' again, and the
frontend starts.

I really like the setup.


More information about the mythtv-users mailing list