Skip to content

fix: dynamically check for xprop to prevent crashes on pure Wayland#424

Open
W-Varg wants to merge 1 commit into
hardpixel:masterfrom
W-Varg:fix-wayland-xprop-crash
Open

fix: dynamically check for xprop to prevent crashes on pure Wayland#424
W-Varg wants to merge 1 commit into
hardpixel:masterfrom
W-Varg:fix-wayland-xprop-crash

Conversation

@W-Varg

@W-Varg W-Varg commented Jun 30, 2026

Copy link
Copy Markdown

Description

This PR fixes a potential crash in GNOME Shell when running on modern, pure Wayland environments (such as Ubuntu 26.04) where X11/Xorg utilities like xprop are not installed by default.

Changes

  • Import GLib in window.js.
  • Detect if xprop is installed on the system using GLib.find_program_in_path('xprop').
  • If xprop is not available, default server-side decoration actions (ServerDecorations) to a safe fallback (ClientDecorations / styling via GTK CSS injection) instead of executing Util.spawn(['xprop', ...]), which throws an exception and crashes the extension loop.

Why this is needed

In pure Wayland environments without Xorg utilities, attempts to call xprop fail immediately with GLib.SpawnError (executable not found). This change ensures the extension degrades gracefully and remains fully operational on Wayland.

Verification

  • Tested and verified on GNOME Shell 50.1 under a native Wayland session.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant