Replace Text Editor system app for different one

This is probably extremely easy to do, but I could not find it.

Current situation:
GEdit is available as “Text Editor” under Applications. It is shown as System app in Software. I cannot remove it.

Desired:
How can I make Pluma (Gedit fork) to launch instead?

Option:
Simply sudo apt-get remove gedit, install Pluma, rename it to Text Editor?

Or will that break things? Just checking as I am not an expert at all…

You can install Pluma through software center. No need to delete Gedit if you do not want to.

Then go to any text file you have and open the context menu. Pick Pluma and press the “set as default”.
All similar files will now be opened with Pluma.

1 Like

I installed Pluma (I want Xed now but not sure about how to install it without getting all X apps, so sticking with Pluma).

it works fine for .txt apps. But for config files, for example if I want to edit a .desktop file, it does not work as expected. I always have to choose “Other Application…”

If I Right-click > Open With … > it only shows GEdit, LibreOffice Writer.

Whatever I do (reset to system defaults, then set PLuma again as default or choose “add to list”), I am unable to get Pluma in that list of “Open With…”.
How to do that?

I also tried renaming it to Text Editor, and naming the old Text Editor to GEdit. Did not help.

To install Xed:
https://launchpad.net/~embrosyn/+archive/ubuntu/xapps doesn’t support 19.10 but is maintained. All you have to do is get the XED deb files.
https://launchpad.net/~embrosyn/+archive/ubuntu/xapps/+packages search xed, click on the latest for disco :smiley:
just download all those debs (the ones for your architecture, -all ones are mandatory regardless of arch) and install them. easiest way: cd to the folder where they’re downloaded and run sudo dpkg -i *.deb (this method is hacky but works. you wont recieve updates, but who cares)

I have been using Geany, for the past few years.
Great apk
Much better than gedit.

Geany is more of an ide tbh

Thanks @codic I will try that but I believe the issue remains, as I cannot get any other text editor to show up with right clicking non-txt files like .desktop.

Yup, I am not sure how to solve that.
Here’s an idea, what I did for xed:
In rightclick -> Open With, choose Other Application. Look for Xed/Pluma and then check the Set as Default checkbox.
If it doesnt show in the menu, use the custom command field with xed or pluma accordingly.

That is exactly the issue I am trying to point out (for executable files like .desktop), see post 3 and now with screenshots:

Unfortunately, taking a screenshot is impossible, it doesn’t work when the right-click context menu of a file is open. So you have to trust me:

Whatever I do, that “Open With…” list ALWAYS contains GEdit and TextWriter, no matter of the settings, for example:

Pluma is not shown in “Open with…”

EDIT:
Like this, by making GEdit Default again, Pluma DOES appear in the list!

The only strange behaviour remaining:
When I hit “Reset to system defaults”, Pluma is the default again (like screenshot 1) and it does not appear in the list.

For now this (2nd screenshot) solves the issue for me, but it seems contra-intuitive. Especially if I would remove GEdit, would Pluma become the default app in this overview? And then it would probably disappear again from the context menu?

With GNOME Screenshot/ Shutter you can specify a time delay before the screenshot occurs - so you can then show the right click menu option before the screenshot occurs.

3 Likes

As I said before

If it doesnt show in the menu, use the custom command field with xed or pluma accordingly.

This is the standard way of doing it :stuck_out_tongue: I’m not sure how your way even worked, but it did. Should be reported to nemo if reproducible - seems like a bug. Pluma should be autoregistered anyways :smiley: