Tôi đang chạy Ubuntu 15.10.
Của tôi /usr/share/applications/sublime_text.desktopchứa như sau:
[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;
Khi tôi nhấp chuột phải vào tệp đánh dấu ( xxx.md) trong Tệp Gnome (trước đây là "Nautilus"), tôi không thể xem "Văn bản cao siêu" là một lựa chọn, ngay cả khi tôi chọn "Xem tất cả ứng dụng".
Tôi thậm chí đã thử thêm %Fvào các dòng Exec=/opt/sublime_text/sublime_text -nvà Exec=/opt/sublime_text/sublime_text --command new_filetrong [Desktop Action Window]và [Desktop Action Document], tương ứng, nhưng nó không thay đổi bất cứ điều gì.
Tôi thậm chí đã chạy sudo update-desktop-database.
Tôi đang làm gì sai?
defaults.listhoặc gedit.desktop. Những tập tin đó nên chứa gì?
text/plain, là loại duy nhất được đăng ký trong tệp máy tính để bàn này.
/usr/share/applications/defaults.listvà thay thế tất cả cácgedit.desktopmục?