Zhixian's Tech Blog


How to fix “topmenu-gtk-module” error in Ubuntu 18.04 LTS

Filed under: computing, ubuntu — Tags: , , , — Zhixian @ 10:09:06 am


This blog post is a quick note to myself explaining how I fix the ‘Failed to load module “topmenu-gtk-module’ error message from displaying.


Sometimes when launching an application in Linux you may come across an error message that reads:

Gtk-Message: 09:24:00.567: Failed to load module “topmenu-gtk-module”


You are most likely to see this error when you try to launch a desktop application from the command-line.

This error message appears because your operating system is probably missing required packages, specifically “topmenu-gtk3” or “topmenu-gtk2”.

However if you are on Ubuntu 18.04 LTS, you will find that you could not install these packages using “apt-get” command-line tool, simply because they are not available. The latest of these packages are only available on Xenial or Artful. 😦


During the upgrade from Xenial to Bionic, the installation process disables all other PPAs.
Here are a few examples:


While its possible to fix this issue by downloading and compiling the source files for these packages, being of a lazy nature I decide against to do that. Instead what I chose to do is intentionally add the Xenial package repository back into my list of “Software & Updates”.

deb http://sg.archive.ubuntu.com/ubuntu/ubuntu xenial main universe


After I added that back in, it should prompt you to update your list of packages.
If it did not, run:

sudo apt-get update

After the command-line have finish running, you can install “topmenu-gtk2” and/or “topmenu-gtk3”.

sudo apt-get install topmenu-gtk3

sudo apt-get install topmenu-gtk2

I tried install “topmenu-gtk3” first. But that did not get rid of the message. So I went on to install “topmenu-gtk2”.

After the packages finished installing, you should not see the error message when you run your desktop application from the command-line.


  1. Nice clear instructions … but I couldn’t get them to work! 😦

    (a) Under “Software and Updates -> Other Software” I see:

    Ubuntu 16.04 LTS ‘Xenial Xerus’ (Source Code)
    Community maintained

    which is not quite the same as what is shown above.

    However I ticked the box, and it asked for my password and “updated the cache”.
    So I thought that I was on my way.

    (b) Then I did sudo apt-get update — there seemed to be no problems.

    (c) But then I did both

    sudo apt-get install topmenu-gtk3


    sudo apt-get install topmenu-gtk2

    and both responded with

    E: Unable to locate package topmenu-gtk3

    (or E: Unable to locate package topmenu-gtk2 respectively).

    I have no idea what to try next. Can you help?

    Comment by Rolf Turner — 2018-08-23 @ 19:24:08 pm

  2. Having had no response to my previous comment, I thrashed about on my own.
    Based on another example that I had seen I did:

    sudo add-apt-repository ‘deb http://sg.archive.ubuntu.com/ubuntu/ubuntu xenial main universe’

    “by hand” rather than by trying to invoke System -> Administration -> Sofware & Updates -> Other Sofware, as recommended above.

    Having done that, I followed the remainder of the prescribed procedure:

    sudo apt-get update
    sudo apt-get install topmenu-gtk2

    The error “Failed to load module “topmenu-gtk-module” then ceased to occur.

    Using the gtk3 version failed for me as it did for Zhixian.

    I hope that the foregoing is useful to someone.

    Comment by Rolf Turner — 2018-08-25 @ 06:25:08 am

  3. The only way I can get inkscape to work with 18.04.2 LTS (Mate) is to force it to use the canberra-gtk-module using this alias:-

    alias iscape=’GTK_MODULES=”canberra-gtk-module” /usr/bin/inkscape’

    (and just in case WordPress fools with the quotes, the outside ones are singles and the canberra ones are doubles).

    Put the whole line into your .bash_aliases or .bashrc file and then either log out and back in again, or just do “. .bash_aliases”. You should now be able to use “iscape” to start inkscape with a menu-bar. Yay!


    Comment by PuceBaboon — 2019-07-02 @ 21:55:07 pm

  4. It seems that the correct fix for this problem is to simply remove the file /etc/X11/Xsession.d/99mate-environment altogether. It’s been replaced in 18.04 with 80mate-environment, which should also be present in the same directory. Look at the file dates on these two files and you’ll see that the former dates from 2016, while the latter replacement file dates from 2018. See https://ubuntu-mate.community/t/problems-with-the-dropbox-icon-in-the-panel-um-18-04-1/17495/5

    Comment by Lindsay — 2019-10-30 @ 05:05:10 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: