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.

As described in my write-up on custom keyboard layouts, in some situations it can be useful to re-run the Setup Assistant (the app that you get when you start a new Mac for the first time, or do a fresh OS X install) to change some settings for the current user.

This used to work fine in OS X 10.7 Lion and earlier versions:

sudo "/System/Library/CoreServices/Setup Assistant.app/Contents/MacOS/Setup Assistant"

However, in OS X 10.8 Mountain Lion, this command exits early with the following message:

...System identity already exists for domain com.apple.systemdefault. Done.

It seems the Setup Assistant has gotten “smarter” in that it detects all the settings for the current user have already been entered. Is there any way to bypass this detection so I can run the Setup Assistant again (to change the global system keyboard layout)?

share|improve this question

2 Answers 2

up vote 10 down vote accepted

Actually, you should be able to do it by removing a hidden system file which tells OS X that setup has run. Delete this file:

/var/db/.AppleSetupDone

It's a hidden file, so you will have to remove it using Terminal, or show hidden files in Finder. You can remove the file like so:

rm /var/db/.AppleSetupDone

To show hidden files in Finder, type the following into the Terminal:

defaults write com.apple.Finder AppleShowAllFiles -bool true

…and then restart Finder.

share|improve this answer
    
Thanks for the suggestion! It works as you described, although it requires me to create a new user account — I can’t overwrite the settings for the active account. IIRC, this used to be possible, at least in Lion. In other words, things used to be easier, but at least it’s still possible to do what I want :) Thanks again! –  Mathias Bynens Jul 26 '12 at 21:17
    
You're welcome. I forgot about the new user but, when I had the issue with a friend's machine, this was a suggested solution. –  Moshe Jul 26 '12 at 22:27
    
Remember that you'll need to rm that file as root (ie, 'sudo rm'). –  da4 Dec 20 '12 at 18:07

You can easily redownload the installer from the Mac App Store and re-run it on the same computer. It will tell you the computer is already on the same version, but it should go on correctly. You can copy the application bundle if you think you might need it somewhere else.

share|improve this answer
    
I don’t want to run the entire installer though — only the Setup Assistant. I want to make my custom keyboard layout the system default, which is not possible upon when the Setup Assistant first runs (which is right after installation), as the custom keyboard layout wouldn’t be there on a fresh install. –  Mathias Bynens Jul 26 '12 at 15:41
    
@MathiasBynens the "com.apple.systemdefault" is refering to the root certificate on your computer and the public/private key that are associated with it. I'm making a guess here and it is not a good idea to try it without back-up and a way to restore your computer, but you probably can remove those from Keychain Access.app and then run the setup assistant which, I guess, will remake when it runs. As the setup assistant watch those files, it must mean that if they do not exist, it will create them. I'm not responsible for problems arising from this. –  Philippe Gilbert Jul 26 '12 at 15:52

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.