bug report: showphoto on WinXP

Dirk Traulsen dirk.traulsen at lypso.de
Sat Aug 19 11:05:42 CEST 2006


Hi,
I've run into problems while looking into photo-IDs.

Scenario:
gpg 1.4.5 on German WinXP
For this test the gpg.conf contains only "no-greeting", so no photo-
viewer was chosen and I will use the keys with photo-IDs from 
doc/samplekeys.asc from the source of the stable branch.
At the end, you will find a screencopy with comments.

When I issue showphoto in the edit-key-shell, WinXP asks as expected 
which program I want to use to show the photo: the Open with-window.
When I check in parallel, the image file exits where it should be, in 
the TEMP directory in a new random directory gpg-XYZXYZ.
But when I choose in the WinXP-Open with-window a program to show the 
photo, it results in an error message by the program (but not from 
gpg in the console): For example mspaint issues: 
"C:DOKUME~\Dirk\LOKALE~\Temp\gpg-DC963C\CA57AD7C.jpg is no valid 
path." The reason is that the directory and file are deleted before 
the program can access them.
 
When I alternatively choose "Quit" in the WinXP-Open with-window, the 
message "Access denied" comes in the console which seams to stem from 
WinXP.

When I give the photo-viewer as option on the command line, it works.
But giving the same line in the gpg.conf, does not work. Maybe I made 
a syntax mistake here?

At last I have a proposal for the naming of the image file. When 
there is more than one photo-ID on the key and one does not preselect 
a uid, then both photo-IDs are shown one after the other. That's ok, 
but they both get the same name made of the key-ID, e.g.  
B2D7795E.jpg. My suggestion would be a name like KEYID-UID.jpg, e.g. 
B2D7795E-UID3.jpg. This is a really small change, but would make it 
clearer, if you want save the pictures for example. 

Hope this helps,
Dirk

===== Screencopy with comments ============================

C:\>gpg -k
C:/Dokumente und Einstellungen/Dirk/Anwendungsdaten/gnupg\pubring.gpg
---------------------------------------------------------------------
pub   1024D/B2D7795E 2001-01-04
uid                  Philip R. Zimmermann <prz at mit.edu>
uid                  Philip R. Zimmermann <prz at acm.org>
uid                  [jpeg image of size 3369]
uid                  [jpeg image of size 3457]
uid                  Philip R. Zimmermann <prz at philzimmermann.com>
sub   3072g/A8E92834 2001-01-04

pub   2048R/CA57AD7C 2004-12-06
uid                  PGP Global Directory Verification Key
uid                  [jpeg image of size 3400]

C:\>gpg --ed pgp

pub  2048R/CA57AD7C  created: 2004-12-06  expires: never       usage: 
SC
                     trust: unknown       validity: unknown
[ unknown] (1). PGP Global Directory Verification Key
[ unknown] (2)  [jpeg image of size 3400]

Command> showphoto
Displaying jpeg photo ID of size 3400 for key CA57AD7C (uid 2)
#### Comment: Here I see the WinXP-Open with-window
#### Comment: to choose a program for presenting the picture.
#### Comment: In parallel on the XP-console:
XP: C:\DOKUME~1\Dirk\LOKALE~1\Temp>dir gpg-*
XP: 
XP:  Verzeichnis von C:\DOKUME~1\Dirk\LOKALE~1\Temp
XP: 
XP: 19.08.2006  10:55    <DIR>          gpg-2C4D5A
#### Comment: After unsuccessfully choosing a program
#### Comment: the directory gets deleted first and the
#### Comment: opening fails.
XP: C:\DOKUME~1\Dirk\LOKALE~1\Temp>dir gpg-*
XP:  
XP: Verzeichnis von C:\DOKUME~1\Dirk\LOKALE~1\Temp
XP:  
XP: Datei nicht gefunden
#### Comment: Translated "File not found", but meaning
#### Comment: directory not found.
#### Comment: No message from gpg here.

Command> showphoto
Displaying jpeg photo ID of size 3400 for key CA57AD7C (uid 2)
Zugriff verweigert
#### Comment: Here I quitted the WinXP-Open with-window.
#### Comment: "Zugriff verweigert" is "Access denied" and
#### Comment: seams to be a WinXP message.

Command> q

C:\>gpg --photo-viewer "%SystemRoot%\system32\mspaint.exe %i" --ed 
pgp

pub  2048R/CA57AD7C  created: 2004-12-06  expires: never       usage: 
SC
                     trust: unknown       validity: unknown
[ unknown] (1). PGP Global Directory Verification Key
[ unknown] (2)  [jpeg image of size 3400]

Command> showphoto
Displaying jpeg photo ID of size 3400 for key CA57AD7C (uid 2)
#### Comment: With a specified photo-viewer it worked fine.

Command> q


#### Comment: Now unsuccessful with the same string in the gpg.conf
#### Comment: photo-viewer "%SystemRoot%\system32\mspaint.exe %i"
#### Comment: I tried it without "" too. 
#### Comment: Maybe a syntax error by me?
C:\>gpg --ed pgp

pub  2048R/CA57AD7C  created: 2004-12-06  expires: never       usage: 
SC
                     trust: unknown       validity: unknown
[ unknown] (1). PGP Global Directory Verification Key
[ unknown] (2)  [jpeg image of size 3400]

Command> showphoto
Displaying jpeg photo ID of size 3400 for key CA57AD7C (uid 2)
gpg: system error while calling external program: No such file or 
directory
gpg: unable to display photo ID!



More information about the Gnupg-devel mailing list