Hey guys,
I personnally use this one-liner which is basically the same thing:
$ cat /path/to/hooks/mime-view.rb
system("xdg-open #{filename} > /dev/null 2>&1 &")
Note the final "&": you need it if you don't want to wait for the right
program to be chosen and opened before being able to use sup again
(because the hook is blocking)
Excerpts from Alice Riot's message of 2015-06-29 10:21:13 -0700: