Support for Wayland host
Opened this issue · 1 comments
The script will probably fail if the host is using Wayland instead of X11.
Graphical system can be detected using loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type
I do not plan relying on Wayland anytime soon, any feedback is welcome.
I'm running a Wayland host, and I can get wine to draw on my host's screen after doing a few modifications.
First, docker is aliased to podman in my bashrc: alias docker=podman
since I don't have docker installed.
Second, I removed the --privileged
flag and added these options: opts="${opts} --security-opt label=disable --uidmap 1000:0:1 --uidmap 0:1:1000 --uidmap 1001:1001:64535"
as suggested here: https://discussion.fedoraproject.org/t/how-can-i-use-podman-to-run-a-wayland-app/1672/6
Podman --uidmap
option is explained here: docs.podman.io/en/latest/markdown/podman-run.1.html
If you don't do this with a rootless podman host, you get this error among many others:
012c:err:explorer:initialize_display_settings Failed to query current display settings for L"\\.\DISPLAY1".
The problem arises because the wine user doesn't have permissions to the X11 X0 socket:
wine@chowder:~$ ls -l /tmp/.X11-unix/
total 0
srwxr-xr-x. 1 root root 0 Dec 27 16:11 X0
srwxr-xr-x. 1 root root 0 Dec 27 16:11 X1
srwxr-xr-x. 1 nobody nogroup 0 Dec 27 16:11 X1024
srwxr-xr-x. 1 nobody nogroup 0 Dec 27 16:11 X1025
After changing above, the permissions are fixed, and I can run winecfg
and get wine to paint on the host's screen through the socket (although, I'm still having MTGO issues, but that's another issue):
wine@chowder:~$ ls -l /tmp/.X11-unix/
total 0
srwxr-xr-x. 1 wine wine 0 Dec 27 16:11 X0
srwxr-xr-x. 1 wine wine 0 Dec 27 16:11 X1
srwxr-xr-x. 1 nobody nogroup 0 Dec 27 16:11 X1024
srwxr-xr-x. 1 nobody nogroup 0 Dec 27 16:11 X1025