Skip to content

Linux release binary can't open any UI: no GUI backend bundled, and no way to reach gleapp web #195

Closed

Description

@kalink0

Moin :-)

first of all: GLEAPP is a great addition to the LEAPP family. Thanks a lot for all the work put into it! I ran into a problem with the Linux release binary while trying it out. Details and a workaround are below.

Summary

The README notes that the Linux desktop window is unexercised, and that it "needs one of the toolkits under Desktop app above, and gleapp web in a browser is the path that is tested". Neither route works for the release binary (GLEAPP-2026.5.1-linux-x64.tar.gz), so the asset can't open any UI.

Environment

  • Manjaro Linux, GNOME
  • Binary downloaded from the GitHub release page

Output

[pywebview] GTK cannot be loaded
Traceback (most recent call last):
  File "webview/guilib.py", line 39, in import_gtk
    import webview.platforms.gtk as guilib
  File "pyimod02_importers.py", line 457, in exec_module
  File "webview/platforms/gtk.py", line 28, in <module>
    import gi  # noqa: E402
    ^^^^^^^^^
ModuleNotFoundError: No module named 'gi'
[pywebview] QT cannot be loaded
Traceback (most recent call last):
  File "webview/guilib.py", line 51, in import_qt
    import webview.platforms.qt as guilib
  File "pyimod02_importers.py", line 457, in exec_module
  File "webview/platforms/qt.py", line 14, in <module>
    from qtpy import PYQT6, PYSIDE6, QtCore
ModuleNotFoundError: No module named 'qtpy'
error: the desktop window could not start: You must have either QT or GTK with Python extensions installed in order to use pywebview.
See the README's Desktop app section for what the window needs on this
platform. To open the same interface in a browser instead:
    python gleapp.py web

Analysis

  1. The bundle has no GUI backend. release.yml installs only .[build], so neither PyGObject nor qtpy or a Qt binding is in the build environment. collect_all("webview") in packaging/gleapp.spec therefore bundles pywebview without a backend. The traceback confirms this: webview/platforms/gtk.py runs inside the bundle and fails at import gi.

  2. Installing a toolkit on the host (as the README suggests) doesn't help the binary. A PyInstaller bundle only searches its own directory. I checked this with a minimal --onedir build (PyInstaller 6.22.3). sys.path contained only _internal/base_library.zip, _internal/pythonX.Y/lib-dynload and _internal. A package installed on the host could not be imported, even with PYTHONPATH pointing to the host's site-packages. The bundle is also built with Python 3.12, so a distro's python-gobject for a different Python version wouldn't be ABI-compatible anyway.

  3. The binary can't reach the tested path. packaging/entrypoint.py always calls gleapp.desktop.main(). ./GLEAPP web treats web as a case directory and fails in the same way. The error message then suggests python gleapp.py web, which a user of the binary can't run.

  4. CI doesn't catch this. --version, --texworker and --selfcheck all pass without calling webview.start(), which is where pywebview resolves the backend.

Workaround (from source, verified on Manjaro GNOME)

  • Browser: the README's source install plus python gleapp.py web works as documented. It needs no GUI toolkit.
  • Native window: this additionally needs the distro's GTK bindings and a venv that can see them:
sudo pacman -S python-gobject webkit2gtk-4.1
python -m venv --system-site-packages .venv
source .venv/bin/activate
pip install -r requirements.txt
python gleappGUI.py

Suggestions

  • Smallest fix: let the frozen entrypoint accept web, and/or fall back to the browser when webview.WebViewException is raised. The binary then always has the path the README calls tested.
  • Native window in the binary: install a backend in the Linux build environment (e.g. pip install 'pywebview[qt]') and collect it in the spec. Qt/QtWebEngine is probably easier to make self-contained than GTK/WebKitGTK (not tested).
  • CI: add a Linux check that actually launches the UI (e.g. under xvfb-run, like the Windows smoke test does), or at least one that imports the pywebview backend inside the frozen binary.
  • Error message: in a frozen build, point to a command that works for the binary instead of python gleapp.py web.
  • README: clarify that installing a toolkit helps when running from source (or when building yourself), not with the release binary.

Activity

  1. abrignoni commented on Sep 26, 2026

    @abrignoni
    Owner

    Thanks Marco, both for the kind words and for the detailed write-up with a workaround. Your analysis was right on every point.

    #202 fixes the part that left the binary with no interface at all:

    • ./GLEAPP web (or ./GLEAPP -c <case> web) now opens the interface in your browser.
    • Started from a terminal, the binary falls back to the browser on its own when the window cannot start.
    • The error message names the binary's own command instead of python gleapp.py web.
    • CI now runs web from every frozen build, and on Linux checks what the binary does with no toolkit.
    • The README now says the toolkit note applies to source installs.

    Once it merges it goes out with the next release. A native window in the Linux binary, by bundling Qt, is a separate piece of work.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions