Page 1 of 1

Changing default text editor in Linux Mint 14

Posted: Thu Nov 22, 2012 11:21 pm
by blueplastic
Hi, I following this tutorial to install Sublime Text 2 sucessfully:
http://www.technoreply.com/how-to-insta ... -04-unity/

I basically edited the /usr/share/applications/defaults.list file and replaced all instances of gedit.desktop with sublime.desktop.

But upon reboot, the defaults.list file seems to be reloaded with gedit.desktop instead of sublime.desktop.

Is there some way I can make the settings stick in the defaults.list file beyond reboot?

Re: Changing default text editor in Linux Mint 14

Posted: Fri Nov 23, 2012 7:16 am
by cwsnyder
Yes, don't use the method you used to change the default. Instead, choose a text file you want to edit in a file manager, right click the file, select Properties >> General tab >> Open With pull-down box and select either Sublime Text, if it is listed, or Other Application . . . if it is not to bring up a full list of known applications and find Sublime Text. Once that is changed, the default editor for those type of files will be Sublime Text.

The /usr/share/applications/defaults.list is only changeable by root and is reset at every login from a list which is dependent on who is logging in.

Re: Changing default text editor in Linux Mint 14

Posted: Sat Dec 08, 2012 6:41 pm
by zeddock
Are you saying that sudo gedit to change the defaults.list file will not hold through a reboot, but that a GUI approach will?

Zeddock

Re: Changing default text editor in Linux Mint 14

Posted: Sat Dec 08, 2012 8:27 pm
by cwsnyder
@zeddock, I am saying that I think the /usr/share/applications/defaults.txt is not the governing file, but may be changed during the boot process depending on the actual user login. I have seen this occur as blueplastic reported. What the GUI does is change not all users defaults, but seems to set up a preferences configuration file in the individual's /home/<username>/ folder someplace (again, I haven't investigated enough to know where) which overrides the global default.

I don't want to imply that a GUI is better than the CLI, but first you have to know exactly what file is the controlling configuration file. As an analogy, look at the GRUB 2 system.

There probably is a more 'elegant' solution, but I went with what I found to work which was simplest. I know, no cookie, and no geek credit. :oops:

Re: Changing default text editor in Linux Mint 14

Posted: Sat Dec 08, 2012 10:19 pm
by zeddock
No geek credit?!

I love it!

No. I am a newb too..

I did find something I think...
Making changes to both the usr/share/applications/defaults.list, AND... sudo gedit /usr/share/linuxmint/common/artwork/mime/defaults.list
Seemed to survive the reboot.

zeddock

Re: Changing default text editor in Linux Mint 14

Posted: Tue Jan 08, 2013 6:47 pm
by jayced
cwsnyder wrote:Instead, choose a text file you want to edit in a file manager, right click the file, select Properties >> General tab >> Open With pull-down box and select either Sublime Text, if it is listed, or Other Application . . . if it is not to bring up a full list of known applications and find Sublime Text. Once that is changed, the default editor for those type of files will be Sublime Text.


So I just installed Sublime Text following the guide http://community.linuxmint.com/tutorial/view/907 and everything is working fine, Sublime appears in my menu and every thing is dandy. But when I try to "Open With Other Application" on a file, Sublime doesn't appear in the list of applications. Any ideas as to what isn't working properly?

Re: Changing default text editor in Linux Mint 14

Posted: Tue Jan 08, 2013 7:44 pm
by cwsnyder
Did you try 'Use a Custom Command' and browsing to where the Sublime Text executable resided? Sublime Text also may not be in the path used to search for executables.