Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions packaging/io.github.onyks_os.UsbguardGui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ finish-args:
- --system-talk-name=org.usbguard1
# --diagnose asks systemd whether usbguard.service is active (read-only).
- --system-talk-name=org.freedesktop.systemd1
# Notifications and the tray are not implemented yet; their permissions
# (搂14.1) are added together with the features.
# The status icon (StatusNotifierItem). Notifications need no permission:
# GApplication sends them through the portal inside a sandbox.
- --talk-name=org.kde.StatusNotifierWatcher

modules:
- name: usbguard-gui
Expand Down
8 changes: 7 additions & 1 deletion src/ui/tray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ pub(super) fn start(commands: Sender<TrayCommand>, reply: Sender<TrayResult>) {
total: 0,
blocked: 0,
};
let result = tray.spawn().await.map_err(|e| e.to_string());
// A sandbox cannot own the StatusNotifierItem-PID-N name the
// specification asks for; the watcher accepts the unique name.
let result = tray
.disable_dbus_name(super::autostart::sandboxed())
.spawn()
.await
.map_err(|e| e.to_string());
let _ = reply.send(result).await;
});
}
Expand Down
Loading