[mythtv-users] OT: Launch Mythfrontend remotely via ssh

Joseph A. Caputo jcaputo1 at comcast.net
Fri Feb 13 11:45:32 EST 2004


On Friday 13 February 2004 11:01, m0j0.j0j0 wrote:
> On Fri, 2004-02-13 at 09:09, Michael Segulja wrote:
> > Somebody correct me if there's a better way, but here's how I would
> > do it.
> >
> > Either telnet or ssh to your desktop machine from your laptop... I
> > would recommend ssh.  Once connected to the desktop machine, make
> > sure your display variable is set to the desktop.  At a command
> > prompt, type 'export DISPLAY=name.of.desktop:0.0'.  Then, simply
> > run mythfrontend and it will display and run on your desktop.  You
> > can then exit out of the ssh or telnet session and be back at your
> > laptop leaving mythfrontend running on your desktop.
> >
> > HTH,
>
> If you close your SSH session I believe any new processes (i.e.
> Mythfrontend) will be terminated. You could SSH in and run 'screen',
> followed by Mythfrontend. Screen will allow you to detach without
> terminating the frontend. Alternatively, you could just bounce X
> (killall X) if it is set to autologon and Myth is scripted to
> auto-start.


Actually, if you run an interactive SSH session with X-forwarding, when 
you exit the session it will wait for any X connections to terminate 
before returning you to your local shell prompt.  I don't believe it 
terminates background processes; that would be a property of the shell, 
not SSH per se.  IIRC, some shells have settings that change the 
behavior when you try to exit with running jobs that are associated 
with the current tty.  One correct way to start mythfrontend remotely 
with SSH is:

ssh -f <hostname> env DISPLAY=:<displaynum> <path-to-mythfrontend>

The '-f' option tells the SSH client to put itself in the background 
just before executing the command, but after prompting for your 
password or key.

-JAC



More information about the mythtv-users mailing list