[mythtv-users] Startup Frontend via SSH

Michael T. Dean mtdean at thirdcontact.com
Mon Jul 28 16:02:21 UTC 2008


On 07/28/2008 11:52 AM, David Brieck Jr. wrote:
> On Mon, Jul 28, 2008 at 11:51 AM, David Brieck Jr. wrote:
>   
>> On Mon, Jul 28, 2008 at 11:44 AM, Michael T. Dean wrote:
>>     
>>> On 07/28/2008 11:40 AM, David Brieck Jr. wrote:
>>>       
>>>> Until very recently (when I upgraded my Ubuntu box), I had a very nice
>>>> script setup so that I could remotely (re)start the frontend on one of
>>>> my machines. Since the upgrade though, this doesn't seem to work
>>>> either locally or remotely. Any idea what I'm missing or what changed?
>>>>
>>>>
>>>> #!/bin/bash
>>>> export DISPLAY=:0
>>>> killall mythfrontend.real
>>>> killall irexec
>>>> nohup irexec&
>>>> nohup mythfrontend&
>>>>         
>>> Any errors?  Any log output indicating problems (like missing HOME or
>>> something)?  Might need to add -l /path/to/logfile to your mythfrontend
>>> command line to see log output.
> Correction, here is the output:
>
> Xlib: connection to ":0.0" refused by server
> Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> xprop:  unable to open display ':0'
> usage:  xprop [-options ...] [[format [dformat]] atom] ...
>
> where options include:
>     -grammar                       print out full grammar for command line
>     -display host:dpy              the X server to contact
>     -id id                         resource id of window to examine
>     -name name                     name of window to examine
>     -font name                     name of font to examine
>     -remove propname               remove a property
>     -set propname value            set a property to a given value
>     -root                          examine the root window
>     -len n                         display at most n bytes of any property
>     -notype                        do not display the type field
>     -fs filename                   where to look for formats for properties
>     -frame                         don't ignore window manager frames
>     -f propname format [dformat]   formats to use for property of given name
>     -spy                           examine window properties forever
>
> Xlib: connection to ":0.0" refused by server
> Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> mythfrontend.real: cannot connect to X server :0
>
> How do I set magic cookies?

With "export DISPLAY=:0" being executed on the remote host, you won't 
want to (i.e. the magic cookies are set appropriately for the user 
starting X when X is started).

Things that could cause this:
    - using a different user to start X and to ssh
    - having an invalid HOME (i.e. so the proper ~/.Xauthority isn't found)
    - having an XAUTHORITY environment variable that refers to some 
incorrect authority file
    - ssh's setting up X forwarding (use -x (lowercase) to prevent), 
which would create a different authority file

Mike


More information about the mythtv-users mailing list