Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have found the following repository on GitHub...

https://github.com/mathiasbynens/dotfiles/blob/master/.osx

...that has some useful environmental settings I would like to adopt. It appears they go into a .osx file. Where is this file located? Also, when does it 'run'? Do I have to reboot the machine to get the settings in this to be recognized?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

That looks like a shell script that is missing the shebang at the top of the file.

It could be that it is intended to be copied into an existing script to provide OS X-specific functionality so the main script can be portable (I'd expect there to be dotfiles for other operating systems, as well.)

On the other hand, it could be intended as a file of ideas and you pick the ones you want and paste them into your .bashrc or .bash_profile.

share|improve this answer
add comment

Select settings that look interesting, paste them in a terminal, and then quit and reopen applications to try them out.

You might also save the whole script as for example ~/.osx and then run bash ~/.osx in a terminal. It includes commands for things like changing the computer name though.

The defaults commands modify files like ~/Library/Preferences/.GlobalPreferences.plist, and you only have to run them once. Adding them to .bash_profile would only make your shell startup time longer. You might keep a personal file like .osx though in case you make a clean installation of OS X. And for example chflags nohidden ~/Library has to be run again after every OS X update.

I have a file like .osx only for settings that can't be changed from the UI (defaults.txt). I think it's easier to transfer settings to new OS X installations by recreating them manually, by copying the plist files, or by using Migration Assistant.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.