Index: xdg-open.in =================================================================== RCS file: /cvs/portland/portland/xdg-utils/scripts/xdg-open.in,v retrieving revision 1.16 diff -u -r1.16 xdg-open.in --- xdg-open.in 12 Aug 2006 13:39:06 -0000 1.16 +++ xdg-open.in 6 Sep 2006 21:15:04 -0000 @@ -63,6 +63,19 @@ open_generic() { + if which run-mailcap >/dev/null && + (echo "$1" | grep -q '^file://' || + ! echo "$1" | egrep -q '^[a-zA-Z+\.\-]+:'); then + + local file=$(echo "$1" | sed 's%^file://%%') + run-mailcap --action=view "$file" + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi + fi + IFS=":" for browser in $BROWSER; do if [ x"$browser" != x"" ]; then