[PATCH GnuPG 2/2] Prefer opening images with xdg-open over display
Nicolas Fella
nicolas.fella at gmx.de
Sun Feb 28 14:34:11 CET 2021
xdg-open respects the user's configured image viewer
and is therefore preferred.
display is still available as a fallback when xdg-open
isn't available.
Signed-off-by: Nicolas Fella <nicolas.fella at gmx.de>
---
g10/photoid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/g10/photoid.c b/g10/photoid.c
index e6f0a41a6..1ba8190b9 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -284,11 +284,11 @@ get_default_photo_command(void)
#else
if (!path_access ("xloadimage", X_OK))
return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
- else if (!path_access ("display",X_OK))
- return "display -title 'KeyID 0x%k' %i";
else if (getuid () && !path_access ("xdg-open", X_OK))
/* xdg-open spawns the actual program and exits so we need to keep the temp file */
return "xdg-open %I";
+ else if (!path_access ("display",X_OK))
+ return "display -title 'KeyID 0x%k' %i";
else
return "/bin/true";
#endif
--
2.30.1
More information about the Gnupg-devel
mailing list