-
Notifications
You must be signed in to change notification settings - Fork 15.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No tray icon on Linux (electron@^8) #21445
Comments
Looks like it's Linux-specific - i was briefly concerned i missed something obvious in testing but it works fine on macOS when i run your repro. I'll try to look into this more but @zcbenz may also have more answers |
@codebytere thanks for a fast response. PS The issue is also reproducible on Ubuntu 19.04, the original message got adjuted. |
@vladimiry so it turns out the issue isn't quite that it doesn't get created, it's somehow just very small 😆 See that blue dot in the middle area to the left of slack? that's it. I'll keep digging since, you know, i don't think anyone is really aiming for teeny tiny icons |
@codebytere it might be so, but on Manjaro I can't even see that small dot. The original image has 128x128 size, https://github.com/vladimiry-playground/electron-quick-start-tray-issue/blob/master/icon.png, referenced to the tray here https://github.com/vladimiry-playground/electron-quick-start-tray-issue/blob/c068c1a20ceebf9bbcc543d51edacbfcbb47f5b1/main.js#L34
Yes please don't discriminate Linux users. The temporary fix could be in shipping tiny icons on all platforms, so there is no discrimination 😄 |
Can confirm such behavior on Ubuntu 19.04, a tiny subtle dot, and it's active - tray menu is working. On Manjaro I can't see the dot nor the functional menu (trying randomly clicking on the taskbar guessing transparent icon is somewhere there). |
The tray icon is implemented with Chromium's |
As above-referenced chromimum issue says
The side benefit I noticed is that the left/primary mouse click is being properly handled again after it's being broken starting from the @electron v3, see #14941. So now right click and left click are treated as a different action. Besides Since for now, there is no fully reliable way to guarantee that the tray icon is properly shown on Linux using electron v8+ I'm considering making "startMinimizedToTray" option disabled by default in ElectronMail. I will then add a note |
Since I finally got the tray icon displayed on Linux in one case using @electron version 8 I played around for a while and noticed a few more issues which I'm going to place separately later if I will be able to narrow down the scope and create minimal reproducible projects for them. The following issues (based on preliminary observations):
These issues are off the topic here but wanted to highlight that in general, it's more than just tray icon not being displayed on Linux but the tray menu behavior is also changed. |
|
Kubuntu 19.10 (fresh install): icon well displayed. |
I just resized the icon image from 128x128 down to 32x32 and it got displayed in full size on Ubuntu 19.10 Gnome Shell (fresh install + all updates). So there are ways to make the tray icon displayed on all the systems I tested the case (Ubuntu Gnome Shell, Kubuntu, Manjaro XFCE) and so I don't expect Electron will need to fix something about tray icon displaying but would prefer the issue to remain open for a while as many developers and users will face the same issue switching to Electron version 8. To recap:
|
@vladimiry when adding a new issue, the GitHub issue tracker automatically surfaces relevant issues, so a new developer encountering this problem should be able to find this through those means. Given that you feel this issue has been resolved, and unless there's another need for this issue to remain open that i'm missing context on, for the sake of the issue tracker I think it may be better to close this out. |
Yes this issue is not a blocker, we figured out how to make the icon to be visible on all the popular kinds of Linux, so I'm closing it. There clearly was a major change on how the tray icon on Linux gets displayed, but this change seems to be coming from Chromium. PS But #21499 is a real blocker for me even though it's not labeled as such. |
yeah it is true and linux mint is upgrading the tray as well from v20. |
I am actually sorry to hear the |
This comment has been minimized.
This comment has been minimized.
Sorry to hear that the Dbus tray icon implementation is gone. It was great when it was implemented and the tray function finally worked as designed. |
Yep, tray tooltip was finally working for for me (XFCE, KDE) - which were broken before. Also, tray icon was finally looking good. I am not sure why it was reverted, I have only had things started to work, and all it took was to install some extra packages mentioned in this thread to make new implementation to work. (#21445 (comment)). Seems pretty unreasonable to go back to old implementation when new was working better and all it took was some extra package to install... |
I think the problem is they just do not use features they are developing and therefore do not understand functionality state and reverting 100% working things according to strange or outdated bug reports. |
IMHO, there are plenty DE out there, each implementing one or another one so-called 'standard' to deal with the systray paradigm. This is a mess, yet this is real life. Why electron can't keep both implementation instead of these violent switches bothers me. (I mean : it's electron that pretends to address portability to all OS's and OS flavours, it's not an easy task, but that's what the project is about). |
Tray is still not working with electron 9.1.1 on Ubuntu 18.04 |
I wrote the following code for my main process:
I didn't add the context menu because I had no use. Though I tried adding just in case it was required but it still didn't work. I am not using any rendering process either. I am using Here's how my tray looks: I tried the tray demo from electron-demo-api and the tray icon appears for the demo, so I am pretty sure it's not an OS problem. Similar StackOverflow question. Any ideas on how to fix it? @calidion were you able to get it working? |
Tray is still not working with electron 9.3.0 on Mint 20 |
Preflight Checklist
Issue Details
Expected Behavior
Tray icon created.
Actual Behavior
No tray icon created.
To Reproduce
https://github.com/vladimiry-playground/electron-quick-start-tray-issue
Screenshots
Additional Information
The issue has been partially fixed within #21154
CC @codebytere
The text was updated successfully, but these errors were encountered: