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 163 forks source link

Dropbox icon won't accept clicks until appindicator extension is restarted #529

Open ferdnyc opened 5 months ago

ferdnyc commented 5 months ago

I suspect this is their/Qt's fault, and possibly related to / the same as #516 as they do use Qt for their interface (PyQt5, I believe), but just for the record...

With version 58 of the extension and these Dropbox versions:

Dropbox daemon version: 200.3.7099 Dropbox command-line interface version: 2023.09.06

When the dropbox daemon is started or restarted, its icon comes up, but will not accept any clicks. Restarting the "AppIndicator and KStatusNotifierItem Support" extension (by switching it off and back on again in the Extensions app) restores the ability to click on the Dropbox tray icon.

SimonAulet commented 4 months ago

Same here. Let me know if I can help in anyway

shaoyuanyu commented 4 months ago

I come across the same problem. I'm using Fedora 40 with version 58 of the extension.

netsurfer38 commented 4 months ago

An alternative, for activating the Dropbox Menu, to restarting the "AppIndicator and KStatusNotifierItem Support" gnome extension is Lock the screen using "Windows+L" or "Super+L" and then unlocking the screen again.

ferdnyc commented 4 months ago

@netsurfer38 Huh! That's interesting, and may help track down the issue. Thanks.

As I mentioned in a dropbox forum thread on the issue, on my own system this isn't an issue at startup (though that's not the reason I set things up this way), because I've switched from starting dropbox via its autostart file to using a systemd user unit. That lets dropbox start before the AppIndicator extension, which means the extension doesn't have to be restarted to make the Dropbox menu accessible.

The dropbox.service unit file I use is this:

[Unit]
Description=Dropbox Network Storage Daemon
After=network-online.target graphical-session.target gnome-shell.service

[Service]
Type=forking
PIDFile=%h/.dropbox/dropbox.pid
ExecStart=/usr/bin/dropbox start -i
ExecStop=/usr/bin/dropbox stop
Restart=on-failure

[Install]
WantedBy=default.target

(With Dropbox installed in /usr/bin/ from the Dropbox RPM. If it's installed somewhere else the paths should be adjusted accordingly, or removed entirely if it's somewhere on the $PATH.)

And I've gone into the Dropbox preferences and disabled "Start Dropbox on system startup", to ensure that the $HOME/.config/autostart/ file Dropbox installs is disabled.

ferdnyc commented 4 months ago

(Whenever I have to systemctl --user restart dropbox.service — because the icon does get lost, sometimes — then I have to restart the AppIndicator extension afterwards. Or, I guess, from what @netsurfer38 says, just lock and unlock the screen.)

winter-sunny-morning commented 3 months ago

Same thing happens with Lantern.

mvrk69 commented 3 months ago

Same think happens with hp-systray from hplip, after it starts its fine, but after it gets the first status update from the printer all the menu options on the systray menu stop working. Only way to get them to work again is restart (disable/enable) the "AppIndicator and KStatusNotifierItem Support" extension on the Extensions app or lock/unlock the screen.

ferdnyc commented 3 months ago

Hmm. PyQt5 is the common thread there, too.

ferdnyc commented 3 months ago

@mvrk69

Same think happens with hp-systray from hplip

Actually, on further investigation I don't think that's the same thing at all.

With the Dropbox extension, when it first starts up it does literally NOTHING in response to clicks — clicking the icon has no effect.

With the HP app, in my experience the menu always comes up (already more functional than Dropbox), it's just that the menu entries can stop working for... some reason. That's a totally different thing, and seems much more likely to be entirely HP's fault. They're doing all sorts of unnecessarily-complicated things with process-forking in their code. (hp-systray creates three processes on launch, just to show the system tray...)

But if the HP systray app shows its menu at all in response to clicks, even if the menu items aren't functional (something that's entirely on HP to get right), then that probably isn't this issue.

frankhuurman commented 2 months ago

Exact same issue here after upgrading from Ubuntu 22.04.4 to 24.04.1 and grabbing the latest Dropbox(Ubuntu 23.10 and higher) .deb. At first it didn't respond to any clicks, after an hour or so I tried clicking it again and it gave me a blank menu: image

And after I read this issue I toggled the Ubuntu appindicators extension off/on and now the menu is actually functional: image

This issue was non-existent with the 22.04 Dropbox .deb on Ubuntu 22.04.

ahydronous commented 1 month ago

I see these errors in the command line, not sure if they are related:

(dropbox:5078): LIBDBUSMENU-GLIB-WARNING **: 15:09:12.235: About to Show called on an item wihtout submenus.  We're ignoring it.

(dropbox:5078): Gtk-CRITICAL **: 15:09:31.571: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed

(dropbox:5078): Gtk-CRITICAL **: 15:09:32.000: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed