protonscr

[steam.sh] zenity should not be mandatory

steamclosed
ValveSoftware/steam-for-linux#5560 · opened 2018-07-09 by sylware · updated 2018-07-10 · 5 comments · github
Ssylware 2018-07-09 github

Tried to switch to the beta client: steam.sh broke because zenity is made mandatory in this bash script (distros without the gnome desktop won't have zenity)

PPlagman 2018-07-09 github

I'm not aware of a behavior change there, but maybe it was accidental. Do you know what makes Zenity more mandatory in the Beta's steam.sh?

Kkisak-valve maintainer 2018-07-09 github

Zenity is not mandatory in steam.sh and there is no change in the usage between the stable and beta client. Something else has gone awry and steam.sh is trying to tell you why it was unable to start and has already failed before trying to use zenity.

There may be a dying message at /tmp/steam_message.txt from steam.sh trying to use xterm after it could not run zenity.

Ssylware 2018-07-10 github

Yep, just tested on the stable client by re-installing the client, it's broken too.
It happens with the update of the steam runtime.
If you grep zenity on steam.sh, you'll see it used at the end of a pipeline in 2 functions: download_archive and extract_archive. Since zenity exists only on gnome-desktop, you are likely to break the update (silentely, what did seem to happen to me), or brutally like with a re-install or a switch from/to the beta client.

Kkisak-valve maintainer 2018-07-10 github

Re-evaluated zenity usage in download_archive() and extract_archive(). Progress is piped to zenity from curl and tar and if zenity is not found it does not stop the script or interrupt curl and tar. This makes the usage there both cosmetic and non-fatal.

Ssylware 2018-07-10 github

I tested again, still broken. Then I did investigate more closely and I found why:

it is a race condition, which does not manifest on your system, but on mine.

It's in the function extract_archive. The pipe with tar and zenity, will fail before tar has extracted anything, and bash will not wait for tar to finish, hence reaching line 527 of steam.sh before tar has done any work, then will fail to find anything in EXTRACT_TMP.

Nothing extracted yet.