Nautilus has the option to see the mime-type of a file.

Can I see that in elementary OS without Nautilus?

1 Answer 1


In Pantheon Files:

Right click on a file, Properties:

enter image description here

The above may give a different result than file --mime-type, so maybe this one is also useful.

To add an option for that in the context menu of the file manager:

Installing gedit as text editor:

sudo apt-get install gedit

Installing Gnome Terminal for the option to hold terminal open:

sudo apt-get install gnome-terminal 

Open gnome-terminal, Edit - Profiles, create new profile called 'hold'

enter image description here

Edit, and under ' Title and command' - When command exists - Hold the terminal open.

enter image description here

In Terminal:

sudo gedit /usr/share/contractor/show_mimetype.contract

Paste this:

[Contractor Entry]
Name=Show mime-type
Exec=gnome-terminal --profile hold -e 'file --mime-type -b  %f'


enter image description here

  • Correct me if I was wrong, I have MimeType as an option in properties without nautilus
    – Ravan
    Commented Dec 1, 2015 at 11:04
  • @Ravan - I do too. See the beginning of the answer. But it took me some time to see that so I shared it here.
    – user170
    Commented Dec 1, 2015 at 11:06
  • Hey +1, got it now :) silly me =)
    – Ravan
    Commented Dec 1, 2015 at 11:09
  • @Ravan - you are right implying that the rest of my answer is possibly useless. It also gives a different result (more generic) but maybe for that very reason it may be useful in some cases.
    – user170
    Commented Dec 1, 2015 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.