Hi! I’m trying to configure global menus in KDE Plasma 6. I’ve gotten it working for Qt applications, but have not yet had success making it work for GTK applications. When I run a GTK application (like Firefox), I see this warning in the terminal from which I launched it:
Gtk-Message: 20:08:54.284: Failed to load module "appmenu-gtk-module": 'gtk_module_display_init': /run/current-system/sw/lib/gtk-3.0/modules/libwindow-decorations-gtk-module.so: undefined symbol: gtk_module_display_init
This same message appears for the other GTK applications I’ve tried: Inkscape, GIMP, QEMU. I believe it does not work for any GTK application.
Here’s a minimal configuration which reproduces the issue:
{ config, pkgs, ... }:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
system.stateVersion = "26.05";
users.users.plasma = {
isNormalUser = true;
initialPassword = "plasma";
extraGroups = [ "wheel" ];
};
environment.systemPackages = [
#pkgs.appmenu-glib-translator
#pkgs.libdbusmenu
#pkgs.libdbusmenu-gtk3
pkgs.firefox
];
services = {
desktopManager.plasma6.enable = true;
displayManager.plasma-login-manager.enable = true;
};
}
To reproduce it:
- Build a VM from the configuration using
nix-build ‘<nixpkgs/nixos>’ -A vm -I nixpkgs=channel:nixos-unstable -I nixos-config=./that-config.nix - Copy the
run-nixos-vmscript out ofresult/bin/and edit it to specify-m 4096Mand-object memory-backend-memft,id=mem0,size=4096M,share=oninstead of 1024 (required otherwise the VM runs out of memory trying to open Firefox) - Run the edited
run-nixos-vmscript - Log in as plasma:plasma
- Right click the desktop, choose “Enter edit mode”, click the drop-down next to “+ Add Panel” and choose “Application menu bar”, click “Exit edit mode”
- Launch Firefox
- Change these two about:config knobs to true:
widget.gtk.global-menu.enabledwidget.gtk.global-menu.wayland.enabled
- Quit Firefox
- Launch Konsole and run
firefox - Observe the global menus for Konsole, but not for Firefox, and the message described above
I thought I might be missing some packages, so I tried adding the commented-out ones, but the message/lack-of-menus persisted.
I don’t have a good understanding of GTK internals, so I’m not sure how to troubleshoot the specific missing symbol error. The symbol name seems like something that should be in any GTK application already, which is puzzling.
Is this a misconfiguration on my part? Is it a bug in KDE packaging? Firefox packaging? All GTK packaging on NixOS?