1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

agent: Make QT_QPA_PLATFORMTHEME=qt5ct work for the pient

* agent/call-pinentry.c (atfork_core): Pass DISPLAY.
This commit is contained in:
Werner Koch 2021-08-13 14:08:53 +02:00
parent 7c45a69eb9
commit 1305baf099
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -211,8 +211,15 @@ atfork_core (ctrl_t ctrl, int debug_mode)
/* For all new envvars (!ASSNAME) and the two medium old ones /* For all new envvars (!ASSNAME) and the two medium old ones
* which do have an assuan name but are conveyed using * which do have an assuan name but are conveyed using
* environment variables, update the environment of the forked * environment variables, update the environment of the forked
* process. */ * process. We also pass DISPLAY despite that --display is also
* used when exec-ing the pinentry. The reason is that for
* example the qt5ct tool does not have any arguments and thus
* relies on the DISPLAY envvar. The use case here is a global
* envvar like "QT_QPA_PLATFORMTHEME=qt5ct" which for example is
* useful when using the Qt pinentry under GNOME or XFCE.
*/
if (!assname if (!assname
|| (!opt.keep_display && !strcmp (name, "DISPLAY"))
|| !strcmp (name, "XAUTHORITY") || !strcmp (name, "XAUTHORITY")
|| !strcmp (name, "PINENTRY_USER_DATA")) || !strcmp (name, "PINENTRY_USER_DATA"))
{ {