[mythtv-users] mythshutdown: Could not initialize myth context. Exiting.

Ashley Bostock abostock at gmail.com
Sat Feb 16 19:40:52 UTC 2008


On 16/02/2008, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>
> On 02/16/2008 01:01 PM, Paul Harrison wrote:
> > Ashley Bostock wrote:
> >
> >> In mythwelcome if I bring up the menu and choose the "Shutdown Now"
> >> option, nothing happens (used to work) and in the mythwelcome log I
> >> get this...
> >>
> >> mythshutdown --startup returned: 1
> >> mythshutdown: Could not initialize myth context. Exiting.
> >>
> >> I've seen people talk about it is due to the $HOME variable not being
> >> set, but running echo $HOME before starting mythwelcome does output
> >> the correct directory.  I've also tried adding sudo -H to every place
> >> I can find which runs mythshutdown but that makes no difference either.
> >>
> >> My auto shutdown/wake up is working perfectly still, so it's only the
> >> "Shutdown Now" option that's broken.
> >> Is it working for anyone else?
> > It's probably something to do with the way mythwelcome does the
> > shutdown. The command it uses is hardcoded to this:-
> > system("sudo " + m_installDir + "/bin/mythshutdown --shutdown")
> >
> > Not sure at this stage why some people are suddenly having problems, my
> > parents machine has been running mythwelcome/mythshutdown for well over
> > 2 years now with no problems although they are still running svn that is
> > probably 6 months old now. Most problems can be traced to the user not
> > having things setup right but if it was working and now isn't then I
> > suspect the new auto-discovery stuff may have a hand in it.
>
> Exactly!  Fix the environment in which mythwelcome/mythshutdown is
> executed to have a properly-exported HOME directory and everything will
> work.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


Thanks for the info.  Any pointers on what a "properly exported HOME
directory" requires?

If I type export, I can see HOME listed and set to the correct value.
If I type echo $HOME, it shows the correct value.  But then running sudo
mythshutdown, gives me the error.

I accept my system configuration is broken, but it's a stock Ubuntu install
so if I can get some help in figuring out what needs to be fixed, then I'm
sure it'll save a lot of threads like this from others when 0.21 gets
released to the masses.

Cheers,
Ash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080216/48e4f6b9/attachment.htm 


More information about the mythtv-users mailing list