On Ubuntu 10.10, xdg-open fails to open the file and give me the error:No application is registered as handling this fileBut xdg-mime query defaut ... succeeds for the mime type. Why?Here is my process:Added a new mime type application/vnd.xx by xdg-mime install mytype.xml. Then xdg-mime query filetype <file name> shows that the new mime type is recognized.I wrote my desktop entry file my-app.desktop like this:[Desktop Entry]Name=xxxComment=xxxIcon=Exec=/usr/bin/my-app %UTerminal=falseType=ApplicationCategories=Utility;MimeType=application/vnd.xx;I copied this desktop file to ~/Desktop. After I re-login, I saw the shortcut on the desktop and xdg-mime query defualt application/vnd.xx printed out this desktop file. But, xdg-open <file name> fails with the error:No application is registered as handling this fileI've installed nautilus. Do I miss something? How do I fix this?
Why does xdg-open fail although xdg-mime query defaut  succeeds on Ubuntu 10.10?
linux;ubuntu
I don't know off the top of my head if this is the cause of your problem, but in general application *.desktop files need to be in specific places to be fully recognized.  Try moving your my-app.desktop to ~/.local/share/applications/my-app.desktop (create that directory first if needed:  mkdir -p ~/.local/share/applications).  If you used a full pathname to the *.desktop file, change it to just the basename; I don't think pathnames work as expected there.