gtkui: force GIO unix volume monitor so file choosers don't hang on dbus; Settings + panel open again; Release 1.8.1

On headless/minimal desktops the gvfs org.gtk.vfs.UDisks2VolumeMonitor dbus
service often fails to activate; each Gtk.FileChooserButton then blocked ~25s on
a StartServiceByName timeout while realizing, so the Settings dialog never
appeared and the stalled main loop froze the control panel too. Set
GIO_USE_VOLUME_MONITOR=unix in run_gui() before any window is realized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-06-08 14:30:05 +02:00
parent 28020fdeda
commit 0d4ad0920d
3 changed files with 20 additions and 1 deletions

View File

@ -9,6 +9,18 @@ The version is defined in [`blitztext/__init__.py`](blitztext/__init__.py).
## [Unreleased]
## [1.8.1] - 2026-06-08
### Fixed
- **Settings dialog and control panel wouldn't open on some desktops.** When the
gvfs `org.gtk.vfs.UDisks2VolumeMonitor` dbus service fails to activate (common
on headless or minimal sessions), every `Gtk.FileChooserButton` blocked ~25s on
a `StartServiceByName` timeout while realizing — so the Settings dialog never
finished appearing, and the stalled GTK main loop froze the panel too. Blitztext
now selects GIO's native `/proc/mounts` volume monitor
(`GIO_USE_VOLUME_MONITOR=unix`) before any window is realized, so file choosers
open instantly with no dbus dependency.
## [1.8.0] - 2026-06-08
### Added

View File

@ -6,4 +6,4 @@ counterpart to the macOS Blitztext menu bar app: it runs natively on the host
(not in a container) so it can type into any application via xdotool.
"""
__version__ = "1.8.0"
__version__ = "1.8.1"

View File

@ -408,6 +408,13 @@ class App:
def run_gui(tray_mode: bool = False) -> int:
# Use GIO's native /proc/mounts volume monitor instead of the gvfs/udisks2
# one. On headless or minimal desktops the `org.gtk.vfs.UDisks2VolumeMonitor`
# dbus service often fails to activate, and every Gtk.FileChooserButton then
# blocks ~25s on a StartServiceByName timeout while realizing — which freezes
# the settings dialog (and, via the stalled main loop, the panel) so neither
# ever appears. The unix monitor needs no dbus and opens choosers instantly.
os.environ.setdefault("GIO_USE_VOLUME_MONITOR", "unix")
# Identify to the window manager as "blitztext" rather than the Python entry
# point's filename. Launched via `python -m blitztext`, GTK's default program
# name is argv[0]'s basename ("__main__.py"), which is what shows in the