10

gedit is the default editor of GNOME, how do I change it?

I modified the file /etc/gnome/defaults.list, then rebooted the system, and it works.

Now the filename defaults.list becomes gnome-mimeapps.list. For more details, see MIME

3
  • 1
    Right click on any text file > Properties > Open with May 27, 2016 at 14:39
  • 1
    This just changes the one type file format but not all other formats.
    – tmpbin
    May 27, 2016 at 14:44
  • There is no default editor in gnome, this is a matter of file type/mime type associations so yes, if you want it for several formats you'll have to override that via config files May 27, 2016 at 14:49

2 Answers 2

11

Right click on the text file you want to open, choose Properties and then Open with. You should find the various alternatives in the Recommended Software or Other Applications lists. Click the one you want and then the "Set as Default" button.

That's Ubuntu 16.04, Gnome version 3.18.2.

enter image description here

5
  • Has the "Set as Default" option been removed? Gnome 3.36.5.
    – user598527
    Aug 26, 2020 at 9:51
  • Not sure how to check the version of gnome that I'm running, but it's there in Ubuntu 16.04. In Ubuntu Mate 18.04, it's just a radio button to select the default. I suspect you're got to have some relatively accessible means to set it.
    – Diagon
    Aug 26, 2020 at 20:51
  • See 'about' in the Gnome settings or open /usr/share/gnome/gnome-version.xml in a text editor. Could you update your answer with a screenshot (always helpful with GUI-related instructions!)?
    – user598527
    Aug 27, 2020 at 10:46
  • @user598527 - HTH!
    – Diagon
    Aug 28, 2020 at 5:16
  • 1
    Thank you. I'll create a new question later as that option appears to be missing with newer versions.
    – user598527
    Aug 29, 2020 at 12:30
2

I couldn't find anymore the "Set as Default" button mentioned by Diagon. What worked for me:

Create/edit ~/.config/mimeapps.list

Adjust as follows:

[Default Applications]
text/plain=sublime_text.desktop;

See also: Gnome documentation

Tested on Gnome 42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .