Change mimetype of an extension

I need to change the mimetype of a file to customize the software that opens it.

Currently the mimetype is recognized as text/html.

The file has extension .pto

So I edited /etc/mime.types and put:

application/capp				pto

at the end. Then I run:

sudo update-mime-database /usr/share/mime

yes nautilus insists it’s a text/html still

1 Like

Setting unlisted application as a default - #2 by vgaetera

3 Likes

Vladislav Grigoryev, it worked like a charm :slight_smile: Thank you very much!

The icon is what I want and the application that opens it is what I want.

Just an annotation. In the command:

xdg-mime default stata.desktop application/x-stata-db

stata.desktop, is a custom desktop file of mime located in ~/.local/share/applications. It did not show up with autocompletion (that is, if you type s and then press TAB that desktop file does not show up), but it worked nevertheless in the end :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.