Unfortunately, most of the answers here are pure voodoo and do not address the actual underlying issues, of which there are two (I'm writing this in part so that I don't forget it myself the next time I'm dealing with this).
Issue number one: Dropbox attempts to fit to whatever environment it runs under, so it does some autodetection work. It sometimes fails, as it's not been updated since 2015. This issue has been addressed by an updated /usr/bin/dropbox
wrapper as shipped in Ubuntu's nautilus-dropbox
package. So if you want to avoid part of the issues, use it, not the package Dropbox provides. If not, make sure XDG_CURRENT_DESKTOP
is set to Unity
before Dropbox runs; the Ubuntu version of the package does this internally.
Issue number two: Dropbox is written using Qt, more precisely Qt5. Unity is based mostly on GTK+. Qt can use GTK+ styles, but the implementation has changed significantly in the recent year or so. Unfortunately, the default install of Ubuntu doesn't make it easy to use GTK+ styles from Qt, since QT_STYLE_OVERRIDE
is by default set to gtk
, which doesn't work as expected, and GTK+ styling fails to initialise, which leads to unavailability of everything based on GTK+ including the D-Bus menu interface, which is what makes the indicator work. Unsetting QT_STYLE_OVERRIDE
or setting it to a valid value unbreaks Dropbox and makes the indicator appear again.
Update: Actually, it’s not an Ubuntu default, but something else may be setting the variable to a wrong value — in my case, it was ~/.xsession
where I’ve put it some years ago and forgot about it. In any case, it is worth checking and possibly force-setting it to the correct value.