How to change the Gnome/Nautilus default text editor?

Issues related to applications and software problems
Post Reply
jimj
Posts: 93
Joined: 2014/10/01 05:34:57

How to change the Gnome/Nautilus default text editor?

Post by jimj » 2018/07/07 04:54:18

I have Visual Studio Code installed and I'd like to make it my default text editor. From Nautilus I can right click on a text file, go to "Open With Other Application" and choose "Visual Studio Code". However I'd like to be able to change the default to Visual Studio Code so I can simply double click on a text file to open it in Visual Studio Code. I tried updating "~/.local/share/applications/mimeapps.list", but that didn't help.

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: How to change the Gnome/Nautilus default text editor?

Post by lightman47 » 2018/07/07 12:05:14

Have you tried "Properties" when you right click - then 'Open with' tab, and set as default ?

EDIT:
By the way (FYI), you'll be changing the default editor for all files of that type, not just that one file. In your case, I suspect that's what you want.

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to change the Gnome/Nautilus default text editor?

Post by TrevorH » 2018/07/07 14:11:07

I don't use gnome 3 here but on MATE there is an option of the menu for System -> Perferences -> Personal -> Preferred Applications and there's an "Editor" option on the system tab of that.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: How to change the Gnome/Nautilus default text editor?

Post by jimj » 2018/07/07 14:39:30

lightman47 wrote:
2018/07/07 12:05:14
Have you tried "Properties" when you right click - then 'Open with' tab, and set as default ?
That was it, I knew I was missing something simple, thanks! With Google as my witness I searched for this and only came up with other simple solutions that didn't apply and more complicated mime type file editing solutions that also didn't work.

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: How to change the Gnome/Nautilus default text editor?

Post by jimj » 2018/07/07 14:40:34

TrevorH wrote:
2018/07/07 14:11:07
I don't use gnome 3 here but on MATE there is an option of the menu for System -> Perferences -> Personal -> Preferred Applications and there's an "Editor" option on the system tab of that.
Gnome 3 has a "Default Applications" settings area that sounds similar, but you can't set the default text editor there.

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: How to change the Gnome/Nautilus default text editor?

Post by jimj » 2018/07/14 20:27:04

Just in case anyone didn't think I was stupid enough for not knowing how to change a Nautilus file association, I just noticed the Visual Studio Code CentOS setup page actually tells you how to had see it as your default text editor by running this:

Code: Select all

xdg-mime default code.desktop text/plain

Post Reply