Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Dec 2000 14:11:07 -0800
From:      Dima Dorfman <dima@bazooka.unixfreak.org>
To:        Wahyudi Gunawan <wgunawan92@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Cannot connect to X server 
Message-ID:  <20001217221112.313643E09@bazooka.unixfreak.org>
In-Reply-To: Message from Wahyudi Gunawan <wgunawan92@yahoo.com>  of "Sun, 17 Dec 2000 13:13:09 PST." <20001217211309.8709.qmail@web9403.mail.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I'd like to have my local xterm to be able to run 
> application from other UNIX machine (sun) and display
> it on my local machine.
> 
> My friend told me that I just need to run "xhost +" on
> local machine, telnet to the remote machine and run
> the apps.
> 
> I did that and verify that the DISPLAY is pointing to
> my local machine. It complain "Cannot connect to X
> server ....."

What else does it say?  Exact error messages help.  From the limited
information you did supply, the only thing I can think of would be to
make sure that the remote host can establish connections to the local
host.  In other words, make sure the local host isn't subject to any
address translation (NAT).

The approach you described, however, is suboptimal at best.  First,
you're using telnet--that can't be good.  Second, "xhost +"
effectively allows *any* host to display *anything* on your screen.
That might be okay if you're on an isolated network, but is generally
unacceptable on today's Internet.  A better solution would be to use
SSH and its TCP/X forwarding capabilities.  A typical session would
look like:

  localhost% ssh -X remotehost xterm

If both the local and remote hosts are configured to do X forwarding,
and the DISPLAY environment variable is set when you run ssh, it will
set up a corresponding entry on the remote host.  This allows for an
encrypted tunnel to run your X clients through.

My description of the ssh X forwarding method is overly simplistic.
It is meant to give you a general idea of what can be done.  If you
want to use it, please read the ssh(1) and sshd(8) manual pages.

Hope this helps

						Dima Dorfman
						dima@unixfreak.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001217221112.313643E09>