[PATCH GnuPG 2/2] Prefer opening images with xdg-open over display

Nicolas Fella nicolas.fella at gmx.de
Mon Mar 1 10:29:03 CET 2021


Hi Ingo,

no reason, IMHO xdg-open should be preferred over xloadimage too, but
Werner seems to disagree on that, for valid reasons.

Cheers

Nico

On 2/28/21 5:40 PM, Ingo Klöcker wrote:
> Hi Nicolas,
>
> any reason why xloadimage should still be preferred over xdg-open?
>
> Regards,
> Ingo
>
> On Sonntag, 28. Februar 2021 14:34:11 CET Nicolas Fella via Gnupg-devel wrote:
>> 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
>>
>>
>> _______________________________________________
>> Gnupg-devel mailing list
>> Gnupg-devel at gnupg.org
>> http://lists.gnupg.org/mailman/listinfo/gnupg-devel



More information about the Gnupg-devel mailing list