(Cross posting to Development Forum https://portableapps.com/node/71332)
Hi, I would like to request for proper support for single instance in the Launcher.
The app has an option to toggle single instance, but the Launcher ignores it and runs multiple instances.
According to https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.i..., the SinglePortableAppInstance flag is false by default, which should resolve this issue.
Thanks
The KeePassXCPortable.exe launcher launches KeePassXC.exe without any command line options or anything that would make multiple instances appear. If the app itself has a single instance mode and it is set, the launcher isn't doing anything that should interfere with it.
Sometimes, the impossible can become possible, if you're awesome!
hi John, i'm not sure if there were many changes since a year back, but i have perform the testing with the latest 2.7.10:
testing with KeePassXC.exe directly:
1. launch first instance of App\KeePassXC\KeePassXC.exe
2. ensure single instance of KeePassXC is enabled in Tools > Settings > Startup (otherwise enable it and restart exe from step 1)
3. launch second instance of App\KeePassXC\KeePassXC.exe
4. KeePassXC would detect previous instance correctly, and opens the first instance
however this does not work with KeePassXCPortable.exe:
1. launch first instance of KeePassXCPortable.exe
2. ensure single instance of KeePassXC is enabled in Tools > Settings > Startup (otherwise enable it and restart portable from step 1)
3. launch second instance of KeePassXCPortable.exe
4. KeePassXC would NOT detect previous instance, and opens another separate instance
This shows that KeePassXCPortable is interfering with the KeePassXC single instance detection.
Looks like KeePassXC is using Qt's QLockFiles to track instances instead of standard Windows APIs for processes or CreateMutex. QLockFiles uses TEMP files to try to track processes instead. This gets messy when we're trying to keep an eye on any TEMP files that KeePassXC itself is leaving behind.
You can disable the TEMP containment by opening up the KeePassXCPortable.ini file within KeePassXCPortable\App\AppInfo\Launcher and adding the line CleanTemp=false to the end of the [Launch] section.
I'll need to figure out if this will leave anything behind and, if not, include this change in the next release.
Sometimes, the impossible can become possible, if you're awesome!
yes! single instance works with CleanTemp=false as you have suggested.
assuming testing using TempForPortableApps could address your concerns
nse6FBB.tmp
keepassxc-username.lock
nse6FBB.tmp
both testing does not leave any files behind in TempForPortableApps