Public bug reported:

## Description

Thunderbird 161 introduced support for unread message count badges on
Linux taskbars. However, when using the Snap package on KDE Plasma, the
badge is not displayed because AppArmor blocks the corresponding D-Bus
signal.

## Environment

- OS: Kubuntu
- KDE Plasma: 6.6.6
- Session type: Wayland
- Thunderbird: 161.0-1 (Snap)
- Snap revision: 1346
- Publisher: Canonical

## Steps to reproduce

1. Install or update Thunderbird to version 161 using Snap.
2. Launch Thunderbird in a KDE Plasma session.
3. Mark an email as unread.
4. Observe the Thunderbird icon in the taskbar.

## Expected behavior

The number of unread emails is displayed as a badge on the Thunderbird
taskbar icon.

## Actual behavior

No badge is displayed. Other applications, such as Teams for Linux,
display their notification badges correctly.

Using `dbus-monitor`, I confirmed that Thunderbird correctly emits the
`com.canonical.Unity.LauncherEntry.Update` signal with the correct
desktop ID (`application://thunderbird_thunderbird.desktop`), message
count and `count-visible=true`.

However, the system journal contains the following AppArmor denial:

```
apparmor="DENIED" operation="dbus_signal"
bus="session" path="/Unity"
interface="com.canonical.Unity.LauncherEntry"
member="Update" mask="send"
name="com.canonical.Unity"
label="snap.thunderbird.thunderbird"
peer_label="plasmashell"
```

The Thunderbird Snap does not provide a `unity7` plug.

## Confirmed workaround

Edit the generated AppArmor profile:

```bash
sudoedit /var/lib/snapd/apparmor/profiles/snap.thunderbird.thunderbird
```

Add the following rule before the final closing brace:

```
  dbus (send)
      bus=session
      path=/Unity
      interface=com.canonical.Unity.LauncherEntry
      member=Update
      peer=(name=com.canonical.Unity, label=plasmashell),
```

Reload the AppArmor profile:

```bash
sudo apparmor_parser -r \
/var/lib/snapd/apparmor/profiles/snap.thunderbird.thunderbird
```

Restart Thunderbird.

After applying this workaround, the unread message badge works correctly
under KDE Plasma on Wayland, without disabling AppArmor or the Snap
sandbox.

However, this manual modification may be overwritten by future Snap
updates.

## Suggested fix

Update the relevant Snap AppArmor policy to allow Unity LauncherEntry
update signals to be sent to KDE Plasma (`plasmashell`).

## Related upstream issue

https://bugzilla.mozilla.org/show_bug.cgi?id=1551864

** Affects: thunderbird (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2176169

Title:
  Thunderbird 161 Snap: unread mail taskbar badge blocked by AppArmor on
  KDE Plasma

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/2176169/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to