Set Chrome as Default Browser from Command Line
Whenever I see a desktop GUI to accomplish a given web-related task, I'm dying to know the underlying operating system interaction to accomplish the same feat. Many of the GUIs I use are just a front for a command line utility for that more experienced developers would use.
I set out to find the command line script for setting the system's default browser on OS X but apparently there isn't one, but I did find a command line script for setting Chrome as the default browser:
open -a "Google Chrome" --args --make-default-browser
The script above opens Google Chrome and asks for confirmation that you'd like to make it the default browser. I'm not aware of what command line scripts would make other browsers the default browser, and I'm a bit annoyed that there isn't a single script to do so!
![Vibration API]()
Many of the new APIs provided to us by browser vendors are more targeted toward the mobile user than the desktop user. One of those simple APIs the Vibration API. The Vibration API allows developers to direct the device, using JavaScript, to vibrate in...
![7 Essential JavaScript Functions]()
I remember the early days of JavaScript where you needed a simple function for just about everything because the browser vendors implemented features differently, and not just edge features, basic features, like addEventListener
and attachEvent
. Times have changed but there are still a few functions each developer should...
![MooTools FontChecker Plugin]()
There's a very interesting piece of code on Google Code called FontAvailable which does a jQuery-based JavaScript check on a string to check whether or not your system has a specific font based upon its output width. I've ported this functionality to MooTools.
The MooTools...
![Sexy Opacity Animation with MooTools or jQuery]()
A big part of the sexiness that is Apple software is Apple's use of opacity. Like seemingly every other Apple user interface technique, it needs to be ported to the web (</fanboy>). I've put together an example of a sexy opacity animation technique...
Too bad that still prompts you to accept the make default browser action/choice. That kind of detracts from the ability to fully automate system provisioning for instance. :(
Or simply go here:
OS X Yosemite:
1 – From the Apple menu, choose System Preferences, then click General.
2 – Click the “Default web browser” pop-up menu and choose a web browser, like Safari.
OS X Mavericks or earlier:
1 – Open Safari from the Applications folder, Dock, or Launchpad.
2 – From the Safari menu, choose Preferences.
3 – Click the General button.
4 – Choose a web browser from the “Default web browser” pop-up menu, like Safari.