my xdg-open: https://github.com/woky/home/blob/master/bin/see
LD_PRELOAD for gtk: http://sprunge.us/gARa
in KDE, it goes through 3 processes, over dbus, socketpair, until it reaches klauncher, where some magic happens ...
and it opens it in KDE-specific app obviously