File mc-apps.patch of Package mc

Index: misc/mc.ext.in
===================================================================
--- misc/mc.ext.in.orig	2010-07-05 21:12:51.000000000 +0200
+++ misc/mc.ext.in	2010-07-06 18:46:11.131015545 +0200
@@ -115,7 +115,7 @@ regex/\.tar\.bz$
 	# Open=%cd %p#utar
 	View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
 
-regex/\.t(ar\.bz2|bz2?|b2)$
+regex/\.t(ar\.bz2|bz2?|b2|bz2)$
 	Open=%cd %p#utar
 	View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
 
@@ -391,7 +391,7 @@ shell/.ico
 	Include=image
 
 include/image
-	Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
+	Open=if [ "$DISPLAY" = "" ]; then asciiview %f; else (display %f >/dev/null 2>&1 &); fi
 	View=%view{ascii} identify %f
 	#View=%view{ascii} asciiview %f
 
@@ -409,11 +409,11 @@ regex/\.([wW][aA][wW]22)$
        Open=vplay -s 22 %f
 
 regex/\.([mM][pP]3)$
-	Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
+	Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else if [ -z "`which realplay`" ]; then (xmms -e %f 1>/dev/null 2>&1 &); else (realplay %f >/dev/null 2>&1 &); fi; fi
 	View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
 
 regex/\.([oO][gG][gG|aA|vV|xX])$
-	Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
+	Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms -e %f >/dev/null 2>&1 &); fi
 	View=%view{ascii} ogginfo %s
 
 regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$
@@ -478,12 +478,12 @@ include/video
 
 # Postscript
 type/^PostScript
-	Open=(gv %f &)
+	Open=(gv %f >/dev/null 2>&1 &)
 	View=%view{ascii} ps2ascii %f
 
 # PDF
 type/^PDF
-	Open=(xpdf %f &)
+	Open=(xpdf %f >/dev/null 2>&1 &)
 	#Open=(acroread %f &)
 	#Open=(ghostview %f &)
 	View=%view{ascii} pdftotext %f -
@@ -498,48 +498,44 @@ regex/\.([hH][tT][mM][lL]?)$
 
 # StarOffice 5.2
 shell/.sdw
-	Open=(ooffice %f &)
+	Open=(ooffice %f >/dev/null 2>&1 &)
 
 # StarOffice 6 and OpenOffice.org formats
-regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
-	Open=(ooffice %f &)
+regex/\.(odb|odc|odf|odg|odi|odm|odp|ods|odt|otg|oth|otp|ots|ott|sda|sdc|sdd|sdp|sds|sdw|sgl|smf|stc|std|sti|stw|sxc|sxd|sxg|sxi|sxm|sxw|vor)$
+	Open=(ooffice %f >/dev/null 2>&1 &)
 	View=%view{ascii} odt2txt %f
 
 # AbiWord
 shell/.abw
-	Open=(abiword %f &)
+	Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 
 # Microsoft Word Document
 regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
-	Open=(abiword %f >/dev/null 2>&1 &)
+	Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
 type/^Microsoft\ Word
-	Open=(abiword %f >/dev/null 2>&1 &)
+	Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 	View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
 
 # RTF document
 regex/\.([rR][tT][fF])$
-	Open=(abiword %f >/dev/null 2>&1 &)
+	Open=if which abiword ; then (abiword %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 
 # Microsoft Excel Worksheet
 regex/\.([xX][lL][sSwW])$
-	Open=(gnumeric %f >/dev/null 2>&1 &)
+	Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 	View=%view{ascii} xls2csv %f || strings %f
 type/^Microsoft\ Excel
-	Open=(gnumeric %f >/dev/null 2>&1 &)
+	Open=if which gnumeric ; then (gnumeric %f >/dev/null 2>&1 &); else (ooffice %f >/dev/null 2>&1 &); fi >/dev/null
 	View=%view{ascii} xls2csv %f || strings %f
 
-# Use OpenOffice.org to open any MS Office documents
-type/^Microsoft\ Office\ Document
-	Open=(ooffice %f &)
-
 # Framemaker
 type/^FrameMaker
 	Open=fmclient -f %f
 
 # DVI
 regex/\.([dD][vV][iI])$
-	Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
+	Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f >/dev/null 2>&1 &); fi
 	View=%view{ascii} dvi2tty %f
 
 # TeX
@@ -548,7 +544,7 @@ regex/\.([Tt][Ee][Xx])$
 
 # DjVu
 regex/\.(djvu|DJVU)$
-	Open=djview %f &
+	Open=djview %f >/dev/null 2>&1 &
 
 ### Miscellaneous ###
 
openSUSE Build Service is sponsored by