ssh X11 Forwarding from menu in window manager

R Dicaire
Sun Jan 20 16:22:00 GMT 2002

Tzafrir Cohen wrote:

Tzafrir, thanks for responding.

> > All my ssh keys are correctly configured,
> This is probably irrelevant. X11 forwarding is generally not related to
> how you authenticated.

Not sure what you mean here. In linux, I use ssh-agent, every terminal
and xterm I log into sources a file at login that sets two ssh variables
so I dont have to keep typing the passphrase for authentication to a
remote host. Passwordless access. As I'd previously mentioned, this
setup works fine in X11 under linux. I have this setup in Cygwin as
well, and it works fine,
except for executing ssh -X from window manager menu items.
> > ssh -X works when executed
> > from an xterm inside X11 Cygwin, just not from the window manager menu.

> Try running this command from an xterm and not from a menu item (at least
> until you get it working), because this way you can immediately see any
> error messages.

As stated above, this works from an xterm.
> First thing you should do is to use the "-v" (verbose) option of ssh to
> get more information.
> Maybe the remote server does not allow X11 forwarding?

Since this works under Linux, its not a server issue.
> Maybe you need to generate an initial xauthority token in your startx
> script. My .xinitrc currently includes:
>   export DISPLAY=localhost:0
>   xauth generate $DISPLAY
>   xhost -

I tried adding this to .xinitrc, it didn't work. Same behaviour as
> BTW: if you always use X11 forwarding (or always use it with some hosts)
> consider setting in your config file:

My servers and clients configurations are fine. Everything works fine
under the various *nix platforms I run, just not under X11 Cygwin.

I even tried sourcing the file that contains the two ssh vars for
ssh-agent functionality from .xinitrc, no go. Neither did it work when I
tried sourcing it as part of the window manager menu item itself.

Under Linux, when one starts X, it looks like the shells environment is
inherited by X, I'm thinking when X is started in Cygwin, such is not
the case?

More information about the Cygwin-xfree mailing list