From 770d2796ed74894cb837d8281def27f36f3870a7 Mon Sep 17 00:00:00 2001 From: Luke Sandell Date: Sat, 31 Jan 2026 12:34:29 -0600 Subject: [PATCH] gnome-shell: fix gnome-shell-portal-helper Add `webkitgtk_6_0` typelib needed by `gnome-shell-portal-helper`. When NetworkManager connectivity check is enabled, GNOME will pop up a notification when a captive portal is detected. Clicking the notification _should_ launch a WebKit browser window allowing you to log in to the network. Without including the typelib, this fails with the following error in the journal: `JS ERROR: Error: Requiring WebKit, version 6.0: Typelib file for namespace 'WebKit', version '6.0' not found`. You can enable NetworkManager connectivity checks with the following NixOS config: ```nix networking = { networkmanager = { enable = true; settings = { connectivity = { enabled = true; uri = "http://nmcheck.gnome.org/check_network_status.txt"; interval = 300; }; }; }; }; ``` To test this, you need to connect to a public WiFi that requires clicking through a log in page or simulate a captive portal in some other way. You can also test launching the authentication window directly with a script similar to the following. This will not work prior to the fix. ```bash gdbus call --session \ --dest org.gnome.Shell.PortalHelper \ --object-path /org/gnome/Shell/PortalHelper \ --method org.gnome.Shell.PortalHelper.Close \ "/org/freedesktop/NetworkManager/ActiveConnection/1" gdbus call --session \ --dest org.gnome.Shell.PortalHelper \ --object-path /org/gnome/Shell/PortalHelper \ --method org.gnome.Shell.PortalHelper.Authenticate \ "/org/freedesktop/NetworkManager/ActiveConnection/1" \ "http://example.com" \ 0 ``` --- pkgs/by-name/gn/gnome-shell/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/gn/gnome-shell/package.nix b/pkgs/by-name/gn/gnome-shell/package.nix index 3ffad3a901a7..6f9e270cfd0d 100644 --- a/pkgs/by-name/gn/gnome-shell/package.nix +++ b/pkgs/by-name/gn/gnome-shell/package.nix @@ -66,6 +66,7 @@ libxkbcommon, libsoup_3, libxml2, + webkitgtk_6_0, }: let @@ -183,6 +184,7 @@ stdenv.mkDerivation (finalAttrs: { # not declared at build time, but typelib is needed at runtime libgweather libnma-gtk4 + webkitgtk_6_0 # for gnome-shell-portal-helper # for gnome-extension tool bash-completion