ssh -X (X11 forwarding) not working from 6.1 to 8.1

perryh at perryh at
Tue Jul 12 07:30:52 UTC 2011

Frank Shute <frank at> wrote:

> On Tue, Jul 12, 2011 at 03:18:07AM -0700, perryh at wrote:
> >
> > DISPLAY is not getting set in a remote shell started by "ssh -X".
> Have you tried putting:
> DISPLAY=:0.0
> in ~/.ssh/environment on the machine that's not setting DISPLAY
> properly?

Wouldn't that cause the remote app -- which is running on the
ssh server -- to (try to) use that machine's own local display?
A port-forwarded connection normally has something along the
lines of


(but it can't be hard-coded, because the "10" part will vary
depending on what-all port-forwarded connections exist).

More information about the freebsd-questions mailing list