Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Open webpage from Terminal?

Open webpage from Terminal?
Thread Tools
bkb
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Mar 20, 2004, 02:40 PM
 
How do I launch Safari from the command line and tell it to go to a certain page?

Thanks in advance.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Mar 20, 2004, 03:16 PM
 
the open command will pass url's to your default web browser.

so, open http://www.google.com/ will open google in safari for me.
/Earth\ Mk\.\ I{2}/
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Mar 20, 2004, 03:27 PM
 
Originally posted by Earth Mk. II:
the open command will pass url's to your default web browser.

so, open http://www.google.com/ will open google in safari for me.
Thank you.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Mar 27, 2004, 10:15 AM
 
And if Safari isn't your default browser, you could force Safari to open it via an AppleScript called by osascript. This method would have more overhead than the solution above, however, as the script will be compiled at runtime.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:13 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2