Duplicate entries in $GTK_MODULES

On my fresh Manjaro XFCE insatallation with some Gtk software installed via pacman or AUR, $GTK_MODULES reads:

canberra-gtk-module:appmenu-gtk-module:canberra-gtk-module:appmenu-gtk-module

Where do those duplicate entries come from?

/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh sets
GTK_MODULES="${GTK_MODULES:+$GTK_MODULES:}canberra-gtk-module

/etc/X11/xinit/xinitrc.d/80-appmenu-gtk-module.sh sets
GTK_MODULES=“${GTK_MODULES}:appmenu-gtk-module”

Are those scripts (i.e. that whole xinit process) called twice for some reason?

That does seem like the most logical conclusion, although being on Plasma and Wayland, I cannot confirm this myself.

It is possible that something you installed — possibly from the AUR — made some modifications to the xinit scripts that caused this to happen. This kind of sometimes recursive script spaghetti in X11 is one of the reasons why X11 was in dire need of being replaced by something more efficient, which then led to the creation of Wayland, and in more recent times, XLibre.

It may even be a remnant of an older and faulty setup that has already long been remedied upstream. This is why simply keeping your system updated isn’t enough. You also periodically have to check your system for old lint from earlier package installations and removals.

2 Likes

Files are not identical:

$ pamac search /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh
/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module.sh is owned by libcanberra

libcanberra is included on Manjaro Xfce ISO for sound notifications:

https://download.manjaro.org/xfce/26.0.4/manjaro-xfce-26.0.4-260327-linux618.iso.pkgs

libcanberra 1:0.30+r2+gc0620e4-6`
$ pamac search -f /etc/X11/xinit/xinitrc.d/80-appmenu-gtk-module.sh
/etc/X11/xinit/xinitrc.d/80-appmenu-gtk-module.sh is owned by appmenu-gtk-module

appmenu-gtk-module is not included on any Manjaro x86 ISOs

Package is inherited from Arch and is an optional dependency for plasma-workspace only

Arch Linux - appmenu-gtk-module 25.04-3 (x86_64)

Required By (1)

1 Like

For the record, i also have it 2 times, and i do not have anything else in xinitrc.d folder, so i guess there are other things that set that variable too…

1 Like