574c352
--- ./lib/helpdef.gi.orig	2008-06-23 04:12:20.000000000 -0600
574c352
+++ ./lib/helpdef.gi	2011-12-30 15:24:46.334844855 -0700
574c352
@@ -332,6 +332,11 @@ HELP_BOOK_HANDLER.default.ReadSix := fun
574c352
       res.pdffile := ShallowCopy(fname);
574c352
       Add(res.formats, "pdf");
574c352
     fi;
574c352
+    fname{[Length(fname)-5..Length(fname)]} := "dvi.gz";
574c352
+    if IsExistingFile( fname ) = true then
574c352
+      res.dvifile := ShallowCopy(fname);
574c352
+      Add(res.formats, "dvi");
574c352
+    fi;
574c352
   fi;
574c352
   res.directories := Directory(fname{[1..Length(fname)-10]});  
574c352
   return res;
574c352
--- ./lib/helpview.gi.orig	2005-04-20 05:38:02.000000000 -0600
574c352
+++ ./lib/helpview.gi	2011-12-30 15:30:48.173594656 -0700
574c352
@@ -283,6 +283,27 @@ show := function(file)
574c352
 end
574c352
 );
574c352
 
574c352
+# View HTML, DVI, or PDF files with xdg-open, which opens documents with the
574c352
+# user's preferred application.
574c352
+HELP_VIEWER_INFO.xdghtml := rec(
574c352
+type := "url",
574c352
+show := function(url)
574c352
+  Exec(Concatenation("xdg-open \"", url, "\""));
574c352
+end
574c352
+);
574c352
+HELP_VIEWER_INFO.xdgdvi := rec(
574c352
+type := "dvi",
574c352
+show := function(file)
574c352
+  Exec(Concatenation("xdg-open \"", file, "\""));
574c352
+end
574c352
+);
574c352
+HELP_VIEWER_INFO.xdgpdf := rec(
574c352
+type := "pdf",
574c352
+show := function(file)
574c352
+  Exec(Concatenation("xdg-open \"", file, "\""));
574c352
+end
574c352
+);
574c352
+
574c352
 #############################################################################
574c352
 ##
574c352
 #F  SetHelpViewer(<viewer>):  Set the viewer used for help