Is your feature request related to a problem? Please describe.
Running Gamescope and other X/Xwayland apps that make a new X server inside of distrobox ATM require you to
Describe the solution you'd like Flatpak works around this by applying an overlayfs, and I believe that Distrobox can do the same.
Describe alternatives you've considered
N/A AFAIK, aside from the standard
chown, which isn't a good idea imo.
this could be really interesting, do you have any pointer to what flatpak does?
I don't know if we can overlay the same file over itself with different permissions :thinking: but if it's possible it would be really interesting to explore
All I know is that flatpak applies some form of overlay to the X sockets for new servers, I'm not sure on how exactly they mitigate some potential issues. I'll have to look more into that and find where in the source code it applies the overlayfs.
This seems to be a podman problem, docker does not have this issue, i can run gamescope without a problem using docker. Apparently there is a solution for this here https://github.com/containers/podman/discussions/13040, but its beyond my knowledge implement this.
Docker doesn't have this issue because it's containers run with root access -- podman runs rootless.
I doubt that a podman distrobox container would have any issues with making a new X servers if it's running as root.
distrobox create --name archtest --image archlinux:latest --init-hooks "install -o 1000 -g 1000 -d /tmp/.X11-unix-$(cat /etc/hostname)-upper;install -o 1000 -g 1000 -d /tmp/.X11-unix-$(cat /etc/hostname)-work;mount -t overlay -o lowerdir=/tmp/.X11-unix,upperdir=/tmp/.X11-unix-$(cat /etc/hostname)-upper,workdir=/tmp/.X11-unix-$(cat /etc/hostname)-work overlay /tmp/.X11-unix"
Threw this together, can confirm gamescope works just fine now and nothing else seems to mind.