From owner-freebsd-questions Sun Dec 17 14:11:15 2000 From owner-freebsd-questions@FreeBSD.ORG Sun Dec 17 14:11:12 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 6DD9137B400 for ; Sun, 17 Dec 2000 14:11:12 -0800 (PST) Received: by bazooka.unixfreak.org (Postfix, from userid 1000) id 313643E09; Sun, 17 Dec 2000 14:11:12 -0800 (PST) Received: from bazooka.unixfreak.org (localhost [127.0.0.1]) by bazooka.unixfreak.org (Postfix) with ESMTP id 300A33C109; Sun, 17 Dec 2000 14:11:12 -0800 (PST) To: Wahyudi Gunawan Cc: freebsd-questions@freebsd.org Subject: Re: Cannot connect to X server In-Reply-To: Message from Wahyudi Gunawan of "Sun, 17 Dec 2000 13:13:09 PST." <20001217211309.8709.qmail@web9403.mail.yahoo.com> Date: Sun, 17 Dec 2000 14:11:07 -0800 From: Dima Dorfman Message-Id: <20001217221112.313643E09@bazooka.unixfreak.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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