2

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

Can I see that in elementary OS without Nautilus?

2

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
Icon=/usr/share/icons/elementary/apps/128/application-default-icon.svg
MimeType=application/octet-stream;application/binary
Exec=gnome-terminal --profile hold -e 'file --mime-type -b  %f'

Save.

enter image description here

| improve this answer | |
  • Correct me if I was wrong, I have MimeType as an option in properties without nautilus – Ravan Dec 1 '15 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 Dec 1 '15 at 11:06
  • Hey +1, got it now :) silly me =) – Ravan Dec 1 '15 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 Dec 1 '15 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy