[Solved] Failed to load module "xapp-gtk3-module"

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
mlauronen
Posts: 13
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

[Solved] Failed to load module "xapp-gtk3-module"

#1 Post by mlauronen »

I am getting this error every time I try to run something which will use GTK3. The applications work just fine but for some reason I am getting this annoying message.

For example I did a simple GTK3 C application as follows,

Code: Select all

#include <gtk/gtk.h>

static void on_destroy(GtkWidget *widget, gpointer data) {
    gtk_main_quit();
}

const int WIDTH = 300;
const int HEIGHT = 200;

int main(int argc, char *argv[]) {
    GtkWidget *window = NULL;;
    GtkWidget *label = NULL;

    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(window), "Hello, World!");
    gtk_window_set_default_size(GTK_WINDOW(window), WIDTH, HEIGHT);

    label = gtk_label_new("Hello, World!");
    gtk_container_add(GTK_CONTAINER(window), label);

    g_signal_connect(window, "destroy", G_CALLBACK(on_destroy), NULL);
    gtk_widget_show_all(window);

    gtk_main();

    return 0;
}
The compilation and application runs ok but the following happens,

Code: Select all

me@pc ~/tests/cpp/gtk $ ./helloworld
Gtk-Message: 20:06:44.116: Failed to load module "xapp-gtk3-module"
me@pc ~/tests/cpp/gtk $
This is

Code: Select all

Linux: Debian GNU/Linux 12 (bookworm) 12.6
Kernel: 6.1.0-23-amd64
Nvidia: 535.183.01
GTK: 3.24.38
So what is happening and how to fix ?
Last edited by mlauronen on 2024-08-13 05:19, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 3698
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 100 times
Been thanked: 486 times

Re: Failed to load module "xapp-gtk3-module"

#2 Post by Aki »

Hello,

I rebuilt the binary for the code of your previous message with the following commands (using a Debian 12.6 for amd64 with KDE and gtk libraries installed):

Code: Select all

PKGCONFIG=$(which pkg-config)
CFLAGS=$($PKGCONFIG --cflags gtk+-3.0)
LIBS=$($PKGCONFIG --libs gtk+-3.0)
gcc -o HelloWorld HelloWorld.c $CFLAGS $LIBS
The program runs fine (the "Hello World" window appears), but no error message appears (neither a command line error message nor as a graphical window).

The xapp-gtk3-module is not installed in my computer:

Code: Select all

$ apt-file search xapp-gtk3-module 
libxapp-gtk3-module: /etc/X11/Xsession.d/80xapp-gtk3-module
libxapp-gtk3-module: /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libxapp-gtk3-module.so
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/changelog.Debian.gz
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/changelog.gz
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/copyright
libxapp-gtk3-module: /usr/share/lintian/overrides/libxapp-gtk3-module

$ LANG=C apt list libxapp-gtk3-module
Listing... Done
libxapp-gtk3-module/stable 2.4.2-3 amd64
The package containing the module has the following description:

Code: Select all

$ apt show libxapp-gtk3-module
Package: libxapp-gtk3-module
Version: 2.4.2-3
Priority: optional
Section: libs
Source: xapp
Maintainer: Debian Cinnamon Team <debian-cinnamon@lists.debian.org>
Installed-Size: 39.9 kB
Depends: xapps-common (>= 2.4.2-3), libglib2.0-0 (>= 2.26.0), libgtk-3-0 (>= 3.9.10), libxapp1 (>= 2.4.0)
Breaks: libxapp1 (<< 2.2.6-1~), xapp (<< 2.4.2-1~), xapps-common (<< 2.4.2-1~)
Replaces: libxapp1 (<< 2.2.6-1~), xapp (<< 2.4.2-1~), xapps-common (<< 2.4.2-1~)
Homepage: http://cinnamon.linuxmint.com/
Tag: role::shared-lib
Download-Size: 8,556 B
APT-Sources: http://localhost:3142/debian bookworm/main amd64 Packages
Description: GTK 3.0 module for the XApp library
 Xapp provides components which are common to multiple desktop environments
 and required to implement cross-DE solutions.
 .
 This package contains a GTK 3.0 module to make features of the XApp library
 available to GTK 3.0 applications.
It is a dependency of:

Code: Select all

$ apt show libxapp1/stable
Package: libxapp1
Version: 2.4.2-3
Priority: optional
Section: libs
Source: xapp
Maintainer: Debian Cinnamon Team <debian-cinnamon@lists.debian.org>
Installed-Size: 274 kB
Depends: xapps-common (>= 2.4.2-3), libc6 (>= 2.4), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgdk-pixbuf-2.0-0 (>= 2.23.0), libglib2.0-0 (>= 2.51.5), libgnomekbd8 (>= 3.6.0), libgtk-3-0 (>= 3.21.5), libpango-1.0-0 (>= 1.14.0), libx11-6
Recommends: libxapp-gtk3-module (= 2.4.2-3), xapp-sn-watcher (= 2.4.2-3)
Breaks: nemo (<< 5.2), xapps-common (<< 2.0.6-2~)
Replaces: xapps-common (<< 2.0.6-2~)
Homepage: http://cinnamon.linuxmint.com/
Tag: role::shared-lib
Download-Size: 75.1 kB
APT-Sources: http://localhost:3142/debian bookworm/main amd64 Packages
Description: XApp library
 Xapp provides components which are common to multiple desktop environments
 and required to implement cross-DE solutions.
 .
 This library is used by several Xapp apps.
Is the libxapp-gtk3-module installed in your computer ?

Are you running cinnamon ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

mlauronen
Posts: 13
Joined: 2024-02-13 15:25
Has thanked: 2 times
Been thanked: 2 times

Re: Failed to load module "xapp-gtk3-module"

#3 Post by mlauronen »

Thanks for the reply. Very helpful.

I'm using xfce 4.18 and here is my output:

Code: Select all

me@pc ~ $ apt-file search xapp-gtk3-module
libxapp-gtk3-module: /etc/X11/Xsession.d/80xapp-gtk3-module
libxapp-gtk3-module: /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libxapp-gtk3-module.so
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/changelog.Debian.gz
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/changelog.gz
libxapp-gtk3-module: /usr/share/doc/libxapp-gtk3-module/copyright
libxapp-gtk3-module: /usr/share/lintian/overrides/libxapp-gtk3-module

me@pc ~ $ apt list libxapp-gtk3-module
Listing... Done
libxapp-gtk3-module/stable,now 2.4.2-3 amd64 [residual-config]
libxapp-gtk3-module/stable 2.4.2-3 i386
me@pc ~ $ apt show libxapp-gtk3-module
Package: libxapp-gtk3-module
Version: 2.4.2-3
Priority: optional
Section: libs
Source: xapp
Maintainer: Debian Cinnamon Team <debian-cinnamon@lists.debian.org>
Installed-Size: 39,9 kB
Depends: xapps-common (>= 2.4.2-3), libglib2.0-0 (>= 2.26.0), libgtk-3-0 (>= 3.9.10), libxapp1 (>= 2.4.0)
Breaks: libxapp1 (<< 2.2.6-1~), xapp (<< 2.4.2-1~), xapps-common (<< 2.4.2-1~)
Replaces: libxapp1 (<< 2.2.6-1~), xapp (<< 2.4.2-1~), xapps-common (<< 2.4.2-1~)
Homepage: http://cinnamon.linuxmint.com/
Tag: role::shared-lib
Download-Size: 8 556 B
APT-Sources: http://www.nic.funet.fi/debian bookworm/main amd64 Packages
Description: GTK 3.0 module for the XApp library
 Xapp provides components which are common to multiple desktop environments
 and required to implement cross-DE solutions.
 .
 This package contains a GTK 3.0 module to make features of the XApp library
 available to GTK 3.0 applications.

me@pc ~ $ apt show libxapp1/stable
Package: libxapp1
Version: 2.4.2-3
Priority: optional
Section: libs
Source: xapp
Maintainer: Debian Cinnamon Team <debian-cinnamon@lists.debian.org>
Installed-Size: 274 kB
Depends: xapps-common (>= 2.4.2-3), libc6 (>= 2.4), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.2.4), libgdk-pixbuf-2.0-0 (>= 2.23.0), libglib2.0-0 (>= 2.51.5), libgnomekbd8 (>= 3.6.0), libgtk-3-0 (>= 3.21.5), libpango-1.0-0 (>= 1.14.0), libx11-6
Recommends: libxapp-gtk3-module (= 2.4.2-3), xapp-sn-watcher (= 2.4.2-3)
Breaks: nemo (<< 5.2), xapps-common (<< 2.0.6-2~)
Replaces: xapps-common (<< 2.0.6-2~)
Homepage: http://cinnamon.linuxmint.com/
Tag: role::shared-lib
Download-Size: 75,1 kB
APT-Sources: http://www.nic.funet.fi/debian bookworm/main amd64 Packages
Description: XApp library
 Xapp provides components which are common to multiple desktop environments
 and required to implement cross-DE solutions.
 .
 This library is used by several Xapp apps.
As we can see 'libxapp-gtk3-module/stable,now 2.4.2-3 amd64' is in [residual-config] state.

So I did the following:

Code: Select all

sudo apt purge libxapp-gtk3-module
sudo apt autoremove
sudo reboot

Code: Select all

me@pc ~/tests/gtk $ gcc -O2 -o helloworld helloworld.c $(pkg-config --cflags --libs gtk+-3.0)
me@pc ~/tests/gtk $ ./helloworld
No more messages in this or other GTK 3 applications. It looks like the problem is now fixed. Thank you.
Last edited by mlauronen on 2024-08-13 05:24, edited 2 times in total.

Aki
Global Moderator
Global Moderator
Posts: 3698
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 100 times
Been thanked: 486 times

Re: Failed to load module "xapp-gtk3-module"

#4 Post by Aki »

Hello,
mlauronen wrote: 2024-08-13 05:11 [..] No more messages in this or other GTK 3 applications. It looks like the problem is now fixed. Thank you.
I'm glad you sorted it out. :)

Happy Debian !

--
note: discussion moved to "Programming" sub-forum.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply