1

I'm using neovim-gtk as my text editor, which I've compiled myself. I'd like to set it as the default text editor in MATE's Preferred Applications, but there's no such option.

There is a desktop file in ~/.local/share/applications/org.daa.NeovimGtk.desktop, which contains the following contents:

[Desktop Entry] Name=NeovimGtk Comment=Gtk GUI for Neovim text editor Exec=/home/bmc/.local/bin/nvim-gtk -- %F Icon=org.daa.NeovimGtk Type=Application Terminal=false Categories=GTK;Utility;TextEditor; StartupNotify=true MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; 

Note that I'm already capable of setting this in EDITOR and VISUAL, where it works fine. However, opening the file from a MATE application, such as Engrampa, still invokes the default specified in the Preferred Applications window.

In case it's relevant, I'm using Debian unstable, but I'm also interested in responses for Ubuntu 23.10, both using MATE.

How should I go about configuring things so that I can set my preferred editor in the Preferred Applications window?

1 Answer 1

1

It appears that what's required is running update-desktop-database ~/.local/share/applications. Note that the specific directory is required because otherwise update-desktop-database attempts to update the system databases instead, which isn't relevant here and has no effect on per-user configuration.

Running this command creates or updates the mimeinfo.cache file, which is required for GTK+ to be able to look up a desktop file by MIME type. GTK+ can still find the desktop file without it, but it's unable to perform searches by MIME type without this the mimeinfo.cache file, and MATE's Preferred Applications tool finds text editors by looking for files that support the MIME type text/plain.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.