26

On an Lubuntu 15.10 machine the Dropbox icon, which tells the state of the application and allows interaction, is missing.

When I start Dropbox, no matter if I'm using dropbox start, dropbox start -i or the lxpanel-bookmark, only a small camera icon appears in the "Indicator Applets"-section of lxpanel: Camera icon instead of dropbox icon

This is very annoying, since I always have to use the terminal to check on the status. What's the reason of this weird behavior? It used to work some time ago, I can't tell when it changed, probably a software update. Reinstalling doesn't work, and the icons exist in the ~/.dropbox-dist/dropbox-lnx.x86-3.14.5/images/hicolor/16x16/status-directory.

random
  • 15,201
LukeLR
  • 1,561

10 Answers10

25

Lubuntu 14.04 ....I have a few machines, all the same OS. One by one Dropbox icon dissappeared.

I have struggled for months. Couldn't recover icon. Got it now!

  1. In terminal type ... dropbox stop && dbus-launch dropbox start
  2. Follow the prompts, if any. Two of my machines responded "Dropbox not installed".
  3. sudo apt-get install dropbox
  4. Repeat line 1. Icon appeared. Didn't stay after re-boot.
  5. Repeat line 1, to get icon.
  6. Go to Preferences ...General, (Dropbox icon) and un-tick 'Start Dropbox on system startup'.
  7. Now to 'Default applications for LXSession' (menu ...Preferences)
  8. Under Autostart, un-tick any previous Dropbox attempts (these can be deleted later).
  9. Add dbus-launch dropbox start
  10. Re-boot.
ecosseman
  • 251
20

There are some workarounds until the bug is fixed. The best one at this moment (working for Linux distros such as Xubuntu, Linux Mint, etc.) is:

dropbox stop && DBUS_SESSION_BUS_ADDRESS="" dropbox start

More details at another StackExchange site: Dropbox icon is not working Xubuntu 14.04 LTS 64 - Ask Ubuntu

Update:

And a more recent workaround that works for more Linux operating systems:

dropbox stop && dbus-launch dropbox start
6

The solution for Lubuntu 17.04 is (assuming that you have downloaded a .deb file):

1) Make a copy of Dropbox autostart file:
cp ~/.config/autostart/dropbox.desktop ~/.config/autostart/newstart_dropbox.desktop

2) Edit the file newstart_dropbox.desktop. Change the Exec= line to

Exec=dbus-launch dropbox start -i;

3) Copy the file in /usr/share/applications/dropbox.desktop to ~/.local/share/applications/:

cp /usr/share/applications/dropbox.desktop ~/.local/share/applications/

4)Edit the file that you copied to ~/.local/share/applications/ like you did in step 2. Change the Exec= line to

Exec=dbus-launch dropbox start -i

5) Disable Dropbox autostart, with the following command on terminal:

dropbox autostart n

Thanks for Andrew and the Wepup8 team for the tips.
http://www.webupd8.org/2016/06/fix-dropbox-indicator-icon-and-menu-not.html

Leonardo
  • 161
5

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.

andrewsh
  • 195
3

As I had the same problem with Debian 9 (cinnamon) after an upgrade, and here it is what I have done:
I edited the file /user/share/applications/desktop.dropbox and changed the line Exec=dropbox start -i to Exec=dbus-launch dropbox start -i.

Also added a line to delay the start of dropbox: X-GNOME-Autostart-Delay=30
I had to reboot as well.

androsfat
  • 130
1

Juan, I have found that neither of those workarounds is working specifically in Lubuntu. When I updated to Lubuntu 15.10, I got the same problem of a non-functional indicator area icon as described here: https://askubuntu.com/questions/732967/dropbox-icon-is-not-working-xubuntu-14-04-lts-64/739018#739018

However, the only thing I have found to work for Lubuntu is this:

  1. dropbox stop
  2. dbus-launch ~/.dropbox-dist/dropboxd
  3. That will start dropbox with the system tray ("notification area") icon, instead of the nonfunctional "indicator area" icon. So, go into Dropbox settings via the icon that should now be working, and TURN OFF the check box to start dropbox automatically. Also, just to be sure, issue the following in terminal:
  4. dropbox autostart n
  5. gksudo pcmanfm
  6. in the elevated-permissions file manager window, go to folder /bin and create a file called "dropbox-workaround-autostart". In it put:

#!/bin/bash

dbus-launch ~/.dropbox-dist/dropboxd

  1. Right-click the file, and in permissions tab, make executable for Anyone.
  2. Go to Preferences>Default applications for LXSession>Autostart, and under the "manual" section input box, type the name of the file (dropbox-workaround-autostart) and hit add.

That's got it consistently working for me know. Hope that helps someone.

1

I tested this on Lubuntu and worked perfectly.

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

http://www.webupd8.org/2016/06/fix-dropbox-indicator-icon-and-menu-not.html

1

I'm an Arch Linux user with GNOME3 Desktop. In my case I need to add some delay when audostart:

  1. Make a bash file anywhere you want. (e.g. ~/dropbox_delay.sh)

    #!/bin/bash
    
    sleep 30
    dropbox
    
  2. Give it an execute permission: chmod +x ~/dropbox_delay.sh

  3. In /usr/share/applications/dropbox.desktop file edit the following line (or a similar line starting with Exec=:

    Exec=dropbox
    

    to

    Exec=/home/_your_home_/dropbox_delay.sh
    
  4. Do the same in ~/.config/autostart/dropbox.desktop.

0

If Dropbox is started as a cronjob need to set environment $DISPLAY for the display.

Add a test to see if X is running and if so set the $DISPLAY before restarting Dropbox.

If $DISPLAY is not set, script will restart Dropbox anyway.

Testing for $DISPLAY allows this script restart Dropbox while user is not logged into X.

Having this script run on start of X session will restart Dropbox and enable icon to appear

eg for ~/bin/dropbox-start.sh

#!/bin/bash
if [[ $DISPLAY ]]
    then export DISPLAY=:0
fi
dropbox stop &&
sleep 30 &&
dbus-launch dropbox start -i

Works for LinuxMint 17.3 running XFCE4

russelld
  • 101
0

If the dropdown menu is not working, but the indicator is showing, while using MATE, try installing caja-dropbox instead of dropbox.

See: https://ubuntu-mate.community/t/caja-dropbox-not-showing-popup-menu-after-starting-mate-17-10/15780/4