Clean up references to zenity
-
launch-options: If GUI dependencies are missing, say so on stderr
We can't necessarily count on zenity working everywhere.
-
launch-options: Don't use zenity if STEAM_ZENITY is explicitly set empty
Steam sets STEAM_ZENITY to the empty string if it wants to suppress use of zenity dialogs, for example on Steam Deck. If this is the case, just log to stderr and exit unsuccessfully.
steamrt/tasks#397
-
launch-options: Don't re-enter the scout runtime to run system zenity
steam.sh currently prefers to set STEAM_ZENITY to the absolute path of the host zenity, which might not run successfully with scout's libcurl override if it is a very recent version, due to the dependency chain zenity -> GTK4 -> libadwaita -> libappstream -> libcurl.
steamrt/tasks#397
-
runtime: Only unset STEAM_ZENITY if it belongs to the LDLP runtime
There are currently four possibilities for STEAM_ZENITY:
- unset
- explicitly set to empty (to disable its use, as on Steam Deck)
- absolute path of host zenity, typically /usr/bin/zenity
- literal string "zenity" which will be found in scout's PATH
In all cases except the last, there is no need to unset STEAM_ZENITY when "escaping" from the LDLP runtime, because the value will be equally valid in a host-like execution environment; and when the value is empty, it can be actively harmful to unset it, since this will result in using zenity when not intended.
For completeness, we also unset STEAM_ZENITY if it is the absolute path of the LDLP runtime's zenity (which is not a situation that Steam ever sets up right now, but in principle it could be).
steamrt/tasks#397
-
pv-unruntime: Unset STEAM_ZENITY if non-empty, and unset SYSTEM_ZENITY
This is one more aspect of undoing what the LD_LIBRARY_PATH runtime did.
steamrt/tasks#397
-
pv-runtime: Reset STEAM_ZENITY
If it's explicitly set to the empty string, this indicates that programs should not be using zenity; carry that through to the container runtime.
Otherwise, set or unset it according to whether it exists inside the container runtime. In practice, all of our runtimes do have it.
steamrt/tasks#397