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 chown /tmp/.X11-unix

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.

0

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

0

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.

0

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.

0

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.

0

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.

1

@89luca89 Any thoughts on the overlay above? I'd be glad to open the PR if you think something similar to this is a workable solution.

Flatpak is using bwrap to do this same thing.

0
© 2022 pullanswer.com - All rights reserved.