12

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.

1

1 Answer 1

9

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'
2
  • Addition [edit not allowed after 5 min]: It worked but only for gnome-flashback [metacity] not for gnome-flashback [compiz] sessions!
    – peschü
    May 2, 2017 at 17:54
  • 1
    Yeah. This one did the trick on metacity of Ubuntu 16.04. Thanks! Jun 30, 2017 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .