[Gtk-rs] How to determine if an app is already running with app id


How can I determine if an instance of my gtk app with domain name, for example, com.gitlab.myproject is already running?

You could use a unique file lock with optional process ID or then just the domain name for testing. See file_lock crate for one way of achieving this: https://docs.rs/file-lock/1.1.20/file_lock/