summaryrefslogtreecommitdiffstats
path: root/agent/call-pinentry.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-08-13 14:08:53 +0200
committerWerner Koch <wk@gnupg.org>2021-08-13 14:08:53 +0200
commit1305baf0994059f458b1d5ca28a355c12932fab3 (patch)
tree831243a9950ab25584fd8839dd485c9a5e4d49e4 /agent/call-pinentry.c
parentagent: New option --check-sym-passphrase-pattern. (diff)
downloadgnupg2-1305baf0994059f458b1d5ca28a355c12932fab3.tar.xz
gnupg2-1305baf0994059f458b1d5ca28a355c12932fab3.zip
agent: Make QT_QPA_PLATFORMTHEME=qt5ct work for the pient
* agent/call-pinentry.c (atfork_core): Pass DISPLAY.
Diffstat (limited to '')
-rw-r--r--agent/call-pinentry.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index 585ddefac..ee617db53 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -211,8 +211,15 @@ atfork_core (ctrl_t ctrl, int debug_mode)
/* For all new envvars (!ASSNAME) and the two medium old ones
* which do have an assuan name but are conveyed using
* 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
+ || (!opt.keep_display && !strcmp (name, "DISPLAY"))
|| !strcmp (name, "XAUTHORITY")
|| !strcmp (name, "PINENTRY_USER_DATA"))
{