or just use xdg-open

By Hal Canary, 2013-06-13 12:00:00 (link)

How to ask the desktop to open a file from a shell script? Define this function:

getopencmd() {
    case "$(uname -s)" in
        *WIN*|*W32*) command -v "start";;
        Darwin) command -v "open";;
        *)  command -v "xdg-open" || \
            command -v "gvfs-open" || \
            command -v "kde-open" || \
            command -v "exo-open" ; esac; }

(back)