You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seeing the same issue. I believe this is a KDE-specific issue, but I hope the maintainers will see fit to address it as KDE is increasingly popular (with good reason.)
Expected Behavior
trayIcon.setToolTip('hello') should result in the tooltip reading "hello."
Actual Behavior
The tooltip reads as the app's title in packaged application, all lowercase, and cannot be changed.
In development, tooltip is locked to "electron".
@hovancik can you share what desktop environment you're using? I'm guessing KDE.
I've just come across this too, looks to be KDE-specific. The tooltip always says "electron" regardless of what's passed to setToolTip. Reproducible in a fresh project using latest Electron version (18.2.0). This has been open for over a year now, is a fix incoming any time soon?
(PS: I'm using KDE/Plasma in Void Linux)
Edit to add: BrowserWindow's skipTaskbar setting also does not work.
It seems to be a bug with libappindicator, GtkStatusIcon works fine (at least on XFCE).
I think Electron should refresh their implementation on libappindicator, many native apps can actually handle mouse clicks with it and update the tooltip so I don't know why it is there a limitation.
The tooltip reads as the app's title in packaged application, all lowercase, and cannot be changed.
It seems to be an actual binary/process name, so if it is lowercase, it will be displayed as such as well. In development, it defaults to electron as it is the default binary name.
This has been open for over a year now, is a fix incoming any time soon?
There's a lot to improve in Electron according to Linux integrations (e.g. buttons with notifications, as libnotify supports that) and for many not the slightest improvement were done (so until we won't see any interest from the Electron developers and they at least confirm it is reproducible on their side, it's probably not going to be fixed by the team). However, some can still be workaround-ed for the existing Electron builds, maybe even this one could be with the magic of native modules.
However, some can still be workaround-ed for the existing Electron builds, maybe even this one could be with the magic of native modules.
I don't think this can or should be fixed that way. The Electron team should investigate and fix this as the community has certainly provided enough details now. Linux is an increasingly popular platform and developers using Electron expect parity in feature set except where otherwise noted in the docs, and this is not otherwise noted.
Is there anyone else besides @viztheman seeing this on XFCE?
@SpacingBat3@viztheman If we could figure out how/under what circumstances this affects XFCE I think we'd be in a situation where we are able to present the Electron devs with all the details necessary for a productive investigation. I thought we were already at that point, but that XFCE is also affected in some situations is news to me. (That's not to say they will investigate it, but at least the community will have done its part.)
If we could figure out how/under what circumstances this affects XFCE I think we'd be in a situation where we are able to present the Electron devs with all the details necessary for a productive investigation.
@slapbox I don't think this issue is dependant on any distribution, but on which library Electron is using to provide the tray indicators. AFAIK GNOME can even display libappindicator with the extensions and I suspect this bug would be reproducible with that as well. If it would be a bug specific to the any distribution, it would mean that something wrong is actually with the libappindicator plugin/applet (or whatever you call that section on your panel) implementations and would likely be reproduceable with non-Electron software as well.
However, a lot of software not only display a custom tooltip and change it at runtime but also is capable of styling it, probably using XML/HTML tags as AFAIK this is supported by either libappindicator applets or generally by desktop environments (GTK actually is capable of using these tags as well in some places). I think styled tooltip might even work with GtkStatusIcon and maybe even actually in Electron, but I would have to test this one.
And there's no circumstances on which this issue occurs. tray.setToolTip just doesn't work with libappindicator and there's no way to modify tooltip at runtime (or create a tray with the custom tooltip, Electron just doesn't support any other way for setting a tooltip than at runtime), you can only modify it by renaming Electron's ELF executable to something else (so I suspect it is taken from the process name before initializing the tray). However, GtkStatusIcon which is being used as a fallback when libappindicator is missing works correctly and even supports the click action as noted in Electron docs.
I don't think this can or should be fixed that way.
I think the one could just use the libappindicator (native library) with the Node native modules to provide a tray entry, but that would be something both hard to maintain and integrate with Electron, so definitely that shouldn't be fixed that way if Electron devs can do this easier and in more productive way.
Can confirm it's still reproducible in my XFCE environment FWIW. Oddly enough, now that I'm installing DPKGs through Electron Forge instead of directly running it, I'm getting the project name as the tooltip (in this case, "Pill-tracker") instead of "Electron." I checked my packages and libappindicator is installed. I don't see GtkStatusIcon installed unless that's a component buried in the guts of Gnome somewhere.
Can also confirm the above behavior happens in Cinnamon. Again, this is Mint 21 Vanessa if that makes any difference.
Installing libappindicator3-1does not fix this issue, although it does fix #22207.
@nornagon I wonder if there's anything the Electron team can do on their end? I had hoped that a newer libappindicator would fix both issues, but the fact it doesn't fix this one makes me think it's a limitation on the Electron side.
Installing libappindicator3-1 does not fix this issue,
IMO, even if there is something you can install that makes this feature work, there shouldn't be. System trays are defined entirely via X props - which means this is no more difficult than setting a window title. If Electron can't just set a few properties and instead assumes some random dependency will be installed to handle this, then it is wildly over-complicating its job.
Activity
soloturn commentedon Apr 18, 2021
there are linux systems which do not have a tray, gnome one of them, see their reasoning here:
https://blogs.gnome.org/aday/2017/08/31/status-icons-and-gnome/
it would be great that electron has a way that a client app can check programmatically "if a tray exists then *.
geekCyberWarrior commentedon Jul 25, 2021
The same issue still persists where the tooltip shown is "electron" irrespective of what is set
Nantris commentedon Feb 17, 2022
Seeing the same issue. I believe this is a KDE-specific issue, but I hope the maintainers will see fit to address it as KDE is increasingly popular (with good reason.)
Expected Behavior
trayIcon.setToolTip('hello')should result in the tooltip reading "hello."Actual Behavior
The tooltip reads as the app's title in packaged application, all lowercase, and cannot be changed.
In development, tooltip is locked to "electron".
@hovancik can you share what desktop environment you're using? I'm guessing KDE.
ReazerDev commentedon Apr 15, 2022
Can confirm. I have the same issue with KDE.
Adamcake commentedon May 4, 2022
I've just come across this too, looks to be KDE-specific. The tooltip always says "electron" regardless of what's passed to setToolTip. Reproducible in a fresh project using latest Electron version (18.2.0). This has been open for over a year now, is a fix incoming any time soon?
(PS: I'm using KDE/Plasma in Void Linux)
Edit to add: BrowserWindow's skipTaskbar setting also does not work.
cuikho210 commentedon Jul 29, 2022
I am also getting the same error on Manjaro KDE,
[email protected].setToolTipnot working and the tooltip always shows 'electron'.viztheman commentedon Sep 4, 2022
It's not just KDE. I'm running XFCE on Mint Vanessa, and I'm seeing the same thing (i.e. tooltips only say "electron" when you hover over them).
SpacingBat3 commentedon Sep 4, 2022
It seems to be a bug with
libappindicator,GtkStatusIconworks fine (at least on XFCE).I think Electron should refresh their implementation on
libappindicator, many native apps can actually handle mouse clicks with it and update the tooltip so I don't know why it is there a limitation.It seems to be an actual binary/process name, so if it is lowercase, it will be displayed as such as well. In development, it defaults to
electronas it is the default binary name.There's a lot to improve in Electron according to Linux integrations (e.g. buttons with notifications, as
libnotifysupports that) and for many not the slightest improvement were done (so until we won't see any interest from the Electron developers and they at least confirm it is reproducible on their side, it's probably not going to be fixed by the team). However, some can still be workaround-ed for the existing Electron builds, maybe even this one could be with the magic of native modules.Nantris commentedon Sep 5, 2022
I don't think this can or should be fixed that way. The Electron team should investigate and fix this as the community has certainly provided enough details now. Linux is an increasingly popular platform and developers using Electron expect parity in feature set except where otherwise noted in the docs, and this is not otherwise noted.
Is there anyone else besides @viztheman seeing this on XFCE?
@SpacingBat3 @viztheman If we could figure out how/under what circumstances this affects XFCE I think we'd be in a situation where we are able to present the Electron devs with all the details necessary for a productive investigation. I thought we were already at that point, but that XFCE is also affected in some situations is news to me. (That's not to say they will investigate it, but at least the community will have done its part.)
SpacingBat3 commentedon Sep 5, 2022
@slapbox I don't think this issue is dependant on any distribution, but on which library Electron is using to provide the tray indicators. AFAIK GNOME can even display
libappindicatorwith the extensions and I suspect this bug would be reproducible with that as well. If it would be a bug specific to the any distribution, it would mean that something wrong is actually with thelibappindicatorplugin/applet (or whatever you call that section on your panel) implementations and would likely be reproduceable with non-Electron software as well.However, a lot of software not only display a custom tooltip and change it at runtime but also is capable of styling it, probably using XML/HTML tags as AFAIK this is supported by either
libappindicatorapplets or generally by desktop environments (GTK actually is capable of using these tags as well in some places). I think styled tooltip might even work withGtkStatusIconand maybe even actually in Electron, but I would have to test this one.And there's no circumstances on which this issue occurs.
tray.setToolTipjust doesn't work withlibappindicatorand there's no way to modify tooltip at runtime (or create a tray with the custom tooltip, Electron just doesn't support any other way for setting a tooltip than at runtime), you can only modify it by renaming Electron's ELF executable to something else (so I suspect it is taken from the process name before initializing the tray). However,GtkStatusIconwhich is being used as a fallback whenlibappindicatoris missing works correctly and even supports theclickaction as noted in Electron docs.I think the one could just use the
libappindicator(native library) with the Node native modules to provide a tray entry, but that would be something both hard to maintain and integrate with Electron, so definitely that shouldn't be fixed that way if Electron devs can do this easier and in more productive way.viztheman commentedon Sep 6, 2022
Can confirm it's still reproducible in my XFCE environment FWIW. Oddly enough, now that I'm installing DPKGs through Electron Forge instead of directly running it, I'm getting the project name as the tooltip (in this case, "Pill-tracker") instead of "Electron." I checked my packages and
libappindicatoris installed. I don't seeGtkStatusIconinstalled unless that's a component buried in the guts of Gnome somewhere.Can also confirm the above behavior happens in Cinnamon. Again, this is Mint 21 Vanessa if that makes any difference.
Nantris commentedon Oct 28, 2022
Installing
libappindicator3-1does not fix this issue, although it does fix #22207.@nornagon I wonder if there's anything the Electron team can do on their end? I had hoped that a newer
libappindicatorwould fix both issues, but the fact it doesn't fix this one makes me think it's a limitation on the Electron side.Adamcake commentedon Oct 29, 2022
IMO, even if there is something you can install that makes this feature work, there shouldn't be. System trays are defined entirely via X props - which means this is no more difficult than setting a window title. If Electron can't just set a few properties and instead assumes some random dependency will be installed to handle this, then it is wildly over-complicating its job.
hovancik commentedon Dec 20, 2022
Seems to work fine :) Thanks!