On 03/23/2010 12:17 PM, Pavel Sanda wrote:
Richard Heck wrote:
xdg-open should open different things depending upon the extension. Here,
e.g., xdg-open file.tex opens kile.
xdg-open knows nothing about extensions. it just passes the control to the
desktop manager, i.e. it detect in a hackish style what dm you use and
then sends the file to its control. if you do not belong the the mainstream
dm like kde or gnome, the fallback goes to some mime handling which works
only in some distros and then you have fallback on firefox. we have already
flame about this and i dont want to repat it again ;)
Ok, yes, right. I remembered that there was an issue about this
elsewhere, and you are right that it also surfaces here.
the summary is that we should use our own defined viewers for formats we know.
The patch needs separating in any event: We can commit the part that
fixes #6486, and we can work on the part that handles #6487.
So, John, I will commit the #6486 bit. For the other bug, we need to do
the following: 1. For http-type URLs, we can go ahead and call xdg-open,
etc. This will be OK, in this case, yes, Pavel? 2. For local files
(i.e., either file:/// or without protocol), we call the pre-defined
viewer that LyX already knows about. Note that this also handles the
security issue: If we do not have a viewer, we do not open the file.
rh