Skip to content
Discussion options

You must be logged in to vote

tauri-plugin-single-instance does not have a built-in bypass flag, because plugin registration happens inside your own Rust entrypoint before tauri::Builder::run starts (plugins/single-instance/src/lib.rs:51-56,127-135). If you skip registering tauri_plugin_single_instance::init(...) on tauri::Builder when a child flag or environment variable is present, the spawned child process never checks or acquires the named mutex (Windows), D-Bus name (Linux), or Unix socket (macOS), while normal launches from Explorer or the desktop icon still go through the single-instance lock and focus your main window:

pub fn run() {
    let is_child = std::env::args_os().any(|a| a == "--child-instance")
     …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@A25468451
Comment options

@Gianni300x
Comment options

@A25468451
Comment options

Answer selected by A25468451
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants