Professional Web Applications Themes

Launching Safari from the command-line - Mac Applications & Software

Anyone know how I can launch Safari from the command-line so that it goes to a specific web page? I've tried this command; /Applications/Safari.app/Contents/MacOS/Safari http://www./ But Safari just launches and pops up an error; Can't find file. No file exists at "/Users/david/http:/ www.". ....and the URL in the address bar is; file:///Users/david/http%3A/www. I've tried enclosing the URL in various types of quotes, escaping the slashes, omitting the 'http://', but I just get variants of the same error. Anyone have any ideas? David PS: If anyone is interested, I'm trying to do this because I use 'pan' under X windows to ...

  1. #1

    Default Launching Safari from the command-line

    Anyone know how I can launch Safari from the command-line so that it goes
    to a specific web page?

    I've tried this command;

    /Applications/Safari.app/Contents/MacOS/Safari http://www./

    But Safari just launches and pops up an error;

    Can't find file. No file exists at "/Users/david/http:/
    www.".

    ....and the URL in the address bar is;

    file:///Users/david/http%3A/www.

    I've tried enclosing the URL in various types of quotes, escaping the
    slashes, omitting the 'http://', but I just get variants of the same
    error.

    Anyone have any ideas?

    David

    PS: If anyone is interested, I'm trying to do this because I use 'pan'
    under X windows to read newsgroups, and this will enable me to click on a
    URL in a newsgroup post and go to the page in Safari.



    David Guest

  2. #2

    Default Re: Launching Safari from the command-line

    In article <teranews.com>, David
    Salgado <com> wrote:
     

    What happens if you put "..." around the URL?
    Philo Guest

  3. #3

    Default Re: Launching Safari from the command-line

    OK, I found the answer elsewhere, so posting thing in case anyone else has
    the same problem;

    open /Applications/Safari.app http://www./


    David Guest

  4. #4

    Default Re: Launching Safari from the command-line

    In article <teranews.com>, David
    Salgado <com> wrote:
     

    If Safari is your default browser, then this should work:

    open http://www.

    You could also install launch (<http://web.sabi.net/nriley/software/>);
    then you'd be able to launch Safari from the command line whether or
    not it is your default browser:

    launch -c sfri http://www. [the -c option refers to Safari's
    creator code]

    HTH,

    Emily

    --
    "If it seem slow, wait for it; it will surely come, it will not delay."
    Emily Jackson
    E-mail address altered; reply to m5comp AT fastmail DOT fm
    <http://home.hiwaay.net/~emilyj/missjackson.html>
    Emily Guest

Similar Threads

  1. Launching a command line app
    By danilocelic *TMM* in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 0
    Last Post: February 21st, 05:19 PM
  2. Launching a command line app
    By LEHHEL in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: February 21st, 05:11 PM
  3. Stop NTBACKUP gui from launching when run from command line
    By Cole Shelton in forum Windows Server
    Replies: 0
    Last Post: June 12th, 06:16 AM
  4. RUN/execute a Command-Line command from an ASP page.
    By Lucas Cowald in forum ASP Components
    Replies: 7
    Last Post: October 22nd, 01:08 PM
  5. Auto-launching VLC w/ Safari?
    By Elizabot in forum Mac Networking
    Replies: 4
    Last Post: October 8th, 12:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139