[mythtv-users] how to get root to start mythfrontend

Paul Andreassen paulx at andreassen.com.au
Sat Jan 15 09:59:40 EST 2005


Hi,

I've gotten Mythtv to shutdown and wakeup at the correct times using
nvram-wakeup.  Now I would like mythfrontend to start if I press the
power button.  My problem is mythfrontend wont start as root, even if I
su to the logged in user.  The error message is "mythfrontend: cannot
connect to X server".  How do I get X window access?

  FROM mythstartup.sh
#!/bin/bash
now=$(date +'%s')
wakeup=$(< /var/lib/mythtv/wakeup.time)
if (($now < $wakeup)); then
echo "booted before wakeup time so starting frontend"
( sleep 45; su paul -c /usr/bin/mythfrontend ) &
fi

Paul




More information about the mythtv-users mailing list