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

Michael T. Dean mtdean at thirdcontact.com
Sat Feb 16 18:04:10 UTC 2008


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


More information about the mythtv-users mailing list