From owner-freebsd-questions@freebsd.org Thu Oct 10 03:24:33 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D266140A6A for ; Thu, 10 Oct 2019 03:24:33 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 46pbzf5q7rz4Sy3 for ; Thu, 10 Oct 2019 03:24:30 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp14-2-122-15.adl-apt-pir-bras32.tpg.internode.on.net (HELO leader.local) ([14.2.122.15]) by ipmail06.adl2.internode.on.net with ESMTP; 10 Oct 2019 13:54:22 +1030 Subject: Re: accessing the host's X server from inside chroot To: Kostas Oikonomou , freebsd-questions@freebsd.org References: From: Shane Ambler Message-ID: <2592f6bf-6efd-5c3e-e7ce-72178ad7ce36@ShaneWare.Biz> Date: Thu, 10 Oct 2019 13:54:21 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46pbzf5q7rz4Sy3 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of FreeBSD@shaneware.biz has no SPF policy when checking 150.101.137.129) smtp.mailfrom=FreeBSD@shaneware.biz X-Spamd-Result: default: False [3.93 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[129.137.101.150.rep.mailspike.net : 127.0.0.18]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ShaneWare.Biz]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.64)[0.638,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[129.137.101.150.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_LONG(0.97)[0.972,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[att.net]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(1.32)[ip: (2.78), ipnet: 150.101.0.0/16(2.51), asn: 4739(1.30), country: AU(0.01)]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2019 03:24:33 -0000 On 9/10/19 10:15 am, Kostas Oikonomou wrote: > I am running FreeBSD 12.0p10. Using chroot, I am trying to run a browser > (palemoon) located in /opt/devuan, which contains a Devuan Linux distribution > installed with 'debootstrap'. My objective is for the browser to use the host's > (FreeBSD) > X server, not the Devuan one. > > I've added my FreeBSD user name as a Devuan user, home in /opt/devuan/home. > Now I try things like > > sudo chroot -u /opt/devuan home/palemoon/palemoon > > but I cannot get past the error > > Error: cannot open display: :0.0 > > Running > > sudo chroot -u /opt/devuan home/palemoon/palemoon --help > > works, and produces the expected text output. > > I've tried things like "xhost +" and I've searched lots of mailing lists, but I > don't see any answer. Have you tried treating it like a remote machine? That is ssh into it and use xforwarding. I expect that would require using jail not chroot. -- FreeBSD - the place to B...Software Developing Shane Ambler