Dropbox indicator in 16.10 (and 17.04?)

I just tried the following with a LiveUSB:

  • Install Dropbox with the .deb from Dropbox’ homepage. Note that this .deb is from 2015. Starting dropbox shows the old icon.

  • Then I installed caja-dropbox and started that one. The fancy icon with no menu appeared.

Yeah, the deb is old but that doesn’t matter, it’s only for the initial installation. Dropbox then autoupdates in your home folder (basically, the deb only installs a script that downloads the up to date Dropbox, the real installation is in ~/.dropbox and ~/.dropbox-dist). It works the same as other closed softwares that are not really native to Linux, like Steam or Discord.

In the live session, have you tried launching Dropbox with the Unity env var before trying Caja-dropbox?

On my side, I’ll do a test in a VM but it’ll take a bit of time.

Damn, I forgot to try that. But I just did:

  • install dropbox from the .deb.
  • Execute command env XDG_CURRENT_DESKTOP=Unity dropbox start -i
  • Window asking to download dropbox appears
  • Browser window asking for credentials and icon appear.

Still no menu :frowning:

Ok, I’ve just tried a live 17.10 session in a VM and I can confirm the behaviour. I’m currently checking what packages related to indicators I have on my proper session vs those installed in the live one but so far, everything seems to match.

So either the issue is with a completely unrelated package or with personal settings. Either way, it won’t be easy to track.

EDIT: I noticed that there is an error message that appears when starting Dropbox from the live session that doesn’t on my regular one. Might be a clue as to where to start looking:

(dropbox:4986) Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info.

In the meantime, I think your best option is not to use Caja-dropbox (keep it installed but remove it from the startup apps), so that Dropbox will start not as an indicator but as a tray item. The menu will be functional, you’ll just have an “ugly” icon.

1 Like

Ok, I've got a weird one. Note I'm on 16.04.3 LTS. The other day I noticed that the systray icon had changed. Didn't think much about it then but I started poking around today and noticed that htop showed numerous instances!

Anybody got an idea what's going on? Startup programs entry is for Dropbox (not caja-dropbox) but the main menu Applications/Internet entry is for Caja-Dropbox.

If you stop Dropbox (dropbox stop in a terminal), are there still instances of it and/or caja-dropbox running? Then, if not and you start it again (either with dropbox start -i, XDG_CURRENT_DESKTOP=Unity dropbox start -i or caja-dropbox start -i), does it show multiple instances again?

As for running Dropbox and/or Caja-dropbox at start, have you checked the system settings → Startup applications and the content of ~/.config/autostart? They’re both used for starting apps.

dropbox stop in terminal stopped the majority of those. However, I'm still showing 6 lines of the following:

There is a dropbox.desktop in .config/autostart.
There is also an entry in Startup programs with the command dropbox start -i.

the result of trying the XDG suggested method results in:

quonsar@arglebargle:~$ XDG_CURRENT_DESKTOP=Unity dropbox start -i
Starting Dropbox...dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-1WtG0Z
dropbox: initializing
dropbox: running python 2.7.11
dropbox: setting program path '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/dropbox'
dropbox: setting home path '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29'
dropbox: setting python path '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29:/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/python-packages-27.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/cryptography.hazmat.bindings._constant_time.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/cryptography.hazmat.bindings._openssl.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/cryptography.hazmat.bindings._padding.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/psutil._psutil_linux.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/psutil._psutil_posix.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/linuxffi.pthread._linuxffi_pthread.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/tornado.speedups.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/cpuid.compiled._cpuid.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/linuxffi.resolv.compiled._linuxffi_resolv.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/posixffi.libc._posixffi_libc.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/librsyncffi.compiled._librsyncffi.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/linuxffi.sys.compiled._linuxffi_sys.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtWebKit.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtCore.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtNetwork.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtGui.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtWebKitWidgets.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtWidgets.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtPrintSupport.so'
dropbox: load fq extension '/home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/PyQt5.QtDBus.so'

(dropbox:30200): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'

(dropbox:30200): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(dropbox:30200): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Done!

all the instances return, and dropbox is running but no systray icon or context menu functionality.

:slight_smile:

There seems to be an error at the end related to Gdk. I assume it’s used by the indicator. Might be a missing package, one too old in 16.04 or something else.

Also, it’s a bit weird that you have a caja process referencing a Dropbox on your desktop. What is it? Did you move the Dropbox dir (with your synced file) to the desktop rather than your home dir?

Both of these issues might be related to the fact that you’re on 16.04. Caja-dropbox was fixed to address the indicator issue later and I’m not sure it’s been backported to 16.04.

If you stop Dropbox again (and also caja-dropbox if it’s running: caja-dropbox stop) and then start it without the env var (just dropbox start -i), does it display a working systray icon rather than an indicator?

Basically, the situation of Dropbox on Linux is this:

  • It installs in your home dir (~/.dropbox-dist) and is launched at system startup (dropbox start -i) if the autostart option is set in Dropbox’s prefs.
  • Some time ago, something broke: as indicators are made primarily for Unity, Dropbox assumes that to have its own one running, the environment has to be Unity, so it checks if the env var $XDG_CURRENT_DESKTOP is “Unity”. If it’s not the case, it runs in the systray rather than an indicator. Problem is that what broke it in general was that Unity changed its env var name to “Unity7”; So, since then, to have a working indicator, we have to trick it into thinking we’re running the Unity desktop (thus the XDG_CURRENT_DESKTOP=Unity dropbox start -i command to start it: we say to the dropbox command “hey, you’re on Unity, display your indicator”)
  • After this, Caja-dropbox (which is used to make Caja handle the syncing emblems for the Dropbox dir) was updated so that it starts Dropbox with the trick. On MATE, we now have to start Caja-dropbox instead of Dropbox: it’ll handle the emblems and start Dropbox properly. That’s why the autostart from Dropbox has to be disabled and Caja-dropbox be started instead.

So, I’m not sure about the situation on 16.04 but in theory, to have a working Dropbox indicator on MATE, we have to not start Dropbox directly (or fiddle with its launcher to fix it) but Caja-dropbox instead. If the fixed Caja-dropbox hasn’t been backported, you’d have to manually start Dropbox with the env var fix. Add to this that on 17.10 there seems to be a new issue related to the indicator and it’s quite a mess of a situation.

In any case, if it’s not able to display its indicator, Dropbox should display a systray icon instead.

As for the processes, it’s normal to have a lot of them pointing to $HOME/.dropbox-dist (that’s Dropbox running, whichever way it’s been launched). I’m not so sure about the caja --no-desktop /home/quonsar/Desktop/Dropbox that you have.

I’ll poke around at it a bit. Yes, I prefer my dropbox folder on my desktop and move it there using the preferences dialog. Thanks for your attention!

Ok, so either it’s because of this change that you have a Caja process running or it’s because Dropbox works differently in 16.04.

In any case, it shouldn’t be related to the indicator. Can you confirm that if you stop Dropbox and start it again just with dropbox start -i you have a working systray icon?

Also could you and @yoshegg give me the output of the following commands?

echo $QT_STYLE_OVERRIDE
echo $QT_QPA_PLATFORMTHEME
cat /etc/environment

EDIT: @quonsar you mention in one of your messages that the application menu shows Caja-dropbox. Don’t you have also a Dropbox entry? Did you install Dropbox through caja-dropbox or did you use the deb available on dropbox.com?

I uninstalled everything, deleted the .dropbox and .dropbox-dist folders and anything related in .config/autostart as well as removed any dropbox entry in Startup Application.

Then I re-installed ONLY caja-dropbox using synaptic. I have a systray icon and folder emblems.

Typing ‘dropbox stop’ returns The program ‘dropbox’ is currently not installed.
Typing ‘caja-dropbox stop’ works as expected.
Typing ‘dropbox start -i’ returns The program ‘dropbox’ is currently not installed.
Typing ‘caja-dropbox start -i’ works as expected with systray icon and folder badges/context menus.

echo $QT_STYLE_OVERRIDE returns gtk
echo $QT_QPA_PLATFORMTHEME returns nothing, a blank line
cat /etc/environment returns
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Ok. Now try the following:

export QT_STYLE_OVERRIDE=gtk2
export QT_QPA_PLATFORMTHEME=gtk2
caja-dropbox stop
caja-dropbox start -i

(Note: the export commands will be specific to the current terminal, so don’t close it or run the other commands in a new instance.)

When this is done, do you have a working indicator? If not:

caja-dropbox stop
XDG_CURRENT_DESKTOP=Unity caja-dropbox start -i

Than, same question.

i’m not sure what you mean by ‘indicator’. I have an ugly icon in my notification area. It used to display the appropriate emblems when syncing, that it stopped doing that is why I started questioning. :slight_smile:

I’m not running the indicator applet, only the notification applet. This may be causing the confusion?

To be clear: traditionnally, the panels available on the Linux DEs have provided a notification area (that we call systray for “system tray”) for applications to display a status icon, show notifications and so on.

When Canonical introduced Unity, the developers added a new kind of status icons called indicators that don’t display in the systray but in a specific area. They’re more limited than a systray icon in some ways but have some advantages and are supposed to be part of a more robust design.

When an app supports both formats, it displays an indicator when possible or reverts on the systray when not.

Besides Unity, some DEs/panels have added the support for indicators. That’s the case of Ubuntu MATE but I’m not sure it’s the case on 16.04.

The difference is easy to spot on MATE (as the Dropbox indicator has a specific icon from the Ubuntu Mono theme which is used by Ubuntu MATE). If you see the “ugly” original icon, you have the systray version; if you see a “fancy” new icon that match the colors of the other indicators, you have the indicator version.

Anyway, I guess there’s been a misunderstanding, I thought you were trying to get the indicator working (as it was the point of the thread) but it looks like you have a working systray icon and you’re fine with that (again, it’s possible that the indicators are not supported in 16.04 anyway). Except that it doesn’t sync anymore, is that correct?

When you change files in your Dropbox dir (the one on your desktop), the systray icon doesn’t show a blue circle icon and switch to the green one with a checkmark when it’s finished? If it doesn’t, do the syncing still works, beyond the appearance of the icon? Does it display a working context menu?
What about the folders in your Dropbox one? do they have emblems showing their synced status?

It syncs, does context menu and displays appropriate emblems for syncing/up to date. It simply does not do that on the systray icon as it once did. I’m sorry for the confusion, whenever I read “indicator” i was thinking of the systray/notification applet. So sorry.

Yes, everything works as it should except the systray icon doesn’t show a blue circle icon and switch to the green one with a checkmark when it’s finished. It does sync and displays appropriate emblems on the individual folders. In other words, it works fine but for the systeay icon. I can surely live with that! Really sorry for the derail!

No problem. :wink:

So, what does the systray icon display exactly: the white dropbox box with no emblem? Do you see all the icons if you go in /home/quonsar/.dropbox-dist/dropbox-lnx.x86_64-37.4.29/images/hicolor/16x16/status (“dropbox-lnx.x86_64-37.4.29” might be a different version on your system but I guess you’ll have only one dir with a similar name in .dropbox-dist, so adapt if that’s the case)? You should have six icons.

(EDIT: I think my memory fails me and it’s not supposed to show a green circle/checkmark when all is fine, just the white box logo with no emblem −that might be a recent change on Dropbox side too. As it’s been a while since I haven’t used the systray icon, I’m not sure about its proper appearance. It should still show the blue cirlce when syncing, though, so there is still a problem if it doesn’t on your side.)

Hehe, yes just the white dropbox icon. And, I actually have NO .dropbox-dist in my home directory. And yet - it’s running. And .dropbox-dist now appears in /var/lib/dropbox.

Don’t bother about what’s outside your home folder (and don’t try to change things in /var/lib or other system dirs).

The situation between Dropbox and Caja-dropbox is not clear to me. From what I can judge on my side (if I delete the config dirs and restart Caja-dropbox), on first launch, it starts by creating the ~/.dropbox folder. Then, after logging in my account and syncing files, it creates the ~/.dropbox-dist dir where, I assume, it downloads the latest version of Dropbox.

So, maybe try this again: stop Dropbox (caja-dropbox stop), delete the .dropbox dir in your home, check if there’s really no .dropbox-dist, then restart Dropbox (caja-dropbox start -i). In theory, you should not be connected to your account anymore. Select login in the systray icon menu, it should open a window/tab in your web browser to login (in my case, as I’m already logged on the Dropbox website, it asks me if I want to associate my account with my machine but it might be specific to some settings, maybe it’ll ask you to enter your username + password instead). Let it sync your files (check the emblems in your Dropbox folder). When it’s finished, check again in your home dir: still no .dropbox-dist?

Ok, I’m going to have to sleep soon!

In the /var/lib/dropbox/.dropbox-dist directory (all of which is owned by root) I found a README file that says:

To install just place this directory (.dropbox-dist) in your home directory (~, $HOME)

So I copied it into my home (and obviously it is all owned by me there) and it still functions as normal, only exception is the systray icon.
I have no idea how the /var/lib/dropbox got there, and no idea if it always was there. Date on the files is last week, except for the images, plugins and resources subdirectories within
/var/lib/dropbox/.dropbox-dist/dropbox-lnx.x86_64-37.4.29 which have todays date.

I’m leaving everything alone in /var/lib/dropbox since I have no clue if it was ever there in the past. Obviously some things are amiss with the relationship between dropbox and caja-dropbox and 16.04 LTS and as long as its functional I’m good with it. I may install 17.10 after it has had some time to surface any issues, but probably I’ll just wait for the next LTS.

Really appreciate your time and suggestions. I’m in the US and I’ve been up all night so it is nap time for me!

christophe@cXPSmate:~$ echo $QT_STYLE_OVERRIDE

christophe@cXPSmate:~$ echo $QT_QPA_PLATFORMTHEME
gtk2
christophe@cXPSmate:~$ cat /etc/environment 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Thank you for your relentlessness :slight_smile:

1 Like