Ask Your Question

Mime types - Nautilus vs xdg-open

asked 2012-12-21 04:34:53 -0500

lzap gravatar image

In my system (Fedora 17) something is wrong with XDG.

In Nautilus when I click on for example Excel sheet (XLS), it opens OpenOffice correctly. The file properties shows the proper MIME type.

But in the command line, when I try to xdg-open it, it opens Firefox. I can see the XDG tools shows incorrect MIME type:

# xdg-mime query filetype RadGridExport.xls 

What can be wrong? How to fix this? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-21 10:19:59 -0500

hhlp gravatar image

updated 2012-12-21 10:24:53 -0500

you can try :

gnome-open opens a file with Gnome's default application
kde-open opens a file with KDE's default application
xdg-open opens a file with X's default application

example :

gnome-open RadGridExport.xls

With xdg-mime

Asociate Mime Type

xdg-mime default libreoffice-calc.desktop application/msexcel

                             |                   |

                  you can find in             you can find in the 
                 /usr/share/applications      table below

Find out which program is associated with the MIME

$ xdg-mime query default application/msexcel

Figure out the MIME type of xls

$ xdg-mime query filetype RadGridExport.xls

First field  : Meaning           
Second field : Extension
Third field  : MIME Type

image description

image description

image description

edit flag offensive delete link more


Thanks, upvoting, but this does not work in my Fedora. It shows wrong mime, and my question is - how to fix this.

lzap gravatar imagelzap ( 2012-12-27 05:52:43 -0500 )edit

Question Tools


Asked: 2012-12-21 04:34:53 -0500

Seen: 2,771 times

Last updated: Dec 21 '12