accessing the host's X server from inside chroot

Shane Ambler FreeBSD at ShaneWare.Biz
Thu Oct 10 03:24:33 UTC 2019


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 <me> /opt/devuan home/palemoon/palemoon
> 
> but I cannot get past the error
> 
> Error: cannot open display: :0.0
> 
> Running
> 
> sudo chroot -u <me> /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



More information about the freebsd-questions mailing list