open_generic() { local client local desktop desktop=`xdg-mime query default "x-scheme-handler/mailto"` client=`desktop_file_to_binary "$desktop"` echo $client | grep thunderbird > /dev/null 2>&1 if [ $? -eq 0 ] ; then run_thunderbird "$client" "$1" fi if [ $? -eq 0 ]; then exit_success else IFS=":" for browser in $BROWSER; do if [ x"$browser" != x"" ]; then browser_with_arg=`printf "$browser" "$1" 2>/dev/null` if [ $? -ne 0 ]; then browser_with_arg=$browser; fi if [ x"$browser_with_arg" = x"$browser" ]; then "$browser" "$1"; else $browser_with_arg; fi if [ $? -eq 0 ]; then exit_success; fi fi done exit_failure_operation_impossible "no method available for opening '$1'" fi }