IsmaelMartinez / teams-for-linux

Unofficial Microsoft Teams for Linux client
GNU General Public License v3.0
2.77k stars 229 forks source link

Trayicon stopped working on Unity #888

Closed kaymes closed 1 year ago

kaymes commented 1 year ago

Describe the bug Since the latest update to version "1.2.3 2023-07-09 (415)", the tray icon is no longer showing on Ubuntu Unity.

It seems to still work on the normal Gnome Desktop. It used to work fine on the Unity Desktop until the teams snap updated to the latest version.

I reverted the snap to the previously installed version 1.1.11 which works fine and shows the tray icon as expected.

To Reproduce Steps to reproduce the behavior:

  1. Run Ubuntu Unity desktop, version 23.04
  2. Install teams-for-linux 1.2.3
  3. Launch it
  4. Don't see a tray icon

Expected behavior A tray icon should be shown

Desktop (please complete the following information):

I'm happy to try other versions (if you tell me how) to work out where the braking change is.

jijojosephk commented 1 year ago

You'll find the same problem with all sand-boxed environments like snap, flatpak etc. Workaround is to use native package from the releases page 1.2.3. We're yet to figure the root cause. Probably something changed in the upstream chromium or even electron projects. If you want automatic updates you refer this: https://github.com/IsmaelMartinez/teams-for-linux#debianubuntu-and-other-derivatives

jijojosephk commented 1 year ago

But one thing we're sure, chromium now supports only KStatusNotifierItem. If unity uses libappindicator, that's the obvious reason why you don't see it.

kaymes commented 1 year ago

But one thing we're sure, chromium now supports only KStatusNotifierItem. If unity uses libappindicator, that's the obvious reason why you don't see it.

Is this limitation a new thing? I couldn't find anything definitive on the topic but it could well be that KStatusNotifierItem support is missing. Is there an easy way to test this?

jijojosephk commented 1 year ago

Can you check if this works? https://github.com/electron/electron/issues/38140#issuecomment-1619218462

kaymes commented 1 year ago

I just tried it. Launching the snap package version 1.2.3 from a terminal via XDG_CURRENT_DESKTOP="" teams-for-linux solves most of it: an icon shows up in the tray and it is functional (i.e., the menu pops up, I get notifications for new messages, etc.). However, the icon itself is a generic one, not the usual purple teams logo.

jijojosephk commented 1 year ago

I just tried it. Launching the snap package version 1.2.3 from a terminal via XDG_CURRENT_DESKTOP="" teams-for-linux solves most of it: an icon shows up in the tray and it is functional (i.e., the menu pops up, I get notifications for new messages, etc.). However, the icon itself is a generic one, not the usual purple teams logo.

The problem with icon could be something the workaround solution is not able to achieve. Will GNOME extensions work in Unity? I'm not familiar. We wanted to have the app built on the latest electron, that's why we did the upgrade. This KSNI thing is something all DEs should now be implementing or to be supported by some extensions.

kaymes commented 1 year ago

I just installed the version from the .deb repository which is still 1.2.2. Started with the workaround XDG_CURRENT_DESKTOP="" /usr/bin/teams-for-linux the tray icon comes up correctly.

So it's either a regression that happened between 1.2.2 and 1.2.3 or it's an issue with the snap sandbox.

I'll stick with the .deb for now - apt has a smoother upgrade experience than snap anyway.

jijojosephk commented 1 year ago

The problem is with sandbox.

kaymes commented 1 year ago

I found this Electron bug and added some more information about the XDG_CURRENT_DESKTOP issue: https://github.com/electron/electron/issues/38979#issuecomment-1630025534

jijojosephk commented 1 year ago

I found this Electron bug and added some more information about the XDG_CURRENT_DESKTOP issue: electron/electron#38979 (comment)

Thanks. I just don't get why different DEs use different nomenclature for XDG_CURRENT_DESKTOP, if something had followed strictly, we could do something programmatically.

jijojosephk commented 1 year ago

Is the right tray icon being rendered now?

jijojosephk commented 1 year ago

Work around provided. Hence closing it. Please re-open if required.