Skip to content

Ensure notifications don't auto-close very quickly on Linux - #2802

Merged
RebeccaMahany merged 1 commit into
kolide:mainfrom
RebeccaMahany:becca/fix-notification-auto-close
Aug 24, 2026
Merged

Ensure notifications don't auto-close very quickly on Linux#2802
RebeccaMahany merged 1 commit into
kolide:mainfrom
RebeccaMahany:becca/fix-notification-auto-close

Conversation

@RebeccaMahany

Copy link
Copy Markdown
Contributor

Per https://specifications.freedesktop.org/notification/latest-single/#urgency-levels:

For low and normal urgencies, server implementations may display the notifications how they choose. They should, however, have a sane expiration timeout dependent on the urgency level.

Critical notifications should not automatically expire, as they are things that the user will most likely want to know about. They should only be closed when the user dismisses them, for example, by clicking on the notification.

On multiple versions of Ubuntu for me, notifications auto-close incredibly quickly, ignoring our expire_timeout value. Therefore, I am updating to set the urgency for notifications for "critical", which will give us the behavior that we want: the notification does not go away until the user dismisses it.

@RebeccaMahany RebeccaMahany added the bug-fixes Bug Fixes label Aug 24, 2026
@RebeccaMahany
RebeccaMahany marked this pull request as ready for review August 24, 2026 19:07
n.Body, // body
actions, // actions
map[string]dbus.Variant{
"urgency": dbus.MakeVariant(uint8(2)), // Without an urgency of "critical", the notification auto-closes extremely quickly

@RebeccaMahany RebeccaMahany Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that setting to 1 ("normal") gives us (approximately) 5 seconds on my device. I think I still prefer the behavior of critical, but if we don't like that option, "normal" would still be a behavior improvement for us.

@brhoades brhoades left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird. I run mako, and the expire_timeout setting of 0 makes the notification never disappear.

Works before and after 👍. LGTM

@RebeccaMahany

Copy link
Copy Markdown
Contributor Author

@brhoades ooh that's interesting! thank you for testing as well

@RebeccaMahany
RebeccaMahany added this pull request to the merge queue Aug 24, 2026
Merged via the queue into kolide:main with commit 258c4e8 Aug 24, 2026
50 checks passed
@RebeccaMahany
RebeccaMahany deleted the becca/fix-notification-auto-close branch August 24, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fixes Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants