ฉันใช้ Ubuntu 15.10
ฉัน/usr/share/applications/sublime_text.desktopมีดังต่อไปนี้:
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;
เมื่อฉันคลิกขวาที่ไฟล์ markdown ( xxx.md) ใน Gnome Files (เดิมชื่อ "Nautilus") ฉันไม่สามารถเห็น "Sublime Text" เป็นตัวเลือกได้แม้ว่าฉันจะเลือก "ดูแอปพลิเคชันทั้งหมด"
ฉันลองเพิ่ม%FในบรรทัดExec=/opt/sublime_text/sublime_text -nและExec=/opt/sublime_text/sublime_text --command new_fileใน[Desktop Action Window]และ[Desktop Action Document]ตามลำดับ แต่มันไม่เปลี่ยนแปลงอะไรเลย
sudo update-desktop-databaseฉันยังวิ่ง
ผมทำอะไรผิดหรือเปล่า?
defaults.list gedit.desktopไฟล์เหล่านั้นควรมีอะไรบ้าง?
text/plainซึ่งเป็นประเภทเดียวที่ลงทะเบียนในไฟล์เดสก์ท็อปนี้
/usr/share/applications/defaults.listและแทนที่gedit.desktopรายการทั้งหมดหรือไม่