From owner-freebsd-emulation@FreeBSD.ORG Wed Mar 2 11:32:21 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FA1B16A4CE; Wed, 2 Mar 2005 11:32:21 +0000 (GMT) Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D9F643D49; Wed, 2 Mar 2005 11:32:20 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd27.aul.t-online.de by mailout03.sul.t-online.com with smtp id 1D6S5S-0005yZ-04; Wed, 02 Mar 2005 12:32:18 +0100 Received: from Andro-Beta.Leidinger.net (Ze2G8EZe8eOgA7oNQFDkkoZVi9tQ8ASpZupIaH393oAQwQTxCO1xor@[217.83.27.180]) by fwd27.sul.t-online.de with esmtp id 1D6S5C-1cOm7E0; Wed, 2 Mar 2005 12:32:02 +0100 Received: from localhost (localhost [127.0.0.1])j22BVCet059078; Wed, 2 Mar 2005 12:31:12 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from 141.113.101.32 ([141.113.101.32]) by netchild.homeip.net (Horde) with HTTP for ; Wed, 2 Mar 2005 12:31:12 +0100 Message-ID: <20050302123112.z9rninqg8o84ksks@netchild.homeip.net> X-Priority: 3 (Normal) Date: Wed, 2 Mar 2005 12:31:12 +0100 From: Alexander Leidinger To: John Baldwin References: <863bvfgifo.fsf@customer-mpls-23.cpinternet.com> <200503011720.50369.jhb@FreeBSD.org> In-Reply-To: <200503011720.50369.jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.2) / FreeBSD-4.11 X-ID: Ze2G8EZe8eOgA7oNQFDkkoZVi9tQ8ASpZupIaH393oAQwQTxCO1xor@t-dialin.net X-TOI-MSGID: 5097b526-4a98-4ee8-a597-2144367a9479 cc: freebsd-emulation@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: X in a chroot X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2005 11:32:21 -0000 John Baldwin wrote: > On Tuesday 01 March 2005 04:33 pm, Michael D. Harnois wrote: >> Shut my mouth and call me stupid, but I cannot for the life of me >> figure out how to run X programs inside a /compat/linux chroot on an >> amd64. No matter what I try, I get >> >> cannot open display: :0 X11 tries to open the display over an unix domain socket. If the server is in a chroot, then it's in the chroot /tmp dir. You can try to set the DISPLAY variable to "localhost/tcp:0" or "localhost:0". You X server needs to listen on TCP connections for this. > Maybe need to copy or nullfs mount /tmp/.X11-unix and friends into > /tmp in the chroot. A copy doesn't help, since it contains an unix domain socket. Doing a nullfs mount in the proposed direction helps when a X11 program is run in the chroot. If the linux program is just started normaly (without calling chroot(8)), another workaround is to remove /compat/linux/tmp (f it exists), this way the program should see the FreeBSD /tmp directory instead of /comapt/linux/tmp. If the X Server is run in a chroot (and a program not in the chroot has to connect to it), the nullfs mount has to be the other way around or a symlink into the chroot should be provided which does the same in this case. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 The penalty for laughing in a courtroom is six months in jail; if it were not for this penalty, the jury would never hear the evidence. -- H. L. Mencken