In Kubuntu 16.04, xdg-open is a bash script that determines your desktop environment (starting with the value of $XDG_CURRENT_DESKTOP) and calls the file opener for that desktop. For XFCE that appears to be exo-open. So run exo-open in debug mode to see what's going on.
> xdg-mime query default application/x-desktop
This outputs "wine-extension-txt.desktop" in my Kubuntu 16.04 desktop, so `xdg-open /path/to/some.desktop` grinds away and eventually starts Notepad in Wine! After I renamed $HOME/.local/share/applications/wine-extension-txt.desktop to ..._DISABLED, that command outputs "org.kde.kate.desktop" and so the file opens in the Kate editor.
As I understand it, our desktops don't have a .desktop file volunteering to handle the mime type application/x-desktop. The `/usr/share/mime/application/x-desktop.xml` file that associates the extension .desktop file with application/x-desktop also says it's <sub-class-of type="text/plain"/>, and that's why desktops end up running the application that handles text files.
re: comment #15
In Kubuntu 16.04, xdg-open is a bash script that determines your desktop environment (starting with the value of $XDG_CURRENT_ DESKTOP) and calls the file opener for that desktop. For XFCE that appears to be exo-open. So run exo-open in debug mode to see what's going on.
> xdg-mime query default application/ x-desktop
This outputs "wine-extension -txt.desktop" in my Kubuntu 16.04 desktop, so `xdg-open /path/to/ some.desktop` grinds away and eventually starts Notepad in Wine! After I renamed $HOME/. local/share/ applications/ wine-extension- txt.desktop to ..._DISABLED, that command outputs "org.kde. kate.desktop" and so the file opens in the Kate editor.
As I understand it, our desktops don't have a .desktop file volunteering to handle the mime type application/ x-desktop. The `/usr/share/ mime/applicatio n/x-desktop. xml` file that associates the extension .desktop file with application/ x-desktop also says it's <sub-class-of type="text/ plain"/ >, and that's why desktops end up running the application that handles text files.