change_default_text_editor_in_xubuntu

Change the default Text Editor in Xubuntu

usually when you want to use another application as a default editor / viewer for some file type you simply install the application you want and when opening the file you right click on the file, select open with other application and choose the new application. check the “Use as default for this kind of file” checkmark and you are don.

however, some applications like the text editor open a number of different files so it would be a bit of a long lasting job finding all of them and changing the text editor for every file. luckily, we are linux users who know that almost every setting of our systems can be customized in a textfile somewhere. only, where is this text file?

the textfile containing the global information which application is used to open which file in Xubuntu is located in

/usr/share/xubuntu/applications/defaults.list

so in order to switch from leafpad to gedit, simply

apt-get install gedit

and then edit the above file

sudo gedit /usr/share/xubuntu/applications/defaults.list

and replace all occurences of “leafpad” with “gedit” and you are done.

now since choosing the text editor is a religious thing among linux users, you might want to do this change for your own user only. if that is the case, copy all lines containing leafpad from the

/usr/share/xubuntu/applications/defaults.list

file to a file called

.local/share/applications/mimeapps.list

and change those lines to your liking

  • change_default_text_editor_in_xubuntu.txt
  • Last modified: 07.09.2012 12:03
  • by Pascal Suter