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 am coding an gui to create a vpn.

I am using now "AppIndicator" after using "GtkStatusIcon" but the icon works with the normal user but it's not displayed with sudo or gksudo.

How to fix it?

share|improve this question

The AppIndicator instance should be initiated from an unprivileged user, such as the current logged into desktop. This is is required so D-Bus communication used between the appindicator and the panel to work.

You should probably run your program as a normal user, and use gksudo only on the portions requiring root access.

share|improve this answer
Hi, thanks for your answer, but if i use gksudo only on the portions the password will be asked every times i want to connect ... :( – GuiGeek May 5 '11 at 7:35
This should not be the case, I know that after using sudo, there is a time span where it doesn't ask for the password again. – alexef May 10 '11 at 17:21

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.