Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm looking at writing a simple app indicator and I need it to update it's information whenever it's clicked on to open the menu. Is there any kind of on_click action thing?

Let me rephrase it then: How to perform an action (any action) when the user clicks on the appindicator to open its menu?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

An app indicator can only open its menu. It can't perform any other action and your program doesn't get notified when the menu is displayed.

You could either include some kind of "Update" menu item or find other events that trigger the update.

share|improve this answer
Thanks, I was afraid that might be it. I'll look into other events that might trigger this instead. –  DoGoDo Dec 2 '12 at 20:37

I have used the middle mouse click on one of my indicators to perform an action, so I think you could do the same...see related [answer[(http://askubuntu.com/a/501050/67335). Note it only seems to work on Ubuntu (not Lubuntu/Xubuntu).

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.