Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions ee/desktop/user/notify/notify_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,17 @@ func (d *dbusNotifier) sendNotificationViaDbus(n Notification) error {

notificationsService := conn.Object(notificationServiceInterface, notificationServiceObj)
call := notificationsService.Call("org.freedesktop.Notifications.Notify",
0, // no flags
"Kolide", // app_name
uint32(0), // replaces_id -- 0 means this notification won't replace any existing notifications
d.iconFilepath, // app_icon
n.Title, // summary
n.Body, // body
actions, // actions
map[string]dbus.Variant{}, // hints
int32(0)) // expire_timeout -- 0 means the notification will not expire
0, // no flags
"Kolide", // app_name
uint32(0), // replaces_id -- 0 means this notification won't replace any existing notifications
d.iconFilepath, // app_icon
n.Title, // summary
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.

}, // hints
int32(0)) // expire_timeout -- 0 means the notification will not expire

if call.Err != nil {
d.slogger.Log(context.TODO(), slog.LevelError,
Expand Down Expand Up @@ -251,7 +253,8 @@ func (d *dbusNotifier) sendNotificationViaNotifySend(n Notification) error {
n.Body += " " + learnMoreLabel(d.localizationPath) + ": " + n.ActionUri
}

args := []string{n.Title, n.Body}
// We set an urgency of "critical" so that the notification does not auto-close quickly.
args := []string{n.Title, n.Body, "-u", "critical"}
if d.iconFilepath != "" {
args = append(args, "-i", d.iconFilepath)
}
Expand Down