Description: Try mimetype first as the generic method for xdg-mime. Bug-Debian: http://bugs.debian.org/609630 Author: Per Olofsson --- a/scripts/xdg-mime +++ b/scripts/xdg-mime @@ -514,8 +514,13 @@ info_gnome() info_generic() { - DEBUG 1 "Running file -i \"$1\"" - /usr/bin/file -i "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "// + if mimetype --version >/dev/null 2>&1; then + DEBUG 1 "Running mimetype -b \"$1\"" + mimetype -b "$1" + else + DEBUG 1 "Running file -i \"$1\"" + /usr/bin/file -i "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "// + fi if [ $? -eq 0 ]; then exit_success