opening .webloc file in non-default browser

Discussion in 'Mac OS X Lion (10.7)' started by cruddell001, Apr 5, 2012.

  1. cruddell001 macrumors newbie

    May 15, 2011
    Is it possible to open a .webloc file in a browser other than my default one when I double-click on it? I currently use Firefox as my default browser, but I want to have a bookmark to on my desktop that I can open up in a new window in the current desktop. Currently, because it opens in Firefox, Lion switches back to the desktop that already has Firefox open in, then opens the page in a new tab. I would like it to operate more like a program than a webpage, where I can stick an icon on the dock and have it open in a new window. The easiest way I can think to achieve this is to have it open in a completely different browser from what I normally use.

    I'm guessing that there's no way to achieve this using normal Finder options. However, is it possible to write an Apple Script to open a particular browser to a certain url? If so, can someone point me to a sample script?

  2. Mal macrumors 603


    Jan 6, 2002
    Get Info on the .webloc file, then just change the "Open with" dropdown to which app you want.


  3. cruddell001 thread starter macrumors newbie

    May 15, 2011
    That definitely does not work. .webloc files do not behave the same way as standard Finder files. They will always open with the default browser. In my case, Firefox is the default browser, even though the "get info" screen shows "Safari" as the open-with app.

    I did manage to write a simple AppleScript to do the job, and it seems to work perfectly (as long as I'm not currently using Safari for anything important):

    tell application "Safari"
    	close every window
    	open location ""
    end tell

Share This Page