How do I change the default browser for root in OS X 10.8.3
Do I need to enable the root user first?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityHow do I change the default browser for root in OS X 10.8.3
Do I need to enable the root user first?
Launch this from the terminal:
sudo -u root /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
It will ask you whether you want to set Google Chrome as your default browser. I assume the same technique works for Firefox and most browsers.
I had the same problem when running Skype as root and it fixed my problem (it opens links in Chrome instead of Safari now).
The default browser is stored in ~/Library/Preferences/com.apple.LaunchServices.plist as those records (my default browser is Mozilla Firefox):
<dict>
<key>LSHandlerContentType</key>
<string>public.html</string>
<key>LSHandlerRoleAll</key>
<string>org.mozilla.firefox</string>
</dict>
<dict>
<key>LSHandlerContentType</key>
<string>public.xhtml</string>
<key>LSHandlerRoleAll</key>
<string>org.mozilla.firefox</string>
</dict>
<dict>
<key>LSHandlerRoleAll</key>
<string>org.mozilla.firefox</string>
<key>LSHandlerURLScheme</key>
<string>http</string>
</dict>
<dict>
<key>LSHandlerRoleAll</key>
<string>org.mozilla.firefox</string>
<key>LSHandlerURLScheme</key>
<string>https</string>
</dict>
This file contains all the other default associations between specific resources and applications. You could copy a version of this file to the Library/Preferences folder of the user you want to apply those settings to.
As stated by previous comments, it seems very weird to change that for the root user as you're not expected to use this account in the GUI.
~/Library/Preferences/com.apple.LaunchServices.plist
file into the root Library/Preferences
folder which had no com.apple.LaunchServices.plist
file and restarting but no luck. I run two copies of Skype
and have to launch one through the terminal
in order to run them together thus one opens links in Safari which I dont like to use.