On Mon, May 03, 2021 at 06:00:41AM +0200, u/Rogu3_AI wrote:
> Hi, I have successfully populated a chroot with 69 filesets. You
> can refer to https://www.reddit.com/r/openbsd/comments/n2k475/chroot_help/
> to know what I'm talking about. My question is after successfully
> entering my chroot environment how can I forward x11 apps to to the
> hosts Xephyr window. I have successfully opened up a Xephyr window
> on the host 'Xephyr -ac :1 &'. Whenever I run 'DISPLAY=:1 xlock'
> inside the chroot it fails to open the display > ' Error: Can't
> open display: :1'. Kindly please correct if I'm wrong or refer to
> a source of information please.
DISPLAY=:1 is short hand for connecting via the Unix socket
"/tmp/.X11-unix/X1".
That will only works if both the X server and applications run in
the same base filesystem.
If you chroot the application and not Xephyr, then the application
cannot found the unix socket.
It is possible to make Xephyr (and all the other Xservers) listen
on a TCP socket like in the old days with:
Xephyr :1 -listen tcp -ac &
This will allow you to use "DISPLAY=127.0.0.1:1" for your x
applications. (And no other IP than 127.0.0.1 on OpenBSD.)