xdg-open does not honor PATH order
Running xdg-open file.extension
will run the target application from /usr/bin even if there is a different version of the same application in /usr/local/bin
To reproduce:
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin
xdg-open test.mp4
ps -ef
...
/usr/bin/vlc --started-from-file test.mp4
...
which vlc
/usr/local/bin/vlc
It seems to me that xdg-open should have started /usr/local/bin/vlc and not /usr/bin/vlc