zocker-160 / SyncThingy

SyncThingy = Syncthing + simple tray indicator
GNU General Public License v3.0
128 stars 1 forks source link

Syncthingy GUI doesn't pull up on GNOME Desktop. #37

Open TutorialsOnDeck opened 1 day ago

TutorialsOnDeck commented 1 day ago

Tested with Fedora Linux 41.20241120.0 (Silverblue) - Fresh install and default user settings out of the box. Wayland compositor. Syncthingy v0.75 Syncthing v1.28.0

With a completely Vanilla GNOME Desktop: The Syncthingy program does not create a GUI menu either from clicking the icon in Apps or finding the already running program under the menu in the upper right (shows as "1 Background App").

Syncthingy is shown running as a 'background App' and syncthingy + syncthing are shown in HTOP / task manager. All functions are working except the GUI for Syncthingy never appears.

If you use plugins to alter your UI, such as Appindicator, Clicking the Syncthingy icon generated by this plugin on the panel will reveal the "choose your option" menu and allows the Settings GUI to appear as expected.

If I had to guess why this occurs, it is because Syncthingy does not generate an app window / GUI until you select "Settings". Gnome may not recognize popup menus as actual Apps and thus no App GUI is generated.

GNOME must be either blocking/suppressing the selection menu from popping up or is not coded to acknowledge such menus from Background App indicators. A workaround may be to have the Syncthingy application spawned / generated on click instead of providing a "what do you want to do" menu. Do away with the menu and just add a WebUI config link and all other features to the Syncthingy 'Settings' popup instead.

It sucks having to potentially rewrite YOUR program to fit what GNOME thinks is the correct way of doing things but GNOME is the flagship DE for many corporate Linux distros. I am not telling you what you should do with your program; this just popped up in my deployment testing. I use KDE personally.

zocker-160 commented 1 day ago

Thank your for this report, sadly you are not the first reporting issues with GNOME so I am aware of it.

First of all, I personally am testing this application on Ubuntu GNOME and there the tray icon + menu do work fine with the limitation that left-click and right-click are both registered as "request context menu" (unlike in KDE).

I suspect that Ubuntu has changed their version of GNOME is a way to make this work, I think you can understand that I cannot test all of the possible Distro + DE + potential patches combinations available out there.

GNOME must be either blocking/suppressing the selection menu from popping up or is not coded to acknowledge such menus from Background App indicators.

Is there a "proper" way of implementing tray icons or if this is just something GNOME developers don't want to exist. Sadly there is not much I can do here anyway, since all I am doing is using QT's QSystemTrayIcon implementation.

A workaround may be to have the Syncthingy application spawned / generated on click instead of providing a "what do you want to do" menu.

I do like this idea in general, but there are sadly a few problems that would make usage more complicated from a user's perspective. Right now left-click (mouse primary) opens the WebUI and right-click (mouse secondary) opens the context menu. IMO this is intuitive and expected behavior. The reason why I don't spawn a window when starting the application is to make it easy for users to add it to autostart without having to click a window away every time or having to provide additional CLI arguments.

Originally this application was made for the Steam Deck where making it as simple as possible way my primary goal.

TL;DR:
I am willing to implement workarounds to make it work on GNOME, but currently I am not aware of a "proper" way of implementing tray indicators on vanilla GNOME given that (from what I can see) many other applications suffer from the same problem.

zocker-160 commented 1 day ago

Update from my side:

I just looked into the source code and I completely forgot, that I am already implementing what you are proposing. Currently I am opening a window and resizing it to (0, 0) to make the tray icon even show up at all.

That this doesn't seem to work anymore is unfortunate, but sadly nothing really I can do.

zocker-160 commented 6 hours ago

I just tested on Ubuntu 24.04 and it works fine grafik

I don't think here is anything actionable for me.