Changing default text editor in Linux Mint 14

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
blueplastic

Changing default text editor in Linux Mint 14

Post 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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
cwsnyder

Re: Changing default text editor in Linux Mint 14

Post 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.
zeddock

Re: Changing default text editor in Linux Mint 14

Post 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
cwsnyder

Re: Changing default text editor in Linux Mint 14

Post 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:
zeddock

Re: Changing default text editor in Linux Mint 14

Post 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
jayced

Re: Changing default text editor in Linux Mint 14

Post 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?
cwsnyder

Re: Changing default text editor in Linux Mint 14

Post 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.
Locked

Return to “Software & Applications”