Ubuntu – Gtk-Message: Failed to load module “pantheon-filechooser-module”

gtkpantheon

Once upon a time, I've installed Pantheon desktop on Ubuntu 14.04.

And then I decided to use vanilla desktop, Unity.

So I've removed all things related with Pantheon. I can't remember the exact command, but it seems like:

sudo apt-get remove pantheon*

When I open some apps which run with GUI from terminal, an error, a warning or a message is shown.

$ gedit
Gtk-Message: Failed to load module "pantheon-filechooser-module"
$ wireshark
Gtk-Message: Failed to load module "pantheon-filechooser-module"
$ nautilus
Gtk-Message: Failed to load module "pantheon-filechooser-module"

It seems it does not affect to the actual behavior of the system. But it is really annoying to me.

Is there anyone who can give me a tiny hint to solve this problem?

Best Answer

I had the same problem! If you run the following:

env | grep -i gtk

And see the module in your path like mine:

GTK_MODULES=pantheon-filechooser-module:overlay-scrollbar

Then it means it's being set somewhere to use the pantheon which needs to be removed. I did a quick grep and found the following:

/etc/profile.d/pantheon-filechooser-module.sh:export GTK_MODULES=pantheon-filechooser-module

So did:

sudo rm /etc/profile.d/pantheon-filechooser-module.sh

Finally - I saved my GTK_MODULES variable without the filechooser in my current session so not to have to restart: (obviously yours will be different to mine)

GTK_MODULES="overlay-scrollbar"

Job Done.