Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing an application for Ubuntu that (ab)uses the Gtk::MenuBar class to create a custom widget. It works fine on Gnome-Shell, but on Unity the widget gets hidden. I know I can disable the appmenu when I run the application using UBUNTU_MENUPROXY=0 but I want to disable it permanently in my app from the C++ code.

Is there a way to set a property on the widget so that the appmenu indicator will ignore it?

share|improve this question

The cheapest possibility is already in your answer:

Your application owns its environment block. Do a call to setenv in your main() before you initialize gtk.

man setenv tells the whole story. Also if there is the faintest possibility that you launch applications that should use the appmenu, unsetenv would come in handy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.