在 Ubuntu 23.04 上,我安装了 Gedit 和默认的文本编辑器 (gnome-text-editor)。
我想保留 gnome-text-editor,但我希望大多数文本文件在 gedit 中打开。
我已将以下内容添加到~/.config/mimeapps.list
,但它不起作用——如果我*.txt
在 Nautilus 中单击一个文件,它仍会在 gnome-text-editor 中打开。我在以下文件中做错了什么?
# Separate *.desktop files with a ";"
[Default Applications]
application/octet-stream=org.gnome.gedit.desktop
application/xml=org.gnome.gedit.desktop
application/json=org.gnome.gedit.desktop
text/x-patch=org.gnome.gedit.desktop
application/javascript=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop
text/markdown=org.gnome.gedit.desktop
[Added Associations]
application/octet-stream=org.gnome.gedit.desktop
application/xml=org.gnome.gedit.desktop
application/json=org.gnome.gedit.desktop
text/x-patch=org.gnome.gedit.desktop
application/javascript=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop
# Override R Studio mime types listed in /usr/share/applications/rstudio.desktop
text/x-tex=org.gnome.gedit.desktop
text/x-markdown=org.gnome.gedit.desktop
text/html=org.gnome.gedit.desktop
text/css=org.gnome.gedit.desktop
text/javascript=org.gnome.gedit.desktop
text/x-chdr=org.gnome.gedit.desktop
text/x-csrc=org.gnome.gedit.desktop
text/x-c++hdr=org.gnome.gedit.desktop
text/x-c++src=org.gnome.gedit.desktop
text/markdown=org.gnome.gedit.desktop