Gtk-Message: … Failed to load module “xapp-gtk3-module”
I have been seeing that error for a while but resolved it today (I found a solution). I am using Ubuntu 23.10 mantic now but I have had this error since I started using Ubuntu 20.04 through where I am now (I have been upgrading with every release).
If you have this error, I will explain how I solved mine and the important tips for solving it, which aren’t really what I did but how I approached it.
I tried to search for the solution to the “Gtk-Message: … Failed to load module “xapp-gtk3-module” error several months ago. I tried almost every suggestion that made sense to me ( and some that didn’t but seemed safe to try) but nothing worked. I decided to leave it, why? because it didn’t stop my applications from running (the pain wasn’t enough to keep me searching for the solution). I did solve it today though but still, it didn’t stop JetBrains’ WebStorm from running either.
I opened a MarkDown file using WebStrom from the terminal. My old friend greeted me in a flashy way.
Whenever I get an error that I don’t understand; in the terminal, while coding or just working with servers. I always copy the important part of the error into the search engine. Copying the crucial part of the error is more effective than copying the whole error stack or trying to explain it in your own words, remember that. It will save you a lot of problems.
If you’re in a hurry then here is what worked for me, but it might not work for you. open the terminal and run the command below to install the alternative packages to the good old xapp package.
sudo apt update
sudo apt install -y xapp-sn-watcher libxapp-gtk3-module
After that try running the application that triggered the error again. If the error is not there you’re good, otherwise, the rest of this long detailed blog might give you an insight into how to approach what is left to solve the error or any other error you will have in the future.
How I solved the “xapp-gtk3-module” Error
First, I copied the error into my browser search engine (I see you are still here, I will make it straight to the point), then I skimmed through the search results to find ones that a relevant to Ubuntu and at the top (this is important, there’s a good reason why they are at the top and why to look into one that’s related to your operating system).
I opened this one from AskUbuntu and went into details. I primarily look for two things. How long was the question asked? How related is the resource to my operating system and context? This is to make sure I am spending time on something closer to my problem and I might get a solution from there. It would be a waste of time and a misuse of resources if you spent 5 to 6 minutes or more looking into something that isn’t related to your context and source of the problem.
Second, there were many opinions from here. but two made sense to me. I ran the command to list Debian packages to see if I already had any xapp-like packages installed. Then, I tried reinstalling xapp package. That’s what made sense to me to try out first. I run the command to install xapp
package using the APT package manager.
I executed the command to list Debian packages and filtered the output using the Grep command.
$ dpkg -l | grep -i xapp
I already had some xapp-like packages installed: libxapp-gtk3-module
, xapp-sn-watcher
, and xapps-common
.
Next, I ran the command to install xapp
again, but I got an error saying there was no installation client for it. Now, most people just jump to the end and go back to the internet to say it didn’t work. I recommend you always read the details as much as you can. Look out for the essential information.
For, me aside from the error, APT said that the package is missing but there are some relevant packages available from another source: xapp-sn-watcher
, and libxapp-gtk3-module
I had to install the recommended packages. and that’s what solved the problem.
sudo apt install xapp-sn-watcher libxapp-gtk3-module
Now, if you had noticed. When I listed the available xapps packages, those packages were there and the solution to this problem wasn’t about installing the packages but fixing the broken packages by reinstalling them. When you install, or reinstall a package chances that the package manager will install all the missing dependencies for you are high and sometimes that’s what you need to fix the problem.
Conclusion
The take from this article. Always watch out for details when solving a problem, sometimes the solution is right there and all you need is to see it (of course that means you have to be able to tell and with experience, you will).
Most package dependency problems can be solved by simply reinstalling the broken packages. And sometimes you just need to watch out for what the packager manager or your programming-language-of-choice’s error stack is complaining about (assuming your language is specific as C programming language).
Well, if this solves one of your many problems, I am glad. If xapp is still complaining and you haven’t figured it out yet, good luck – that’s the road to greatness