# Install Xorg in a jail



## zader (Dec 14, 2016)

Hi all,

Just wondering if anyone has managed to install xorg in a jail using either cbsd or ezjail?

From what I understand there is some hardware interaction that prevents X from loading, I was hoping someone may know what kernel modules need to be compiled in order to get it to work?

sofar this is the only real explication I have found.. 

https://lists.freebsd.org/pipermail/freebsd-current/2013-May/041872.html

In terms of testing

I can install via ports or package on the host all day long, but the second I try and install from either  (ezjail / regular jail or cbsd) I get screen can not be found error. All of the configuration is identical and works without modifying anything. 

Thanks


----------



## getopt (Dec 14, 2016)

zader said:


> Just wondering if anyone has managed to install xorg in a jail


The state of wondering eventually could lead to some understanding. 

I'd ask myself why jailing Xorg is not so popular as you may have noticed? 

The purpose of FreeBSD jails is separating the jail in terms of filesystem and devices thus restricting access to the jail host. 

Now why would one do a lot of work punching holes in a jail making it of little use?

So, yes it is possible. But does it make much sense? 

Probably you are better of using a hypervisor for separating Xorg.


----------



## kpa (Dec 14, 2016)

Xorg needs an unrestricted access to the system memory to work at all, this will nullify any security benefits you would get from using jail. Not worth the trouble.


----------



## Purkuapas (Dec 20, 2016)

zader said:


> Hi all,
> 
> Just wondering if anyone has managed to install xorg in a jail using either cbsd or ezjail?
> 
> ...



CBSD ( https://www.bsdstore.ru/en/xorg_in_jail.html )  has patches ( https://github.com/cbsd/cbsd/tree/master/upgrade/patch/kmem-11.0 ) to run Xorg in jail, but I never tried


----------

