English
Ask Your Question
4

Mime types - Nautilus vs xdg-open

asked 2012-12-21 10:34:53 +0000

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 
text/html

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2012-12-21 16:19:59 +0000

hhlp gravatar image

updated 2012-12-21 16:24:53 +0000

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
libreoffice-calc.desktop

Figure out the MIME type of xls

$ xdg-mime query filetype RadGridExport.xls
application/vnd.ms-excel

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

image description

image description

image description

edit flag offensive delete link more

Comments

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

lzap ( 2012-12-27 11:52:43 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2012-12-21 10:34:53 +0000

Seen: 1,511 times

Last updated: Dec 21 '12