How do I make kate the default text editor in gnome?
Solution 1
Try this little tutorial. Or, if you want a simpler way, just right click on the file and choose to open with the application you want.
Solution 2
Thanks Alex this works for me on Ubuntu 16.04 LTS:
create a file ~/.local/share/applications/defaults.list
with this content:
[Default Applications]
application/x-perl=kate.desktop
text/plain=kate.desktop
text/x-chdr=kate.desktop
text/x-csrc=kate.desktop
text/x-dtd=kate.desktop
text/x-java=kate.desktop
text/mathml=kate.desktop
text/x-python=kate.desktop
text/x-sql=kate.desktop
Create missing kate.desktop with a copy:
sudo cp /usr/share/applications/gedit.desktop /usr/share/applications/kate.desktop
In the copied file, replace gedit
with kate
i.e. with vim :%s/gedit/kate
Solution 3
I wanted to change my default editor to emacsclient (which opens a file in the current emacs session, running in server mode). The problem was, I didn't have an emacsclient.desktop file anywhere. It worked when I just adapted the /usr/share/applications/emacs23.desktop file and put it in ~/.local/share/applications/emacsclient.desktop
This was based on the description at http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg12557.html
Related videos on Youtube
HorusKol
Updated on September 17, 2022Comments
-
HorusKol over 1 year
I prefer the gnome desktop to KDE - but I prefer the Kate text editor to gedit - but gedit is the default in gnome.
How do I set it so that the default application when I double-click a file is Kate?
-
HorusKol over 14 yearsThanks Alex - I now about the right click option, but sometimes I just mindlessly double click on the file and would prefer it to load in Kate