DEV Community

Chalist
Chalist

Posted on

Changing default application

Changing default application is so easy in Arch-based Linux.

Maybe work for other distros.

Just open this file with your text editor:

~/.local/share/applications/mimeapps.list

Add your mime type and default application. For example, for URLs you can use these lines:

[Default Applications]

x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
Enter fullscreen mode Exit fullscreen mode

Finding mime-type

Finding any file's mime type is easy.

  • If you use linux, you can use file command:
$ file --mime-type data.json 
data.json: application/json

$ file --mime-type w1.png                             
w1.png: image/png

Enter fullscreen mode Exit fullscreen mode

or you can use -i switch:

$ file -i w1.png         
w1.png: image/png; charset=binary
Enter fullscreen mode Exit fullscreen mode

search file extension in the top menu search box or upload your file:

Image description

Top comments (0)