On 01/13/2017 03:27 AM, Guenter Milde wrote:
A more general question to all developers:
When checking for default viewer/editor applications during (re)configure,
should LyX
a) prefer feature rich applications, or
b) prefer small and fast-starting applications.
Current praxis seems to be:
1. KDE/QT applications
2. GNOME/GTK applications
3. Windows
and in these categories a) feature rich apps first.
I prefer "small first", but not so much that I would change
anything without a broad consensus.
I think I would lean to fast-starting (not necessarily small footprint),
but really what I would prefer is that my system default choices be used
(which circles back to the xdg-open problem). Can a Python script
"easily" obtain MIME settings from the environment?
Assuming that the xdg-utils package is installed, the shell command
'xdg-mime query default application/pdf' will return the default
application (if one is set) for PDF files. On my system, the return
value is 'xreader.desktop'. Unfortunately, for 'text/plain' the result
is the somewhat less easily interpreted 'userapp-xed-07V7SY.desktop'
(where xed is the correct answer -- no idea why it's so unclear). For
'image/jpeg' and 'image/png' the default is 'xviewer.desktop'. When no
default is set (as is the case for 'image/svg' on my system), the
xdg-mime query returns nothing.
If the configuration script started out by checking for default choices,
and honoring those it finds, I wouldn't worry too much about the order
of the options when it falls back to looking for installed applications
for those where no default is set.
Paul