Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

How can I change the Application Indicator label after delay

self.ind = appindicator.Indicator("new-gmail-indicator", "/usr/share/icons/ubuntu-mono-dark/status/16/ubuntuone-client-error.svg", appindicator.CATEGORY_APPLICATION_STATUS)




The application runs but I only see the HSS label when running the application. I never see SSH.

share|improve this question

The problem here is that you've got a single threaded application, and the sleep is blocking it, thus the AppIndicator library doesn't get a chance to update the label. What you need to do for your timeout is use GLib's timeout function to set up a delay, and change the label in that callback. The code would probably look something like:

def set_label(self):
    GLib.timeout_add(4, self.respond_to_timeout)

def respond_to_timeout(self):

Good luck!

share|improve this answer
I wanted to do similar thing and I also tried GLib's timeout_add method but it gives me Segmentation fault (core dumped) error. I also tried totally separate thread but it give me Fatal Python error: ceval: tstate mix-up Aborted (core dumped). Though it's an old question, but still hoping to find a solution. – moshfiqur May 2 '14 at 16:43

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.