Subject: Re: Practical forwarding problem

From: Nicolas Williams <[email-masked]>
Date: Thu, 1 Dec 2005 11:05:39 -0600

On Thu, Sep 22, 2005 at 08:47:55PM -0400, der Mouse wrote:
> Thoughts, anyone?

It's a race, and there isn't much you can do about it as it is, but...

...why are you doing this in the first place?  Why start the X11
application in the background and with stdio redirected to something
other than the exec channel's pipe/whatever?

Those two things cause the channel close to race with the applications
X11 display open.  If you don't do either of those two things the
problem goes away.

The OpenSSH client has a "-f" option that is supposed to be useful for
this sort of thing, but it isn't because it forks too soon to provide
feedback about errors in starting the app -- it forks after userauth.

A client option like "-f" but which causes the client to fork into the
background after a specified event other than userauth completion (e.g.,
X11 channel opens, agent channel opens, etc...) would be better.

Then you could fire off X11 apps on remote hosts and get feedback if
there's errors or silence once the app successfully opens the forwarded
display.

Cheers,

Nico
--