You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
steam-runtime version of zenity does not work #104
Steam client version (build number or date): 1539393410 (Build Date Oct 13 2018, at 00:47:26)
Distribution (e.g. Ubuntu): Arch Linux
Opted into Steam client beta?: Yes
Have you checked for system updates?: Yes
Please describe your issue in as much detail as possible:
Expected steam-runtime version of Zenity to display dialogs
What happened:
Zenity fails with the following message:
* (zenity:16746): WARNING **: 15:49:05.224: Could not load ui file /usr/share/zenity/zenity.ui: /usr/share/zenity/zenity.ui: required gtk+ version 3.0, current version is 2.24
Steps for reproducing this issue:
Add ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/bin:~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin to $PATH or run ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/zenity directly with any type of options (i.e. zenity --progress)
See error message about requiring gtk+ version 3.0
Additional information
Zenity tries to use the system's /usr/share/zenity/zenity.ui file, which is for gtk+ version 3. According to the Zenity source, it looks in ./ and /usr/share/zenity/ for the .ui file.
The only .ui file I can find is in /.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity.ui and also requires gtk+ version 3 (includes <requires lib="gtk+" version="3.0"/> on line 4).
The only .ui file I can find is in /.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity.ui and also requires gtk+ version 3 (includes on line 4).
I don't see this. Granted the binary appear to reference /usr/share/zenity for other things too.
$ echo $STEAM_RUNTIME
/home/vm2/.steam/steam/ubuntu12_32/steam-runtime
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vm2/.local/bin:/home/vm2/bin
$ find $STEAM_RUNTIME /usr/bin -wholename '*/bin/zenity'
/home/vm2/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity
/home/vm2/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/bin/zenity
/usr/bin/zenity
$ objdump -x $STEAM_RUNTIME/{i386,amd64}/usr/bin/zenity /usr/bin/zenity |grep gtk
NEEDED libgtk-x11-2.0.so.0
NEEDED libgtk-x11-2.0.so.0
NEEDED libgtk-3.so.0
$ find $STEAM_RUNTIME /usr/share -name zenity.ui
/usr/share/zenity/zenity.ui
$ which zenity
/usr/bin/zenity
$ cd $STEAM_RUNTIME/i386/usr/bin
$ strace -e open -f $STEAM_RUNTIME/i386/usr/bin/zenity --progress 2>&1 |grep zenity.ui
open("/usr/share/zenity/zenity.ui", O_RDONLY|O_LARGEFILE) = 5
** (zenity:1141): WARNING **: Could not load ui file /usr/share/zenity/zenity.ui: /usr/share/zenity/zenity.ui: required gtk+ version 3.0, current version is 2.24
$ ls -1d $STEAM_RUNTIME/{i386,amd64}/usr/share/zenity /usr/share/zenity
ls: cannot access /home/vm2/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/share/zenity: No such file or directory
ls: cannot access /home/vm2/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/share/zenity: No such file or directory
/usr/share/zenity
The only .ui file I can find is in /.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity.ui and also requires gtk+ version 3 (includes on line 4).
I don't see this. Granted the binary appear to reference /usr/share/zenity for other things too.
I must have put that there when I was testing and forgotten about it, sorry for the misinformation.
I tried a couple of versions of zenity.ui from the GNOME/zenity repo on github and found that this one works with the version of zenity in steam-runtime.
For this copy of zenity to work, the Steam Runtime would need to include the zenity-common package, and either the zenity executable or GLib would have to be patched to look in $STEAM_RUNTIME/<arch>/usr/share (where <arch> is amd64 or i386 as appropriate), similar to what has been done in the Steam Runtime's versions of a few libraries (I don't have a complete list, but gdk-pixbuf is one of them).
I think some of our scripts attempt to use zenity for various diagnostic and progress purposes. It was probably working at some point when most hosts would carry .ui files that were compatible.
Does the Steam client already assume that the host system has zenity? If it does (I think it does during bootstrapping, but I'm not completely sure), we could consider dropping it from the Runtime and leaving scripts to rely on the host system copy, which should be reasonably safe now that we normally prefer host libraries.
If not, I hope that fixing the bundled copy shouldn't be particularly troublesome. We already patch the zenity package to drop its Webkit dependency, so the cost of carrying another patch isn't as high as if we were currently using a pristine version.
I too have run into this bug today. If it helps, this is trying to play Ark on Ubuntu 18.04.02.
zenity-common is already the newest version (3.28.1-1) lspci-vnvn.log
I also see this in my system log:
steam.desktop[4042]: ** (zenity:4929): WARNING **: 21:55:18.356: Could not load ui file /usr/share/zenity/zenity.ui: /usr/share/zenity/zenity.ui: required gtk+ version 3.0, current version is 2.24
I'm not sure this is actually fixed. @TTimo's recent changes fix this for titles like SteamVR that try to run $STEAM_ZENITY before running zenity, but if a game just runs zenity in the obvious way, it will not work.
Steps to reproduce:
Have xterm installed
Install a game
Set its launch options to xterm & %command%
Run it
In the xterm, run zenity --info --text Hello
Expected result:
A small window with a lightbulb icon and the informational message "Hello"
Actual result:
If zenity is installed on the host system at a newer version (e.g. 3.14.x on SteamOS 2 'brewmaster'):
** (zenity:12345): WARNING **: Could not load ui file /usr/share/zenity/zenity.ui: /usr/share/zenity/zenity.ui: required gtk+ version 3.0, current version is 2.24
Or if zenity is not installed on the host system at all:
** (zenity:12345): WARNING **: Could not load ui file /usr/share/zenity/zenity.ui: Failed to open file '/usr/share/zenity/zenity.ui': No such file or directory
Fixing this would require patching the bundled zenity to look in $STEAM_RUNTIME/usr/share/zenity if $STEAM_RUNTIME is an absolute path, and adding zenity-common (which contains zenity.ui) to the list of seed packages for the Steam Runtime.
At that point it tries to run zenity to report the problem. For some reason it decides to use the zenity binary in the steam runtime rather than the host zenity, and fails.
Note that host zenity is first in PATH, so really ARK has no business trying to spawn "steam runtime zenity" to begin with:
> ~/.steam/steam/ubuntu12_32/steam-runtime/run.sh which zenity
/usr/bin/zenity
You can move steam runtime zenity out of the way, ARK will have no choice but to use the right one:
ARK is still crashing, but you are getting a report now..
I suppose a reasonably easy, minor improvement of the current zenity setup would be to completely disable it if a suitable host replacement is found. Same concept as the library pinning .. but for binaries ( <- @smcv )
Is Steam meant to support systems that don't have zenity installed?
If not, there's a particularly easy solution: don't have zenity in the Steam Runtime at all. Problem solved! (The official .deb has a dependency on zenity already, although that doesn't help people who are using Arch or another non-Debian-derived OS.)
However, if Steam is meant to support host systems that don't have zenity, then we need to make the version in the Steam Runtime actually work as described in #104 (comment), so that we can at least use it as a fallback - and if it works reliably, we might as well use it all the time.
Note that host zenity is first in PATH
Unfortunately, no. For historical reasons, run.sh doesn't set up the PATH (I think this is a bug, which I want to fix at some point). steam.sh runs setup.sh --print-bin-path, and uses that to set PATH itself.
It's really important that we have some sort of functional zenity available for the Steam client during bootstrap and startup. I assume we'll want to use it for the new pre-flights checks for instance.
I don't quite trust the package dependency to guarantee that for us, for the reasons you mention. We might have to patch it up as you describe. We could also look at adding a 'generic progress dialog' mode since I tried to use it for that purpose in the library pinning waits and it didn't quite work out as intended.
Yeah, I noticed that making zenity read from /dev/zero makes it use far more CPU than it should.
I think the solution to that is to compile our own tiny GTK application and use that - we could put it in the steam-runtime-tools source package, for example. zenity is much, much heavier than it needs to be.
Activity
h1z1 commentedon Oct 27, 2018
I don't see this. Granted the binary appear to reference /usr/share/zenity for other things too.
simons-public commentedon Oct 30, 2018
I must have put that there when I was testing and forgotten about it, sorry for the misinformation.
I tried a couple of versions of zenity.ui from the GNOME/zenity repo on github and found that this one works with the version of zenity in steam-runtime.
smcv commentedon Mar 13, 2019
For this copy of zenity to work, the Steam Runtime would need to include the
zenity-commonpackage, and either the zenity executable or GLib would have to be patched to look in$STEAM_RUNTIME/<arch>/usr/share(where<arch>isamd64ori386as appropriate), similar to what has been done in the Steam Runtime's versions of a few libraries (I don't have a complete list, but gdk-pixbuf is one of them).TTimo commentedon Mar 13, 2019
I think some of our scripts attempt to use zenity for various diagnostic and progress purposes. It was probably working at some point when most hosts would carry .ui files that were compatible.
smcv commentedon Mar 14, 2019
Does the Steam client already assume that the host system has zenity? If it does (I think it does during bootstrapping, but I'm not completely sure), we could consider dropping it from the Runtime and leaving scripts to rely on the host system copy, which should be reasonably safe now that we normally prefer host libraries.
If not, I hope that fixing the bundled copy shouldn't be particularly troublesome. We already patch the zenity package to drop its Webkit dependency, so the cost of carrying another patch isn't as high as if we were currently using a pristine version.
jpSimkins commentedon Apr 17, 2019
I too have run into this bug today. If it helps, this is trying to play Ark on Ubuntu 18.04.02.
zenity-common is already the newest version (3.28.1-1)
lspci-vnvn.log
I also see this in my system log:
TTimo commentedon Jul 12, 2019
Please retest, this should be addressed in latest Steam beta client.
kisak-valve commentedon Aug 16, 2019
Closing per the last comment.
smcv commentedon Aug 20, 2019
I'm not sure this is actually fixed. @TTimo's recent changes fix this for titles like SteamVR that try to run
$STEAM_ZENITYbefore runningzenity, but if a game just runszenityin the obvious way, it will not work.Steps to reproduce:
xterm & %command%zenity --info --text HelloExpected result:
Actual result:
** (zenity:12345): WARNING **: Could not load ui file /usr/share/zenity/zenity.ui: /usr/share/zenity/zenity.ui: required gtk+ version 3.0, current version is 2.24** (zenity:12345): WARNING **: Could not load ui file /usr/share/zenity/zenity.ui: Failed to open file '/usr/share/zenity/zenity.ui': No such file or directoryFixing this would require patching the bundled zenity to look in
$STEAM_RUNTIME/usr/share/zenityif$STEAM_RUNTIMEis an absolute path, and addingzenity-common(which containszenity.ui) to the list of seed packages for the Steam Runtime.TTimo commentedon Aug 20, 2019
Let's leave this as a caveat. Consider re-opening if:
Peilonrayz commentedon Apr 8, 2020
@TTimo as mentioned earlier Ark doesn't work because of this. I've followed all the instructions here and have verified that:
zenityand/usr/share/zenity/zenity.uiwork correctly.$STEAM_ZENITYworks correctly./usr/share/zenity/zenity.uiis using gtk 2 not 3.What is this work around that I can follow to get Ark to work? As far as I can tell there are no workarounds in the above discussion.
TTimo commentedon Apr 17, 2020
On my machine, ARK crashes on startup:
At that point it tries to run zenity to report the problem. For some reason it decides to use the zenity binary in the steam runtime rather than the host zenity, and fails.
Note that host zenity is first in PATH, so really ARK has no business trying to spawn "steam runtime zenity" to begin with:
You can move steam runtime zenity out of the way, ARK will have no choice but to use the right one:
Then you get the crash report message: https://gyazo.com/6c6a3362416f47fda6741eac75d3c000
ARK is still crashing, but you are getting a report now..
I suppose a reasonably easy, minor improvement of the current zenity setup would be to completely disable it if a suitable host replacement is found. Same concept as the library pinning .. but for binaries ( <- @smcv )
smcv commentedon Apr 17, 2020
Is Steam meant to support systems that don't have zenity installed?
If not, there's a particularly easy solution: don't have zenity in the Steam Runtime at all. Problem solved! (The official .deb has a dependency on zenity already, although that doesn't help people who are using Arch or another non-Debian-derived OS.)
However, if Steam is meant to support host systems that don't have zenity, then we need to make the version in the Steam Runtime actually work as described in #104 (comment), so that we can at least use it as a fallback - and if it works reliably, we might as well use it all the time.
Unfortunately, no. For historical reasons,
run.shdoesn't set up thePATH(I think this is a bug, which I want to fix at some point).steam.shrunssetup.sh --print-bin-path, and uses that to setPATHitself.TTimo commentedon Apr 17, 2020
It's really important that we have some sort of functional zenity available for the Steam client during bootstrap and startup. I assume we'll want to use it for the new pre-flights checks for instance.
I don't quite trust the package dependency to guarantee that for us, for the reasons you mention. We might have to patch it up as you describe. We could also look at adding a 'generic progress dialog' mode since I tried to use it for that purpose in the library pinning waits and it didn't quite work out as intended.
smcv commentedon Apr 17, 2020
Yeah, I noticed that making zenity read from /dev/zero makes it use far more CPU than it should.
I think the solution to that is to compile our own tiny GTK application and use that - we could put it in the steam-runtime-tools source package, for example. zenity is much, much heavier than it needs to be.
smcv commentedon May 19, 2020
This change should go out in the next Steam beta.
This is fixed in the same version.