Monday, May 6, 2024
66
rated 0 times [  66] [ 0]  / answers: 1 / hits: 42868  / 2 Years ago, wed, may 11, 2022, 5:03:37

I started using Sublime Text 2 a week or so ago and I loved it so much I've spent $60 on it and now want to use it for everything.



Gedit currently has ownership of most of the text file associations. I'd essentially like to replace any association to gedit with sublime-text-2.



Any tips available on bulk association changing? Desktop-neutral methods are preferred.


More From » file-association

 Answers
0

Running on 13.04+, update the file: /etc/gnome/defaults.list.



sudo sed -i 's/gedit.desktop/sublime-text-2.desktop/g' /etc/gnome/defaults.list  


Credit to trent for the update to 13.04+



Pre-13.04:



System wide associations:



sudo sed -i 's/gedit.desktop/sublime-text-2.desktop/g' /usr/share/applications/defaults.list


Just your user's associations:



sed -i 's/gedit.desktop/sublime-text-2.desktop/g' ~/.local/share/applications/mimeapps.list


Credit to Oli for the naming convention of the .desktop file before I started using SublimeText2.


[#39727] Wednesday, May 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
poous

Total Points: 81
Total Questions: 101
Total Answers: 119

Location: Cambodia
Member since Sat, Oct 3, 2020
4 Years ago
;