From 9a76507b14d9d5011e29b3c1d03edf23f97e8133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Tue, 2 Jun 2026 12:51:28 +0200 Subject: [PATCH] [client/ui] Fix Linux package metadata and KDE Wayland icon association MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two Linux packaging issues, both surfaced by the netbird-ui deb/rpm built from .goreleaser_ui.yaml. 1) License / vendor metadata ---------------------------- The nfpm entries for the UI package set only maintainer/description/ homepage, leaving the License and Vendor RPM/DEB tags empty. KDE Discover (and GNOME Software) then render the package as "Licenses: Unknown" / "Unknown author", with a scary license-warning popup on install. The daemon's main .goreleaser.yaml already set license (commit #5659) but never vendor, and the UI config was skipped entirely. Fix: add `license: BSD-3-Clause` + `vendor: NetBird` to both UI nfpm entries (deb + rpm), and `vendor: NetBird` to the daemon's deb + rpm entries for consistency. BSD-3-Clause is correct for client/ui — the repo is BSD-3-Clause except management/, signal/, relay/, combined/ (AGPLv3), none of which the UI touches. 2) KDE Wayland window/taskbar icon ---------------------------------- On KDE Plasma 6 under Wayland the app launched with the generic Wails icon in the window titlebar and the taskbar / Alt-Tab switcher, even though /usr/share/pixmaps/netbird.png (the launcher icon, resolved from the desktop entry's `Icon=netbird`) was correct. Root cause is how a Wayland compositor decides a window's icon. Unlike X11 there is no per-window _NET_WM_ICON the app can push at runtime — GTK4 even removed gtk_window_set_icon, so the embedded assets/netbird.png the binary carries is simply ignored. Instead the compositor matches the window's Wayland **app_id** to an installed .desktop file and uses that entry's `Icon=` key. The app_id is not "netbird": Wails hardcodes it as `org.wails.` (pkg/application/linux_cgo.go: `fmt.Sprintf("org.wails.%s", name)`, name = sanitized Options.Name), yielding **org.wails.netbird**. There is no Wails option to override the prefix. Verified the live value on the Fedora-40 / KDE 6.3 / Wayland test VM by dumping workspace.windowList() via a KWin script: js: ZZZWIN org.wails.netbird ## NetBird KDE needs two things to associate the running window with our desktop entry and thus paint our icon: - the desktop entry's basename should equal the app_id, so the titlebar decoration (which looks the entry up by app_id -> .desktop) finds it, and - a `StartupWMClass=` line, which the taskbar / task switcher use to map the surface to the entry. Fix (no Wails fork needed — app_id stays org.wails.netbird, which the user never sees; only Name=NetBird and the icon are visible): - install the desktop file as `org.wails.netbird.desktop` instead of `netbird.desktop` (both deb and rpm contents in .goreleaser_ui.yaml) - add `StartupWMClass=org.wails.netbird` to client/ui/build/linux/netbird.desktop `Icon=netbird` and the pixmaps/netbird.png payload are unchanged — they were already correct. Confirmed on the test VM that both the titlebar and taskbar/Alt-Tab now show the NetBird icon. --- .goreleaser.yaml | 2 ++ .goreleaser_ui.yaml | 8 ++++++-- client/ui/build/linux/netbird.desktop | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5ea479148..e68515693 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -196,6 +196,7 @@ nfpms: description: Netbird client. homepage: https://netbird.io/ license: BSD-3-Clause + vendor: NetBird id: netbird_deb bindir: /usr/bin builds: @@ -210,6 +211,7 @@ nfpms: description: Netbird client. homepage: https://netbird.io/ license: BSD-3-Clause + vendor: NetBird id: netbird_rpm bindir: /usr/bin builds: diff --git a/.goreleaser_ui.yaml b/.goreleaser_ui.yaml index f0a65181f..a9ee52b9f 100644 --- a/.goreleaser_ui.yaml +++ b/.goreleaser_ui.yaml @@ -70,6 +70,8 @@ nfpms: - maintainer: Netbird description: Netbird client UI. homepage: https://netbird.io/ + license: BSD-3-Clause + vendor: NetBird id: netbird_ui_deb package_name: netbird-ui builds: @@ -80,7 +82,7 @@ nfpms: postinstall: "release_files/ui-post-install.sh" contents: - src: client/ui/build/linux/netbird.desktop - dst: /usr/share/applications/netbird.desktop + dst: /usr/share/applications/org.wails.netbird.desktop - src: client/ui/build/appicon.png dst: /usr/share/pixmaps/netbird.png dependencies: @@ -92,6 +94,8 @@ nfpms: - maintainer: Netbird description: Netbird client UI. homepage: https://netbird.io/ + license: BSD-3-Clause + vendor: NetBird id: netbird_ui_rpm package_name: netbird-ui builds: @@ -102,7 +106,7 @@ nfpms: postinstall: "release_files/ui-post-install.sh" contents: - src: client/ui/build/linux/netbird.desktop - dst: /usr/share/applications/netbird.desktop + dst: /usr/share/applications/org.wails.netbird.desktop - src: client/ui/build/appicon.png dst: /usr/share/pixmaps/netbird.png dependencies: diff --git a/client/ui/build/linux/netbird.desktop b/client/ui/build/linux/netbird.desktop index 0b702fc07..a81f3698a 100644 --- a/client/ui/build/linux/netbird.desktop +++ b/client/ui/build/linux/netbird.desktop @@ -5,4 +5,5 @@ Icon=netbird Type=Application Terminal=false Categories=Utility; -Keywords=netbird; \ No newline at end of file +Keywords=netbird; +StartupWMClass=org.wails.netbird \ No newline at end of file