37 lines
914 B
Bash
Executable file
37 lines
914 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# X Sommelier (will listen on :1)
|
|
echo "Starting X11 Sommelier"
|
|
sommelier --display=wayland-0 --xwayland-path=/usr/bin/Xwayland \
|
|
-X --glamor --x-display=1 --xwayland-gl-driver-path=/usr/lib/dri \
|
|
--force-drm-device=$WM_RENDER_NODE --direct-scale --noop-driver sleep infinity &
|
|
SOMMELIER_X=$!
|
|
|
|
for i in $(seq 1 5); do
|
|
[ -S /tmp/.X11-unix/X1 ] && break
|
|
sleep 1
|
|
done
|
|
|
|
if [ ! -S /tmp/.X11-unix/X1 ]; then
|
|
echo "X Sommelier did not start"
|
|
exit 1
|
|
fi
|
|
|
|
# Wayland Sommelier (will listen on wayland-1)
|
|
echo "Starting Wayland Parent Sommelier"
|
|
sommelier --display=wayland-0 --socket=wayland-1 --force-drm-device=$WM_RENDER_NODE --noop-driver --parent &
|
|
SOMMELIER_WL=$!
|
|
|
|
for i in $(seq 1 5); do
|
|
[ -S /xdg_runtime/wayland-1 ] && break
|
|
sleep 1
|
|
done
|
|
|
|
if [ ! -S /xdg_runtime/wayland-1 ]; then
|
|
echo "Wayland Sommelier did not start"
|
|
exit 1
|
|
fi
|
|
|
|
wait $SOMMELIER_X
|
|
wait $SOMMELIER_WL
|