[mythtv-users] Auto-start mythfrontend

myth at fsck.ch myth at fsck.ch
Tue Jan 6 14:39:45 EST 2004


On Tue, Jan 06, 2004 at 02:17:53PM -0500, Preston Crow wrote:
> What's the right way to auto-start mythfrontend at boot time?

for gentoo, the simplest is something like this, avoiding the overhead
xdm and possibly a windowmanager introduces:

video tmp # cat /etc/init.d/mythfrontend 
#!/sbin/runscript
 
depend() {
  need sshd
}

start() {
  ebegin "Starting X and mythfrontend"
  /bin/su - mythtv -c /usr/X11R6/bin/startx
  eend $? "Failed to start X/mythfrontend"
}

stop() {
  ebegin "Stopping X and mythfrontend"
  killall mythfrontend
  eend $? "Failed to stop X/mythfrontend"
}

together with the appropriate /home/mythtv/.xinitrc, which just contains
the string 'mythfrontend'.

of course, the 'need sshd' is nonsense, but i didn't quite figure out how
to make something like 'need mythbackend', and since sshd is started late
during the boot process, 'need sshd' works as well.

if someone could clarify how to do this more cleverly (off list), i'd be
very happy. the logical way imho would be either a 'need mythbackend' in
the above file, where 'mythbackend' refers to the filename of another
init.d script, or a 'provide mythbackend' line in the mythbackend script.
neither works.


More information about the mythtv-users mailing list