In Linux, if I run Firefox as the current user that also runs the gui, and Firefox is already loaded, it simply opens a new window.
If I run Firefox via ‘pkexec --user username firefox’, the first run of it starts a new Firefox instance, as expected. However, if I run the same command again, it is unable to find the instance it previously created. Instead it gives the error: “Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile. For some reason, Firefox is unable to connect to the existing instance.”
What prevents Firefox from finding its running instance? Or, how does Firefox determine the current running instance? How could I provide it the details needed to find the running instance, as it does when run a second time as the main gui user?