Petr Kovar
pknbe@volny.cz 2014
Customize which application opens a specific MIME type.
Andika Triwidada
andika@gmail.com 2020-2023

# Override the default registered application for all users

Berkas /usr/share/applications/mimeapps.list dan /usr/share/applications/gnome-mimeapps.list menentukan aplikasi yang terdaftar untuk membuka jenis MIME tertentu secara baku. Berkas ini disediakan oleh distribusi.

To override the system defaults for all users on the system, you need to create a /etc/xdg/mimeapps.list or /etc/xdg/gnome-mimeapps.list file with a list of MIME types for which you want to override the default registered application.

Berkas yang terletak di /etc/xdg/ diutamakan daripada berkas yang ditemukan di /usr/share/applications/. Selain itu, /etc/xdg/GNOME-mimeapps.list lebih diutamakan daripada /etc/xdg/mimeapps.list, namun bisa ditimpa oleh konfigurasi pengguna di ~/.config/mimeapps.list.

# Override the default registered application for all users

Konsultasikan berkas /usr/share/applications/mimeapps.list untuk menentukan tipe MIME yang ingin Anda ubah aplikasi terdaftar baku untuknya. Misalnya, contoh berikut dari berkas mimeapps.list menentukan aplikasi terdaftar baku untuk tipe MIME `text/html` `application/xhtml+xml`:

[Default Applications] text/html=epiphany.desktop application/xhtml+xml=epiphany.desktop

Aplikasi baku (Epiphany) didefinisikan dengan menentukan berkas .desktop yang sesuai (epiphany.desktop). Lokasi baku untuk berkas .desktop aplikasi lain adalah /usr/share/applications/.

Create the /etc/xdg/mimeapps.list file. In the file, specify the MIME types and their corresponding default registered applications:

[Default Applications] text/html=myapplication1.desktop application/xhtml+xml=myapplication2.desktop

[Added Associations] text/html=myapplication1.desktop; application/xhtml+xml=myapplication2.desktop;

This sets the default registered application for the `text/html` MIME type to `myapplication1.desktop`, and the default registered application for the `application/xhtml+xml` MIME type to `myapplication2.desktop`.

Agar pengaturan ini berfungsi dengan baik, pastikan berkas myapplication1.desktop dan myapplication2.desktop ditempatkan di direktori /usr/share/applications/.

You can use the gio mime command to verify that the default registered application has been set correctly:

    $ gio mime text/html
    Default application for “text/html”: myapplication1.desktop
    Registered applications:
    	myapplication1.desktop
    	epiphany.desktop
    Recommended applications:
    	myapplication1.desktop
    	epiphany.desktop