Saya tahu ini terlambat tapi ... Fist, buat file desktop ~/.local/share/applications/
misalnya sublime.desktop
akan menjadi sesuatu seperti ~ / .local / share / aplikasi / sublime.desktop dengan konten berikut:
[Desktop Entry]
Keywords=Plaintext;Write;Programming;Syntax;Ruby;HTML
Categories=;
Comment=sublime
Exec=sublime_text %U
Hidden=false
Icon=icon-name
Name=sublime
Terminal=false
Type=Application
Version=1.0
StartupNotify=true
MimeType=text/plain;text/html;application/ruby;
Kemudian ... jika Anda mengedit, ~/.local/share/applications/mimeapps.list
Anda akan melihat jenis konten teks / html mengeditnya seperti ini:
[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=sublime.desktop
application/x-extension-htm=sublime.desktop
application/x-extension-html=sublime.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
[Added Associations]
x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
application/x-yaml=sublime-1.desktop;
[Removed Associations]
text/html=firefox.desktop;gedit.desktop;
Anda bisa dari-kursus perubahan sebanyak atau sesedikit yang Anda inginkan dan Anda juga dapat menambahkan sebanyak atau sesedikit yang Anda ingin file desktop yang Jenis Peniruan misalnya application/python
, application/x-ruby
, text/ruby
, text/x-python
atau puluhan varian lainnya ... meskipun menempel jenis sederhana seharusnya baik-baik saja misalnya application/python
dan application/ruby
keduanya berfungsi pada instal GNOME 3.2 saya.