Date: Wed, 2 Mar 2005 12:31:12 +0100 From: Alexander Leidinger <Alexander@Leidinger.net> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-amd64@freebsd.org Subject: Re: X in a chroot Message-ID: <20050302123112.z9rninqg8o84ksks@netchild.homeip.net> In-Reply-To: <200503011720.50369.jhb@FreeBSD.org> References: <863bvfgifo.fsf@customer-mpls-23.cpinternet.com> <200503011720.50369.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050302123112.z9rninqg8o84ksks>