ubuntu / gnome-shell-extension-appindicator

Adds KStatusNotifierItem support to the Shell
https://extensions.gnome.org/extension/615/appindicator-support/
GNU General Public License v2.0
1.2k stars 164 forks source link

Menu does not show when clicking on Dropbox icon #64

Closed brglng closed 7 years ago

brglng commented 8 years ago

When I click on the Dropbox icon, I cannot get the menu shown. My environment is Ubuntu 16.04 with GNOME 3.18. Great extension. Thank you!

brglng commented 8 years ago

More information here. I have tried DROPBOX_USE_LIBAPPINDICATOR=1 XDG_CURRENT_DESKTOP=Unity dropbox start -i, but the problem still exists. Thanks.

jhasse commented 7 years ago

After clicking on the icon a lot I managed to bring up the oldschool X tray menu. So it seems that Dropbox still isn't using libappindicator correctly.

When I run caja-dropbox (I guess this is just an older version of Dropbox for Ubuntu MATE) with DROPBOX_USE_LIBAPPINDICATOR=1 XDG_CURRENT_DESKTOP=Unity the tray icon doesn't show up, I guess reproducing #63.

jhasse commented 7 years ago

After its latest update Steam's menu now also doesn't show up anymore :(

brglng commented 7 years ago

There is another issue. After locking and unlocking my screen, the Dropbox icon disappears and won't show any more. I think this is a related issue.

jhasse commented 7 years ago

Can you try starting Dropbox with

XDG_CURRENT_DESKTOP=Unity dropbox start

? This should fixing the icon disappearing, but not the menu (I'm working on that).

jhasse commented 7 years ago

Working now:

screenshot

Unfortunately XDG_CURRENT_DESKTOP=Unity is indeed needed, but I think this can only be fixed by the Dropbox developers.

brglng commented 7 years ago

I just tried the latest code from the repo, but the Dropbox icon does not show anymore. BTW, I am using GNOME 3.20 now, I am not sure if this is caused by GNOME version incompatibility...

brglng commented 7 years ago

FYI, this is what I see from the terminal when starting Dropbox with XDG_CURRENT_DESKTOP=Unity dropbox start:

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

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

(dropbox:7187): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

Without XDG_CURRENT_DESKTOP=Unity, those logs does not show.

jhasse commented 7 years ago

Could be. Which distro are you using? Maybe this is also due to a package missing.

Btw: I'm also getting the Glib WARNING, but not the CRITICAL messages when setting XDG_CURRENT_DESKTOP to Unity.

brglng commented 7 years ago

I am still using Ubuntu 16.04, but with GNOME Staging PPA.

dyskette commented 7 years ago

In a somewhat related note. Maybe the wiki for Fedora should contain:

For dropbox support, it should be started with the XDG_CURRENT_DESKTOP environment variable set to Unity.

XDG_CURRENT_DESKTOP=Unity dropbox start

I only figured it out until I saw this issue.

And add a link to the wiki for Fedora in the extensions page maybe?

brglng commented 7 years ago

I have downgraded to GNOME 3.18, but still get the same error.

CopperBezel commented 7 years ago

Hmm. Just installed the ZIP copy, Dropbox does appear but still isn't clickable, which sounds like it's the reverse of what I should be seeing? Same behavior with Steam. Chrome and Discord behave as intended. I'm having an unrelated problem with KDE Connect such that it's not showing up anywhere, but that's rather obviously on my end. Gnome 3.22.

Edit: Update fixed Dropbox menu for me. I separately resolved the KDE Connect issue, so the only remaining issues for me are that Dropbox still needs its environment spoofed and Steam shows no menu on click.

jhasse commented 7 years ago

Update fixed Dropbox menu for me.

Glad to hear that :)

Steam shows no menu on click.

I've opened an issue for that: #73 Can you add your system information to that issue?

jhasse commented 7 years ago

The new version should hit extensions.gnome.org in the next days.

We should continue the discussion about XDG_CURRENT_SESSION in #74.

brglng commented 7 years ago

The Dropbox indicator still does not show on my system... strange.

brglng commented 7 years ago

OK, I figured out the reason. I am using QT_QPA_PLATFORMTHEME=gnome on my system, and Dropbox indicator will not show with this and XDG_CURRENT_DESKTOP=Unity together. However Qt apps will use their own themes instead of GNOME's without QT_QPA_PLATFORMTHEME=gnome. I am looking for a workaround now.

CopperBezel commented 7 years ago

Not sure if this is super-relevant to the thread and probably should have just messaged you directly, but in case others have the problem....

Install Qt5 Configuration Tool, qt5ct, and set the style to GTK2. It'll inherit the GTK2 theme from GNOME.

vageliskatsiotis commented 7 years ago

CopperBezel is it possible to throw some light on how you resolved the kdeconnect issue?

CopperBezel commented 7 years ago

Nothing to do with the extension - even with the extension turned off and legacy tray turned on, I wasn't seeing an indicator; then I reinstalled from the WebUpd8 PPA and it worked in both, and doesn't even require passing the XDG current desktop.

It's worth noting that the tray indicator(s) for KDE Connect correspond to presently connected devices, not the application, and if nothing is active there will be no tray icon, while each device you add will get a separate one. But yeah, seems to behave itself like any ordinary KDE app presenting ordinary appindicators. If there's a bug in the extension related to the app, I didn't encounter it (and naturally don't have a solution.)

vageliskatsiotis commented 7 years ago

@CopperBezel Thank you for this insight! On the other hand when trying to pass the XDG current desktop on config/startup applications/dropbox.desktop it keeps changing to plain "Exec = dropbox" and there for the tray icon gives me the old menu(which I have to click 3 times to make it appear)! Any ideas how to debug this? I'm on Arch / Wayland / Gnome btw.

CopperBezel commented 7 years ago

No insights beyond an ugly workaround. .desktop files do not like doing complicated things. Dropbox itself controls its usual autostart entry, through its Preferences > General > Start Dropbox on system startup setting, and so Dropbox will add or remove its autostart entry once it runs anyway. So instead, I made a .dropbox-autostart.sh in my Home containing the expected:

#!/bin/bash XDG_CURRENT_DESKTOP=Unity dropbox start

Then I set Dropbox not to run at startup in its own preferences, and finally added my script to Startup Applications through the normal GUI. Naturally, it works, but you expect that out of a sledgehammer approach.

I'd do the same for Discord, which doesn't show an icon without setting the XDG current desktop, but I have no use for Discord's tray icon and appreciate the reduced clutter. = P GNOME Background Apps can't come fast enough....

jhasse commented 7 years ago

GNOME Background Apps can't come fast enough....

What would be the best way to get in contact with the GNOME developers about this?

CopperBezel commented 7 years ago

I'm not the person to ask, new at this, not a dev, in the process of writing my first extension if I can fake the JavaScript. What I've been told myself lately is to find an appropriate mailing list, which appears to be this one. Worth noting that GNOME Usage is on the roadmap for 3.26, and includes a friendly list of running apps, which may or may not be relevant to the discussion of the Background Apps whiteboard.

vageliskatsiotis commented 7 years ago

@CopperBezel SledgeHammer or not, it still works so it's a fine solution! Thank you very much again.