How to fix non working Dropbox icon on Xubuntu 14.04 LTS 64?
Just got this bug on my Xubuntu 15.10, broken icon and no way to open the menu. I think the bug is connected to Dropbox starting to use "indicator area" for their tray icon instead of "notification area" and the sudo-fix just happens to work because of some environment variables are not in use with sudo sessions.
At least for me this problem can be fixed by running:
dropbox stop && DBUS_SESSION_BUS_ADDRESS="" dropbox start
This seems to move the icon back to "notification area" which fixes both icon and menu. This way the daemon runs as a normal user and not as root.
EDIT: If you create your own startup script for Dropbox based on this fix, remember to disable the default startup script with "dropbox autostart n
" command (Thank StockBreak for this one, saved me some time this morning).
EDIT2: ...and for some reason I still had to remove the autostart setting from Dropbox GUI (click icon >> Preferences >> Start Dropbox on system startup). Hope it stays off after this one.
EDIT: To implement this fix in a script that run every time session starts, try this solution: https://askubuntu.com/a/795864/496493
A new workaround, proposed by File C., is "dbus-launch dropbox start -i".
The following adaptations are reported by users to work at least on the Linux distributions Fedora, Gentoo, Kubuntu, Linux Mint, openSUSE, Slackware, Ubuntu, Xubuntu... and the desktop environments Cinnamon, KDE 4, KDE 5, Mate, Unity, Xfce...
This new dbus-launch workaround seems to work a little faster, with more reliability, and in more cases than the previous DBUS_SESSION_BUS_ADDRESS workaround.
As command line:
dropbox stop && dbus-launch dropbox start
Or as a shell script file:
#!/bin/bash
dropbox stop && dbus-launch dropbox start
Unlike the solution proposed by kk78, the following method solves the problem once and for all:
Close Dropbox.
Open
/usr/bin/dropbox
file with a text editor (as an admin). For example, in the terminal rungksudo gedit /usr/bin/dropbox
Create a new line after
import os
and add the following:os.environ['DBUS_SESSION_BUS_ADDRESS'] = ""
Save and restart
Now Dropbox will work fine: