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
6 changes: 6 additions & 0 deletions .changes/single-instance-dbus-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"single-instance": patch
---

Fix D-Bus name replacement logic on Linux to prevent multiple instances from acquiring the same well-known name.
This patch updates the `zbus` dependency to the latest compatible version (`^5.9`) and explicitly sets `RequestNameFlags` to ensure a second instance fails to acquire the D-Bus name when another one is already running.
47 changes: 11 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ schemars = "0.8"
dunce = "1"
specta = "^2.0.0-rc.16"
glob = "0.3"
zbus = "5"
zbus = "5.9"

[workspace.package]
edition = "2021"
Expand Down
2 changes: 2 additions & 0 deletions plugins/single-instance/src/platform_impl/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
.unwrap()
.name(dbus_name.as_str())
.unwrap()
.replace_existing_names(false)
.allow_name_replacements(false)
.serve_at(dbus_path.as_str(), single_instance_dbus)
.unwrap()
.build()
Expand Down
Loading