Fix DROPBOX menu in non Unity panels

Fix Dropbox Indicator Icon And Menu Not Working In Xubuntu, Lubuntu Or Ubuntu

I recently stumbled on an issue with Dropbox and the Ubuntu flavors that support AppIndicators (except Unity), like Xubuntu and Lubuntu: the Dropbox AppIndicator icon shows up as broken and the menu doesn't work. This isn't a new issue though, and it seems to occur starting with Ubuntu 14.04.

The issue occurs with the Dropbox packages in the official Ubuntu repositories (called "nautilus-dropbox", which doesn't depend on Nautilus and can be used to install Dropbox on any desktop environment) as well as the Dropbox package downloaded from its official website.

It does not occur with the caja-dropbox package available in the official Ubuntu MATE 16.04 repository though (but it does occur in older Ubuntu MATE versions if you've enabled AppIndicators), because it was patched with a fix similar to the one in this article.

Below you'll find a fix / workaround for this issue. Important: using the instructions below, Dropbox will use a tray (notification area) icon instead of an AppIndicator.

If you've installed Dropbox by downloading the .deb from its website or by using the nautilus-dropbox package, you can fix the broken Dropbox appindicator icon and menu by using the following commands:

cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/start_dropbox.desktop
sed -i 's/^Exec=.*/Exec=dbus-launch dropbox start -i/' ~/.config/autostart/start_dropbox.desktop
dropbox autostart n
mkdir -p ~/.local/share/applications/
cp /usr/share/applications/dropbox.desktop ~/.local/share/applications/
sed -i 's/^Exec=.*/Exec=dbus-launch dropbox start -i/' ~/.local/share/applications/dropbox.desktop

For Ubuntu MATE (except 16.04), if you've used the dropbox-caja package to install Dropbox, you can fix the broken Dropbox appindicator icon and menu by using the following commands:

cp ~/.config/autostart/caja-dropbox.desktop ~/.config/autostart/start_caja-dropbox.desktop
sed -i 's/^Exec=.*/Exec=dbus-launch caja-dropbox start -i/' ~/.config/autostart/start_caja-dropbox.desktop
caja-dropbox autostart n
mkdir -p ~/.local/share/applications/
cp /usr/share/applications/caja-dropbox.desktop ~/.local/share/applications/
sed -i 's/^Exec=.*/Exec=dbus-launch caja-dropbox start -i/' ~/.local/share/applications/caja-dropbox.desktop

Then restart the session (logout/login) and the Dropbox icon and menu should work correctly.