[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xdg-open fails to open PDF attachment



>>>>> In [Wanderlust English : No.03569] Robin Green wrote:
> On my system (Fedora rawhide), something (not sure what) has
> configured my system so that wanderlust opens PDF attachments with the
> xdg-open command. This is a general-purpose command which I think has
> something to do with the Open Desktop interoperability initiative
> between KDE and Gnome. Anyway. That's an aside.

> The problem is, it doesn't work, because xdg-open calls the PDF viewer
> okular, which runs in the background (incidentally, on another
> display!) and xdg-open then quits. After that, the temporary file is
> deleted (presumably by wanderlust) so okular can't open it.

AFAICT, deleting the temp file is not the cause that xdg-open
fails.  Gnus runs a timer to keep the temp file for a while, but
it is helpless for xdg-open (even if with the 60s timer).  Maybe
the vanishing of the parent shell, that launches xdg-open, is it.
I guess to delay the quitting of the shell is the solution.
Though I have no concrete idea to do that so far.

Instead, I mapped the actual viewers one by one for the content
types in the ~/.mailcap file.  Here is the one for pdf:

application/pdf; /usr/bin/acroread %s