run-mailcap unlinks temporary symlink before an application has a chance to read a file through that symlink. If some jpeg (or other) file has non-latin characters (or shell meta-characters) in its name, and one is running $ run-mailcap <filename> run-mailcap creates a link to this file and passes it to the corresponding application (say, gwenview). Here are the lines 455-474 from /usr/bin/run-mailcap: if ($file =~ m![^ a-z0-9,.:/@%^+=_-]!i) { $match =~ m/nametemplate=(.*?)\s*($|;)/; my $prefix = $1; my $linked = 0; while (!$linked) { $tmplink = TempFile($prefix); unlink($tmplink); if ($file =~ m!^/!) { $linked = symlink($file,$tmplink); } else { my $pwd = `/bin/pwd`; chomp($pwd); $linked = symlink("$pwd/$file",$tmplink); } } print STDERR " - filename contains shell meta-characters; aliased to '$tmplink'\n" if $debug; $comm =~ s/([^%])%s/$1$tmplink/g; } else { $comm =~ s/([^%])%s/$1$file/g; } However, later on run-mailcap unlinks that file (line 511): unlink $tmplink if $tmplink; That creates the race condition: an application has a little time to read a file before it was deleted. On my system gwenview constantly reports: "Error loading fileASASJG73". Reproducible: Always Steps to Reproduce: 1. run $ run-mailcap <filename.jpg> on a jpeg file that has unicode characters or shell meta-characters in its name. 2. see if associated application (gwenview in my case) can find the file. Actual Results: gwenview reports "Error loading fileXXXXXX" Expected Results: gwenview should be able to read a file through the symbolic link and display it. $ equery l run-mailcap * Searching for run-mailcap... [IP-] [ ] app-misc/run-mailcap-3.39_p1:0
+*run-mailcap-3.52_p1 (25 Jul 2012) + + 25 Jul 2012; Pacho Ramos <pacho@gentoo.org> +run-mailcap-3.52_p1.ebuild: + Version bump. + Try with new version please
3.52_p1, bug is not fixed.
You need to report this to upstream then: http://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=mime-support;dist=unstable (product is mime-support) And post link here, thanks