Previously, when I ran LXD via snap on Debian, running X11 applications in containers wasn’t easy but ti was doable.
I’ve since switched to Incus and am having a heck of a time following the old LXD instructions Blog Simos
Has anyone had success getting X11 within Incus up and runnig?
Specs:
Host: Debian 12
Guest: Ubuntu 22.04 (though I would prefer using Debian 12 in the container but Simos’ instructions seem pretty specific to Ubuntu guests)
Obviously, SNAP is not in play.
Errors within the container:
If profile is config’d as follows:
Now, one thing I don’t have is any special subguid or subuid mappings in part because I never had to mess with those when using LXD (due to SNAP handling that)
You usually want security.uid and security.gid to be set to your user’s uid/gid on the host.
That’s because most X servers these days control access based on the user credential of whatever connects to the socket. With your current configuration, that connection would happen as root (uid/gid 0) when the X server is most likely configured to only allow your current user to talk to it.
I decide on using a Debian 12 guest because I do not like how Ubuntu forces snap on you. The security gid and uid are correct for my daily driver user on the host as I used Active Directory on my host to manage access and identity. I created the “incus” user within the guest much like “ubuntu” exists in ubuntu containers.
I install Chromium and navigated to youtube to test audio but unfortunately its not working. Here is the output:
Oct 28 19:55:53 internet systemd[151]: pulseaudio.service: start operation timed out. Terminating.
Oct 28 19:55:53 internet systemd[151]: pulseaudio.service: Failed with result 'timeout'.
Oct 28 19:55:53 internet systemd[151]: Failed to start pulseaudio.service - Sound Service.
Oct 28 19:55:53 internet systemd[151]: pulseaudio.service: Scheduled restart job, restart counter is at 7.
Oct 28 19:55:53 internet systemd[151]: Stopped pulseaudio.service - Sound Service.
Oct 28 19:55:53 internet systemd[151]: Starting pulseaudio.service - Sound Service...
Oct 28 19:56:10 internet pulseaudio[203]: Daemon already running.
Oct 28 19:56:10 internet pulseaudio[203]: pa_pid_file_create() failed.
Oct 28 19:57:23 internet systemd[151]: pulseaudio.service: start operation timed out. Terminating.
Oct 28 19:57:23 internet systemd[151]: pulseaudio.service: Failed with result 'timeout'.
Oct 28 19:57:23 internet systemd[151]: Failed to start pulseaudio.service - Sound Service.
Oct 28 19:57:24 internet systemd[151]: pulseaudio.service: Scheduled restart job, restart counter is at 8.
Oct 28 19:57:24 internet systemd[151]: Stopped pulseaudio.service - Sound Service.
Oct 28 19:57:24 internet systemd[151]: Starting pulseaudio.service - Sound Service...
Any ideas?
Thank you!
EDIT: I made some edits to the profile as follows: