Make it possible to run Kleopatra VSD and Kleopatra GPD in parallel
Testing, HighPublic

Assigned To
Authored By
• ikloecker
Feb 11 2025, 10:35 AM

Description

It should be possible to run Kleopatra VSD and Kleopatra GPD at the same time. Currently, this isn't possible because Kleopatra is a/uses KUniqueService. Both versions use a different GNUPGHOME so that a more general solution based on GNUPGHOME would be a possible solution.

This is closely related to T7040, but I'd like to keep this separate.


Note: This will only be supported by vsd 4 (because it uses a separate GNUPGHOME)

Revisions and Commits

rKLEOPATRA Kleopatra
rW Gpg4win

Event Timeline

• ikloecker moved this task from Backlog to WIP on the gpd5x board.
• ikloecker changed the task status from Open to Testing.Feb 26 2025, 2:01 PM

Remarks:

  • This works now on Windows and with the AppImage. This was achieved by customizing the internal application name of Kleopatra: kleopatra-vsd for GnuPG VS-Desktop, kleopatra-gpd for GnuPG Desktop, kleopatra for everything else.
  • As a side effect the different flavors of Kleopatra now use different names for the main config file and for the state file, i.e. Gpg4win uses kleopatrarc and kleopatrastaterc, GnuPG VS-Desktop will use kleopatra-vsdrc and kleopatra-vsdstaterc, and GnuPG Desktop will use kleopatra-gpdrc and kleopatra-gpdstaterc.
  • The internal application name is also used for config entries retrieved from the registry. That means that for VSD and GPD different registry paths are used in future releases.
  • Testing on Windows requires T7040: Make it possible to install GnuPG VSD and GPD in parallel.
timegrid added a project: test on hold.
timegrid updated the task description. (Show Details)
• ikloecker changed the task status from Testing to Open.Dec 8 2025, 5:27 PM
• ikloecker moved this task from QA to WIP on the gpd5x board.

Reopen because I'm changing the implementation

• ikloecker changed the task status from Open to Testing.Dec 9 2025, 10:59 AM

The new implementation can now be tested (once we have GPD/VSD 4 builds)

All changes have been backported for VSD 3.4 (because they are closely entwined with changes for T7717).

Regarding testing: The next Gpg4win 5 beta can already run concurrently with VSD 3.3. The only problem is that an error about the Windows Explorer integration is shown because only one of the two Kleopatras can listen to the UI server socket. This might be fixed at least partially with VSD 3.4 which will used a different GNUPGHOME.

But there are more fundamental problems that need to be fixed with the Windows Explorer integration (see T7969: GpgEX: Support concurrently running Kleopatras).

• ikloecker mentioned this in Unknown Object (Maniphest Task).Dec 15 2025, 10:00 AM

Back to WIP because I had to fix a regression.

• ikloecker mentioned this in Unknown Object (Maniphest Task).Dec 22 2025, 9:41 AM
• ikloecker mentioned this in Unknown Object (Maniphest Task).Jan 5 2026, 9:18 AM

Seems to work in principle with gpg4win-5.0.2-beta2 and vsd-4.0.0-beta1203.
I'll wait for a new vsd beta release (with some fixes) for further testing.

Note: If both are installed, GpgOL of vsd seems to be used (or the last installed).

timegrid changed the task status from Testing to Open.EditedAug 18 2026, 12:11 PM
timegrid moved this task from QA to WIP on the gpd5x board.

Issues found

  • Parallel installation of gpg4win-5.1.0 and vsd-3.4.0-beta1326 (in that order) results in vsd installed in C:\Program Files (x86)\Gpg4win (C:\Program Files (x86)\GnuPG VS-Desktop does exist, but is empty).
  • Starting vsd kleopatra displays kleopatra.exe org.kde.pim.kleopatra: Looking for VERSION file: "C:/Program Files (x86)/Gpg4win/bin/../VERSION" in debugview.
  • Starting gpg4win kleopatra afterwards displays this error:
  • gpgconf -X in vsd kleopatra displays the correct gpg version (2.2.54), all paths point to Gpg4win (e.g. bindir:C%3a\Program Files (x86)\Gpg4win\GnuPG\bin)
  • gpg --version in cmd displays the gpg4win version (2.5.21), so it is somehow still executable
timegrid moved this task from QA to WIP on the vsd34 board.

I never expected this this to work with vsd34, only with vsd4.0. We could remove the vsd34 tag and add only the vsd tag.
Up to @ikloecker.

I don't think that any of the found issues are up to me. The only real issues seem to be issues with the VSD 3.4 MSI and the MSI is way out of my responsibility. Maybe @m.eik wants to have a look at this especially since the build process for VSD 3.4 and VSD 4 is largely identical.

  • Parallel installation of gpg4win-5.1.0 and vsd-3.4.0-beta1326 (in that order) results in vsd installed in C:\Program Files (x86)\Gpg4win (C:\Program Files (x86)\GnuPG VS-Desktop does exist, but is empty).

If the VSD 3.4 MSI installs to ...\Gpg4win although it should install to GnuPG VS-Desktop then that's an MSI issue.

  • Starting vsd kleopatra displays kleopatra.exe org.kde.pim.kleopatra: Looking for VERSION file: "C:/Program Files (x86)/Gpg4win/bin/../VERSION" in debugview.

There's nothing wrong with this. Kleopatra simply looks for the VERSION file relative to its own location.

  • Starting gpg4win kleopatra afterwards displays this error:

Installing gpgex for VSD and Gpg4win/GPD makes no sense and is bound to cause trouble. Neither gpgex nor gpgol must be installed for VSD and Gpg4win/GPD. Only the parallel installation of Kleopatra is supported.

  • gpgconf -X in vsd kleopatra displays the correct gpg version (2.2.54), all paths point to Gpg4win (e.g. bindir:C%3a\Program Files (x86)\Gpg4win\GnuPG\bin)
  • gpg --version in cmd displays the gpg4win version (2.5.21), so it is somehow still executable

Not sure where you see the issue. Maybe VSD didn't add its path to the PATH variable. No idea if this is intentional. Looks again like an MSI issue.

  • Starting gpg4win kleopatra afterwards displays this error:

Installing gpgex for VSD and Gpg4win/GPD makes no sense and is bound to cause trouble. Neither gpgex nor gpgol must be installed for VSD and Gpg4win/GPD. Only the parallel installation of Kleopatra is supported.

Interesting, this might need to be communicated somewhere. Best would probably be a warning in the installation process?

  • gpgconf -X in vsd kleopatra displays the correct gpg version (2.2.54), all paths point to Gpg4win (e.g. bindir:C%3a\Program Files (x86)\Gpg4win\GnuPG\bin)
  • gpg --version in cmd displays the gpg4win version (2.5.21), so it is somehow still executable

Not sure where you see the issue. Maybe VSD didn't add its path to the PATH variable. No idea if this is intentional. Looks again like an MSI issue.

It was a bit surprising, as vsd was installed last and might have partially overwritten the gpg4win installation. I haven't looked deeper into it, just wanted to share some first impressions of the current state to discuss.

  • Starting gpg4win kleopatra afterwards displays this error:

I misread this initially. If I understand correctly then you started kleopatra from VSD and then kleopatra from Gpg4win while kleopatra VSD was still running? This isn't going to work because GnuPG VSD is using the same GNUPGHOME as GnuPG Gpg4win. That's why there's a collision of the uiserver socket file that kleopatra creates (or tries to create). But there are likely much more serious problems with GnuPG VSD and GnuPG Gpg4win working on the same GNUPGHOME and, more importantly, probably sharing the same socket names for gpg-agent, scdaemon, etc.

you started kleopatra from VSD and then kleopatra from Gpg4win while kleopatra VSD was still running?

That's right.

This isn't going to work because GnuPG VSD is using the same GNUPGHOME as GnuPG Gpg4win.

I see. Then this will only work with vsd4. I'll remove the vsd34 tag and add vsd.

timegrid changed the edit policy from "All Users" to "Contributor (Project)".

I quickly tested gpg4win-5.1.0 + vsd-4.0.0-beta1350-nowin @ win10, and it works:

  • installation in either order
  • running in parallel
  • creating a key in separate GNUPGHOMEs

Thorough tests are still needed.

Note: independent of the installation order, cmd uses the gpg bin from gpg4win. The desired behavior needs to be specified.

• ikloecker changed the task status from Open to Testing.Aug 20 2026, 4:17 PM