Attached is a first crack at patching lyx-1.5 to prefer using xdg-open (1)
to open external files/urls from lyx.

Comments?

-- Rex

(1) from xdg-utils http://portland.freedesktop.org/, in particular,
http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html
--- lyx-1.5.0beta1/lib/configure.py.xdg_open	2007-02-15 14:14:12.000000000 -0600
+++ lyx-1.5.0beta1/lib/configure.py	2007-02-28 11:43:12.000000000 -0600
@@ -238,7 +238,7 @@
     checkViewer('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'],
         rc_entry = [r'\Format fen        fen     FEN                    "" "%%"	"%%"	""'])
     #
-    path, iv = checkViewer('a raster image viewer', ['xv', 'kview', 'gimp'])
+    path, iv = checkViewer('a raster image viewer', ['xdg-open', 'xv', 'kview', 'gimp'])
     path, ie = checkViewer('a raster image editor', ['gimp'])
     addToRC(r'''\Format bmp        bmp     BMP                    "" "%s"	"%s"	""
 \Format gif        gif     GIF                    "" "%s"	"%s"	""
@@ -273,23 +273,23 @@
     #
     #checkProg('a Postscript interpreter', ['gs'],
     #  rc_entry = [ r'\ps_command "%%"' ])
-    checkViewer('a Postscript previewer', ['gv', 'ghostview -swap', 'kghostview'],
+    checkViewer('a Postscript previewer', ['xdg-open', 'gv', 'ghostview -swap', 'kghostview'],
         rc_entry = [r'''\Format eps        eps     EPS                    "" "%%"	""	"vector"
 \Format ps         ps      Postscript             t  "%%"	""	"document,vector"'''])
     #
-    checkViewer('a PDF previewer', ['acrobat', 'acroread', 'gv', 'ghostview', \
+    checkViewer('a PDF previewer', ['xdg-open', 'acrobat', 'acroread', 'gv', 'ghostview', \
                             'xpdf', 'kpdf', 'kghostview'],
         rc_entry = [r'''\Format pdf        pdf    "PDF (ps2pdf)"          P  "%%"	""	"document,vector"
 \Format pdf2       pdf    "PDF (pdflatex)"        F  "%%"	""	"document,vector"
 \Format pdf3       pdf    "PDF (dvipdfm)"         m  "%%"	""	"document,vector"'''])
     #
-    checkViewer('a DVI previewer', ['xdvi', 'kdvi'],
+    checkViewer('a DVI previewer', ['xdg-open', 'xdvi', 'kdvi'],
         rc_entry = [r'\Format dvi        dvi     DVI                    D  "%%"	""	"document,vector"'])
     if dtl_tools:
         # Windows only: DraftDVI
         addToRC(r'\Format dvi2       dvi     DraftDVI               ""	""	"document,vector"')
     #
-    checkViewer('an HTML previewer', ['mozilla file://$$p$$i', 'netscape'],
+    checkViewer('an HTML previewer', ['xdg-open', 'mozilla file://$$p$$i', 'netscape'],
         rc_entry = [r'\Format html       html    HTML                   H  "%%"	""	"document"'])
     #
     checkViewer('Noteedit', ['noteedit'],

Reply via email to