Skip to content

steam-runtime version of zenity does not work #104

Closed

Description

@simons-public

Your system information

  • 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:

  1. 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)
  2. 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).

Activity

  1. h1z1 commented on Oct 27, 2018

    @h1z1

    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
    
  2. simons-public commented on Oct 30, 2018

    @simons-public
    Author

    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.

  3. smcv commented on Mar 13, 2019

    @smcv
    Contributor

    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).

  4. TTimo commented on Mar 13, 2019

    @TTimo
    Collaborator

    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.

  5. smcv commented on Mar 14, 2019

    @smcv
    Contributor

    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.

  6. jpSimkins commented on Apr 17, 2019

    @jpSimkins

    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
    
  7. TTimo commented on Jul 12, 2019

    @TTimo
    Collaborator

    Please retest, this should be addressed in latest Steam beta client.

  8. kisak-valve commented on Aug 16, 2019

    @kisak-valve
    Member

    Closing per the last comment.

  9. smcv commented on Aug 20, 2019

    @smcv
    Contributor

    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.

  10. TTimo commented on Aug 20, 2019

    @TTimo
    Collaborator

    Let's leave this as a caveat. Consider re-opening if:

    • There is an app other than SteamVR that is found to try and use zenity
    • Said app cannot be fixed to follow $STEAM_ZENITY workaround
  11. Peilonrayz commented on Apr 8, 2020

    @Peilonrayz

    @TTimo as mentioned earlier Ark doesn't work because of this. I've followed all the instructions here and have verified that:

    1. My system's zenity and /usr/share/zenity/zenity.ui work correctly.
    2. Steam's $STEAM_ZENITY works correctly.
    3. Steam creates an environment where it incorrectly says /usr/share/zenity/zenity.ui is 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.

  12. TTimo commented on Apr 17, 2020

    @TTimo
    Collaborator

    On my machine, ARK crashes on startup:

    Assertion failed: GRHIVendorId != 0 [File:F:\build\trunk\Engine\Source\Runtime\RHI\Private\RHI.cpp] [Line: 539] 
    
    Signal 11 caught.
    

    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:

    timo@phoenix ~> mv /home/timo/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/bin/zenity /home/timo/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/bin/zenity.off
    timo@phoenix ~> mv /home/timo/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity /home/timo/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/bin/zenity.off
    

    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 )

  13. smcv commented on Apr 17, 2020

    @smcv
    Contributor

    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.

  14. TTimo commented on Apr 17, 2020

    @TTimo
    Collaborator

    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.

  15. smcv commented on Apr 17, 2020

    @smcv
    Contributor

    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.

  16. smcv commented on May 19, 2020

    @smcv
    Contributor

    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

    This change should go out in the next Steam beta.

    I noticed that making zenity read from /dev/zero makes it use far more CPU than it should

    This is fixed in the same version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions