Change the default opening program for cpp files on mac

broken image

If I want the changes to take effect I'll need to restart Launch Services like so: /System/Library/Frameworks/amework/Versions/A/Frameworks/amework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain userĪnd to give credit where credit is due, I learned about this approach from this stackoverflow. To do this I type: defaults write LSHandlers -array-add '' For MinGW users in general, you need to create an RC file, like: MAINICON ICON 'foo. On Windows, EXE, DLL, OBJ, and a few other files are all the PE32 file format. In this case I'll change the default application for all ain-text types. Console programs can have any and all of the same resources as Window GUI programs, but they typically aren't built with them. KMDItemContentModificationDate = 04:18:50 +0000 I can find out the content type value for text files by inspecting one of them with mdls: > mdls test.txt KMDItemCFBundleIdentifier = 'com.sublimetext.2'

broken image

I can use mdls to get this information: > mdls /Applications/Sublime\ Text\ 2.app Let's say I wanted to change all text files to open in Sublime Text 2.įirst I need the kMDItemCFBundleIdentifier for Sublime Text 2. Launch Services is responsible for default file associations.