Score:0

Help configure `mimeapps.list` to open gedit instead of gnome-text-editor?

us flag

On Ubuntu 23.04, I have installed Gedit alongside the default Text Editor (gnome-text-editor).

I want to keep gnome-text-editor, but I would like most text files to open in gedit.

I have added the following to ~/.config/mimeapps.list, but it does not work-- if I click on a *.txt file in Nautilus, it still opens in gnome-text-editor. What am I doing wrong in the following file?

# 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
Score:0
us flag

It looks like I was missing a very important mapping:

text/plain=org.gnome.gedit.desktop

This took care of opening most text files in Gedit.

I also added a couple of other mappings (to open XML and Python files in Gedit):

application/x-shellscript=org.gnome.gedit.desktop
text/x-python3=org.gnome.gedit.desktop
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.