• full path of open (or of shell)

    From deja@deja@lingvo.org to comp.sys.mac.system on Saturday, April 08, 2006 04:27:50
    From Newsgroup: comp.sys.mac.system

    Hi,

    I'm writing a XUL application that launches another application on
    windows using:

    C:\WINDOWS\system32\cmd.exe /c start saluton.pho

    I want this to work on Mac OS (10) as well, but don't have such a
    machine myself (!). I think "open" is the equivalent of "start", so to
    get this to work I need either:

    /fullpath/open saluton.pho

    or something like

    /fullpath/someshell -c saluton.pho

    So my questions are:
    1) is "open" part of the shell or an executable itself?
    2) where does "open" live (it's full path), or where is the shell (and
    is /fullpath/someshell -c myfile correct)

    thanks,
    Aaron
    (Belfast)

    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From see_signature@see_signature@mac.com.invalid (Jon) to comp.sys.mac.system on Saturday, April 08, 2006 13:59:11
    From Newsgroup: comp.sys.mac.system

    <deja@lingvo.org> wrote:

    1) is "open" part of the shell or an executable itself?

    Don't know if this helps, but in bash (default shell on Mac OS X) I can
    write, e.g.,
    open /Applications/iPhoto.app
    and iPhoto will open normally.

    Here is a quote from its man page:


    OPEN(1) BSD General Commands Manual OPEN(1)

    NAME
    open -- open files and directories

    SYNOPSIS
    open [-a application] file ...

    open [-b bundle_identifier] file ...

    open [-e] file ...

    open [-t] file ...

    open [-f]

    DESCRIPTION
    The open command opens a file (or a directory or URL), just as if you
    had double-clicked the file's icon. If no application name is specified,
    the default application as determined via LaunchServices is used to open
    the specified files.


    Good luck.
    --
    /Jon
    For mail address, run the following in Terminal:
    echo 36199371860304980107073482417748002696458P|dc
    Skype: storhaugen
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From haberg@haberg@math.su.se (Hans Aberg) to comp.sys.mac.system on Saturday, April 08, 2006 12:07:36
    From Newsgroup: comp.sys.mac.system

    In article <1144495670.668859.23970@j33g2000cwa.googlegroups.com>, deja@lingvo.org wrote:

    I'm writing a XUL application that launches another application on
    windows using:

    C:\WINDOWS\system32\cmd.exe /c start saluton.pho

    I want this to work on Mac OS (10) as well, but don't have such a
    machine myself (!). I think "open" is the equivalent of "start", so to
    get this to work I need either:

    /fullpath/open saluton.pho

    or something like

    /fullpath/someshell -c saluton.pho

    So my questions are:
    1) is "open" part of the shell or an executable itself?

    Mac OS X 'man' pages are available online at
    http://developer.apple.com/documentation/Darwin/Reference/ManPages/index.html

    2) where does "open" live (it's full path), or where is the shell (and
    is /fullpath/someshell -c myfile correct)

    $ whereis open
    /usr/bin/open

    --
    Hans Aberg
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From Andre Berger@andre.berger@web.de to comp.sys.mac.system on Saturday, April 08, 2006 14:09:47
    From Newsgroup: comp.sys.mac.system

    * deja@lingvo.org (2006-04-08):
    Hi,

    I'm writing a XUL application that launches another application on
    windows using:

    C:\WINDOWS\system32\cmd.exe /c start saluton.pho

    I want this to work on Mac OS (10) as well, but don't have such a
    machine myself (!). I think "open" is the equivalent of "start", so to
    get this to work I need either:

    /fullpath/open saluton.pho

    or something like

    /fullpath/someshell -c saluton.pho

    So my questions are:
    1) is "open" part of the shell or an executable itself?

    An executable

    2) where does "open" live (it's full path), or where is the shell (and
    is /fullpath/someshell -c myfile correct)

    $ which open
    /usr/bin/open
    $ which sh
    /bin/sh

    -Andre
    --- Synchronet 3.18b-Win32 NewsLink 1.113
  • From D P Schreber@schreberdp@rayban.net to comp.sys.mac.system on Saturday, April 08, 2006 07:29:23
    From Newsgroup: comp.sys.mac.system

    On 2006-04-08, deja@lingvo.org <deja@lingvo.org> wrote:
    C:\WINDOWS\system32\cmd.exe /c start saluton.pho

    The corresponding operation in osx is

    open saluton.pho

    as long as the .pho extension is already recognized.


    1) is "open" part of the shell or an executable itself?

    Executable.


    2) where does "open" live (it's full path),

    /usr/bin/open


    where is the shell

    There are lots of shells supported in osx: bash/sh, tcsh/csh, ksh, zsh.
    They're all in /bin. But you don't need a shell here anyway.
    --- Synchronet 3.18b-Win32 NewsLink 1.113