patch for viewing DjVu files

Nerijus Baliunas nerijus at users.sourceforge.net
Tue Nov 6 00:00:41 UTC 2007


On Fri, 8 Sep 2006 22:38:46 +0400 (MSD) vadim-lvv at yandex.ru wrote:

> now in my mc.ext :
> 
> Open=if [ "$DESKTOP_SESSION" = "kde" ]; then (nohup kdvi %f >/dev/null 2>&1 &); else (if [  -e "/usr/bin/evince"  ]; then (evince %f >/dev/null 2>&1 &); else (nohup djview %f >/dev/null 2>&1 &); fi); fi

There was a thread a year ago. I am proposing not using nohup,
because it creates nohup.out files. We could use setsid, but let's
not do it for now, because there are other types (pdf for example)
which suffer from the same problem - a viewer app is closed when
mc is closed. So either let's fix it for all types or not fix it for now.

> > evince 0.5.1 does not open djvu files here.
> From evince readme:
> Evince Optional Backend Libraries
> DjVuLibre for DjVu viewing [ http://djvulibre.djvuzone.org/ ]

Fedora 7 evince (0.8.2 this year) does not open djvu files, even if
I have djvulibre rpm installed. And there is no evince-plugins or similar
package. So as a final version I propose this patch (I also modified
dvi type accordingly):

--- mc.ext.orig	2007-04-16 19:50:14.000000000 +0300
+++ mc.ext	2007-11-06 01:49:08.000000000 +0200
@@ -520,9 +520,13 @@
 
 # DVI
 regex/\.([dD][vV][iI])$
-	Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
+	Open=if [ "$DESKTOP_SESSION" = "kde" ]; then (kdvi %f &); else if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi; fi
 	View=%view{ascii} dvi2tty %f
 
+# DjVu
+regex/\.([dD][jJ][vV][uU])$
+	Open=if [ "$DESKTOP_SESSION" = "kde" ]; then (kdvi %f &); else (djview %f &); fi
+
 # TeX
 regex/\.([Tt][Ee][Xx])$
 	Open=%var{EDITOR:vi} %f


Regards,
Nerijus



More information about the mc-devel mailing list