Changing default text editor in Linux Mint 14

Questions about applications and software
Forum rules
Before you post please read this

Changing default text editor in Linux Mint 14

Postby blueplastic on Thu Nov 22, 2012 11:21 pm

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?
blueplastic
Level 1
Level 1
 
Posts: 3
Joined: Thu Nov 22, 2012 9:39 pm

Linux Mint is funded by ads and donations.
 

Re: Changing default text editor in Linux Mint 14

Postby cwsnyder on Fri Nov 23, 2012 7:16 am

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.
LMDE Mate 64-bit, LM16 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 13.10 64-bit, Xubuntu Trusty Tahr 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1039
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: Changing default text editor in Linux Mint 14

Postby zeddock on Sat Dec 08, 2012 6:41 pm

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
zeddock
Level 1
Level 1
 
Posts: 23
Joined: Fri May 27, 2011 7:08 pm

Re: Changing default text editor in Linux Mint 14

Postby cwsnyder on Sat Dec 08, 2012 8:27 pm

@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:
LMDE Mate 64-bit, LM16 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 13.10 64-bit, Xubuntu Trusty Tahr 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1039
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: Changing default text editor in Linux Mint 14

Postby zeddock on Sat Dec 08, 2012 10:19 pm

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
zeddock
Level 1
Level 1
 
Posts: 23
Joined: Fri May 27, 2011 7:08 pm

Re: Changing default text editor in Linux Mint 14

Postby jayced on Tue Jan 08, 2013 6:47 pm

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?
jayced
Level 1
Level 1
 
Posts: 1
Joined: Tue Jan 08, 2013 6:41 pm

Re: Changing default text editor in Linux Mint 14

Postby cwsnyder on Tue Jan 08, 2013 7:44 pm

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.
LMDE Mate 64-bit, LM16 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 13.10 64-bit, Xubuntu Trusty Tahr 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1039
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: bjmh46, luke8800gt, VelhoP and 20 guests