MacsandaPi
Posts: 103
Joined: Tue Dec 30, 2014 7:44 pm

How to make gedit the default text editor

Sat Apr 18, 2015 9:28 pm

I have gedit installed and would like to make it the default editor, but it doesn't appear in the list when I use:

Code: Select all

sudo update-alternatives --config editor

Do I simply move the gedit file to /usr/bin/editor to enable me to select it as the default?

Thanks in advance for help.

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: How to make gedit the default text editor

Sun Apr 19, 2015 12:06 am

That gives you the cli editor (e.g. nano), for the gui you want:

Code: Select all

sudo update-alternatives --config gnome-text-editor

klricks
Posts: 7154
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: How to make gedit the default text editor

Sun Apr 19, 2015 12:29 am

Find the file you want to edit with file-manager and right click on it.
Click [Open With] then 'drill down' until you find Gedit.
Put a check in the box next to:
[x] Set selected application as default action for this file type
Open the file
From now on the file type will open with Gedit.

Note that this does not work if you need to open the file with root privileges (sudo)...... Which for me is most of the time.
For that you will still need to open a xterminal and do sudo gedit path/filename
Last edited by klricks on Wed May 06, 2015 11:56 pm, edited 1 time in total.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

MacsandaPi
Posts: 103
Joined: Tue Dec 30, 2014 7:44 pm

Re: How to make gedit the default text editor

Wed May 06, 2015 6:07 pm

A very belated, but sincere thank you to klricks and RobHenry for your helpful replies. gedit is now my default text editor.

Return to “Beginners”