LukeShortCloud / winesapOS

winesapOS - Game with Linux anywhere, no installation required!
GNU General Public License v3.0
871 stars 31 forks source link

[setup] Steam download pop-up appears #804

Closed LukeShortCloud closed 3 months ago

LukeShortCloud commented 4 months ago

KDE Plasma 6 defaults to the Wayland display server instead of Xorg. We want to move to this anyways. One problem this has is that we can no longer start a hidden background session of Steam during the first-time setup. That is used to automatically download the required bootstrap files for the Steam Gamescope session to work.

Related: https://github.com/LukeShortCloud/winesapOS/issues/742 Related: https://github.com/LukeShortCloud/winesapOS/issues/751 Related: https://github.com/LukeShortCloud/winesapOS/issues/782

LukeShortCloud commented 4 months ago

We are hiding the Steam download pop-up today by using a feature of X11 to run a detached display (via a detached tmux session so it does not log output to the first-time setup log file).

steam_bootstrap() {
    if [[ -f /usr/bin/steam ]]; then
        tmux new-session -d -s steam 'xvfb-run --auto-servernum steam'
    fi
}

steam_bootstrap

https://github.com/LukeShortCloud/winesapOS/blob/a8f638e96aca8e3758ae797ce1a3ee1b23fef2cd/scripts/winesapos-setup.sh#L124

LukeShortCloud commented 4 months ago

Red Hat has been working on a Wayland replacement for xvfb-run called xwfb-run.

https://lists.freedesktop.org/archives/wayland-devel/2023-November/043329.html

LukeShortCloud commented 3 months ago

xwfb-run is provided by the xwayland-run project.

https://gitlab.freedesktop.org/ofourdan/xwayland-run/-/blob/main/src/xwfb-run.py?ref_type=heads https://aur.archlinux.org/packages/xwayland-run-git

LukeShortCloud commented 3 months ago

I did a quick test. Notes so far:

https://tmux-users.narkive.com/6iQNRK60/need-tmux-to-inherit-and-pass-on-environment-to-a-subshell

LukeShortCloud commented 3 months ago

Oddly enough, I found the only reliable way to get it working is by redirecting at least the standard error from the steam command. We might as well redirect standard output, too.

tmux new-session -d -s steam 'xwfb-run steam &> /tmp/steam.log'
LukeShortCloud commented 3 months ago

I opened up an upstream bug report regarding the need for standard error redirection: https://gitlab.freedesktop.org/ofourdan/xwayland-run/-/issues/7