1. /usr/share/mime/glob, get MIME type here by extent name.
2. /usr/share/applications/defaults.list. get name of the .desktop file, which associated with this MIME type get in step 1.
3. the .desktop file is right under the same directory of defaults.list. you can find the command to open files have the extent name, which is the value of 'Exec'. just replace the '%U' with you file name.
2. /usr/share/applications/defaults.list. get name of the .desktop file, which associated with this MIME type get in step 1.
3. the .desktop file is right under the same directory of defaults.list. you can find the command to open files have the extent name, which is the value of 'Exec'. just replace the '%U' with you file name.