0

I am trying to install Brave browser inside an LXD container (Voidlinux - preferably, or linuxMint), create a shortcut for that app inside my host OS and launch it as any other linux app with the exception that it will run inside a container. I am not sure how to configure the display part or lxc profile on my non-ubuntu host OS.

Tries these tutorials with no success:

https://blog.simos.info/running-x11-software-in-lxd-containers/

например,

environment.PULSE_SERVER: unix:/home/ubuntu/pulse-native
connect: unix:/run/user/1000/pulse/native
listen: unix:/home/ubuntu/pulse-native

what can I replace ubuntu and user with in a Gentoo distro?

lxc exec mycontainer -- sudo --user ubuntu --login 

that isn't working in voidlinux container.

1 Answer 1

1

Didn't click the link, but you'll need to get the X server's unix domain socket into the container to get the container to run the X11 app.

So,

  1. configure the lxc configuration to copy the host X11 socket into the container

  2. If the socket is an abstract unix socket, configure X to use a unix domain version

  3. copy the socket into a non /tmp directory, the /tmp directory gets wiped clean after lxc copy operations, so the socket disappears.

  4. move the socket to the /tmp directory, where X11 usually puts it

  5. export DISPLAY=:0 in the user shell

You probably should be aware that this provides only filesystem, process isolation from the other parts of the host, but X11 itself doesn't provide separation between apps and the desktop view.

1
  • Thanks but I am rather a newbie in those things so I am not sure in the details, how to do that for each step.
    – CodeGust
    Oct 27, 2021 at 10:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .