Skip to content

[Bug]: Tray tooltips on GNU, bugs, inconsistencies, a summary. #28956

Closed

Description

@kroko

Preflight Checklist

Electron Version

12.0.5

What operating system are you using?

Other Linux

Operating System Version

Multiple latest LTS, please see below.

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

.setToolTip('MyNiceAppName') method should produce tooltip on DEs that support it.

Actual Behavior

App I'm working on is "Tray app"

  • uses .setApplicationMenu(null)

My observation is that on outmost setups tooltip shows up, but it contains package.json name not the name as set via .setToolTip('MyNiceAppName').

that is

  • not MyNiceAppName,
  • but my-pkg-cryptic-name

All setups below used AppImage which was integrated via AppImageLauncher, x64.

  • Kubuntu
    • 20.04.2 LTS Focal Fossa (KDE Plasma 5, X11) : my-pkg-cryptic-name
  • Linux Mint
    • 20.1 Ulyssa Cinnamon (Cinnamon, X11) : My-pkg-cryptic-name (yes, sentence case)
    • 20.1 Ulyssa MATE (MATE, X11) : no tooltip (other tray services (network, sound, time widgets, etc) have tooltip)
  • Xubuntu
    • 20.04.2 LTS Focal Fossa (Xfce + Xfwm, X11) : my-pkg-cryptic-name, and on newline one word - icon (other tray services (network, sound, time widgets, etc) have tooltip, in one line, no additional random txt)
  • Ubuntu
    • 20.04.2 LTS Focal Fossa (GNOME 3, X11) : no tooltip, as expected (because gnome, no items in tray have tooltips)
    • 18.04.5 LTS Bionic Beaver (GNOME 3, X11) : no tooltip, as expected ( -- || --)
    • 16.04.7 LTS Xenial Xerus (Unity 7, X11) : no tooltip, as expected (unity 7 does not have tooltips in tray, and this is depr anyways)

Testcase Gist URL

No response

Additional Information

Related to this #28131, but I tried generalising it in this ticket.

At some point I will also try some other extra DEs. And also non Debian distros, but IMHO results will match these, as it is about DEs / shells.

Activity

  1. kroko commented on May 2, 2021

    @kroko
    Author

    One way of avoiding my-pkg-cryptic-name and having MyNiceAppName is to set

    const pkg = require(path.resolve(__dirname, 'package.json'));
    // ...
    
      linux: {
        // https://github.com/electron/electron/issues/28956
        executableName: pkg.productName,
       // ...
      }

    in electron builder config.

    That at least produces a static tooltip that is meaningful. If someone does not need dynamic content tooltips AND the tooltip could be just app name AND app name is just one word without spaces it's a quick workaround.

  2. Kilian commented on May 3, 2021

    @Kilian
    Member

    You can also specify a productName that includes spaces, capitals etc in your package.json and my understanding is that it will use that when available :)

  3. kroko commented on May 4, 2021

    @kroko
    Author

    @Kilian although we really are in the second decade of the 21st century I'd still suggest not using spaces in *NIX executable names 😄

  4. Vovan-VE commented on Jan 27, 2022

    @Vovan-VE

    I suppose it should be here.
    tray-icons-tooltip 3

    Apps on the picture in order: Space, Mailspring, Skype, Slack, Discord. They are all displaying literally "icon" tooltip for years since a tooltip was introduced. The tooltip is surely never displayed anything else.

    Ubuntu 20.04, XFCE 4.14.
    In previous Ubuntu 18.04 + XFCE I don't remember exactly: either it was the same, or there was no tooltip.

  5. Vovan-VE commented on Sep 19, 2022

    @Vovan-VE

    Finally, it's now much better on XFCE (4.16). Thank you, people!

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions