Closed roman-yagodin closed 6 years ago
It's probably better to use session id instead of username for this, but System.Diagnostics.Process.GetCurrentProcess().SessionId
always returns 0 for different desktop sessions on Linux (Mono). Environment.GetEnvironmentVariable ("XDG_SESSION_ID")
looks like a promising fallback option.
Unable to start app if another instance already running in different desktop session as both are share same wait handle.