Closed precisionpete closed 2 years ago
For Gnome based desktops you need to install and enable the gnome-shell-extension-appindicator
, which we should add to the documentation.
With that enabled the icon will certainly appear and the menu should as well.
For the empty menu I appreciate you have tested many different distros, but were they all running the same (cinnamon?) desktop/window manager? I can replicate the empty menu on Cinnamon but wondering if we can narrow it down to just that one software...
Mint says:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20.3
Release: 20.3
Codename: una
$ wmctrl -m
Name: Mutter (Muffin)
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A
$ cat /etc/X11/default-display-manager
/usr/sbin/lightdm
Ubuntu says:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
$ wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF
$ cat /etc/X11/default-display-manager
/usr/sbin/gdm3
Fedora says:
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 35 (Thirty Five)
Release: 35
Codename: ThirtyFive
$ wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF
Fedora was the worst. I got no icon or anything else. Though, I've not used Fedora in many many years. Is Fedora supposed to work?
@precisionpete try to use fyne.io/systray@master (v1.9.1-0.20220331100914-9177bf851614)
Fedora was the worst. I got no icon or anything else. Though, I've not used Fedora in many many years. Is Fedora supposed to work?
Distros that use modern Gnome will need to install an appindicator/systray plugin as they have removed support by default.
OK I think I cracked it, let me know if this PR fixes things please @precisionpete
Going to assume this is resolved as that is what my testing indicates.
@andydotxyz I'm not able to get the current master working on Linux Mint 20.3
2022/05/27 19:29:08 Failed to register our icon with the notifier watcher, maybe no tray running?
@andydotxyz I'm not able to get the current master working on Linux Mint 20.3
Can you be more specific please? Mint ships in 4 variants with different desktop environments. My guess is that the configuration you are using does not have a appindicator compliant system tray (either none at all, or a legacy one?)
Sorry. On the cinnamon default. Here's more:
$ wmctrl -m
Name: Mutter (Muffin)
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A
$ cat /etc/X11/default-display-manager
/usr/sbin/lightdm
It looks like "Mutter" means that Gnome is loaded, which means the previous comment applies:
For Gnome based desktops you need to install and enable the gnome-shell-extension-appindicator, which we should add to the documentation. With that enabled the icon will certainly appear and the menu should as well.
Did you try that, and/or does it help?
added that package, not sure how to "enable" it. Doesn't show up in tweaks and there is no ~/.local/share/gnome-extensions Same issue.
Sorry I am no expert and it varies from distro to distro. Or there is the source docs instead https://github.com/ubuntu/gnome-shell-extension-appindicator
I have a Go app which needs to run on Linux, Windows, macOS. Getlantern has been a bit flakey for me and I am looking for something better. WebView falls a little short too. But one thing at a time.
I've tried the fyne systray and it works for me on Windows and Mac but not on Linux. Using the example code, I get the Icon but nothing more. Linux is my main development environment. Then I compile it again on Windows and macOS. Not cross-compiled.
I've tested on Linux Mint 20.3 Cinnamon with go 1.18.1. I get the icon and nothing else. It also did the same nothing on Ubuntu 20.04 and nothing at all on Fedora 35. Seems fine on Windows 10 and macOS.
And yes. The getlantern version works fine on the same systems. Except when they release new bugs.
Nothing other than vanilla installs here. In the debug testing, I created clean VMs (VMware 16) using Mint 20.3 (Cinnamon) and Ubuntu 20.04. Nothing special was installed other than the recommended OS updates. The behaviour matched my Development PC's Mint 20.3.
On Fedora 35 I did not get an icon either. But I'm hoping it's part of the same issue.
Using only the example code... And go 1.18.1 on Mint 20.3 Cinnamon. Not a VM but an Intel PC. Also using VScode.
The icon shows up. Hovering over the icon says "Awesome App". Right-click the icon and a tall skinny blank rectangle sometimes pops up (.5" w x 2" h). No text.
Looking forward to getting this going so I can stop using getlantern.
Thanks
go.mod:
main.go: