xdg-open is just a shell script that detects Desktop Environment and call the corresponding program (gvfs-open for gnome , exo-open for XFCE, mate-open, etc.)
So the limitations for launching an executable are derived from the corresponding launcher of each DE, which is gvfs-open in your case.
Looking at gvfs-open man page, this app (similar to the other DE apps) just calls the default application registered per file type as it is defined by
In your case , gvfs-open tries (and fails) to find a corresponding application to launch a
If you run xdg-open (or gvfs-open) with an html link like
https://www.google.com , then should work correctly; gvfs-open will search mime database to find how to handle the html link, mime will advise to call firefox, and firefox will be called.
Looking at xdg-open shell script functions, there are some functions that extract the
Exec entry out of the corresponding
.desktop file and under some Desktop Environments the command found in Exec section of .desktop file is just executed as it is by xdg-open.
In other words, you do not have to call
gvfs-open to launch executables like firefox.
Just launch "firefox" and should be executed (i.e
PS: Or you might even need to call
(exec firefox &)
You could even extract Exec entries by all .desktop files with a grep loop like this:
for file in $(find /usr/share/applications/ -type f -name '*.desktop'); do
executable=$(grep -m1 "^Exec=" "$file") #some files have more than one Exec entry
echo "$file - $executable"