The problem

Broken Dropbox Menu as appindicator in gnome-flashback

This is a broken Dropbox indicator in gnome-flashback on Ubuntu 16.04.1. (Dropbox version: x86_64-9.4.94)

Working Dropbox Menu in Unity

As it can be seen here, it works fine in Unity. But how can I get that in gnome-flashback (as appindicator)?

The workaround

enter image description here

When I force Dropbox to present itself as old-fashioned systray icon1 the menu gets usable.

Open questions

  • What convinces Dropbox to present the color icon in gnome-flashback when it runs as appindicator? As indicator it is black&white in Unity.
  • Can I fool Dropbox to believe it runs under Unity? Can I force "appindicator mode"?
  • Is there something wrong in the Dropbox code failing to decide properly between systray/appindicator? This colored icon looks like the result of half systray, half appindicator...

1 You can force Dropbox into "systray mode" by running dbus-launch dropbox start or DBUS_SESSION_BUS_ADDRESS= dropbox start instead of starting it with a plain dropbox start.


Can I fool Dropbox to believe it runs under Unity? Can I force "appindicator mode"?

Yes, you can! Experiments show that Dropbox (or related) looks for the environment variable XDG_CURRENT_DESKTOP, a freedesktop.org standard thing reflecting the name of the Desktop Environment in use. Set it to Unity and Dropbox turns sane. (I tried other sensible values, but the results were worse.)

There will be several ways to plant that variable on Dropbox. I chose to edit the command line interface script /usr/bin/dropbox from the nautilus-dropbox package to always overwrite this variable. Add this line after the imports. It will also work for "Start Dropbox on system startup":

os.environ['XDG_CURRENT_DESKTOP'] = 'Unity'
  • Addition [edit not allowed after 5 min]: It worked but only for gnome-flashback [metacity] not for gnome-flashback [compiz] sessions! – peschü May 2 '17 at 17:54
  • 1
    Yeah. This one did the trick on metacity of Ubuntu 16.04. Thanks! – webbertiger Jun 30 '17 at 16:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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