packages icon



 OPEN(1L)                                                           OPEN(1L)
                               Local Commands



 NAME
      open, appopen, run, unhide - open files and applications

 SYNOPSIS
      open [-a app] [-o file] [-p] [-NXHost hostname] [-unhide] [-nostat]
      [-wait] [-temp] [+linenum] [filename] ...
      appopen app
      run app
      unhide app
      app [options]

 DESCRIPTION
      The open command allows shell scripts or Terminal users to make
      requests to NEXTSTEP applications. The applications may be launched or
      unhidden, can be asked to open or print files. Besides the added
      options, it should behave exactly like earlier (working) versions of
      NeXT's open command did. It does not require the ``Public Window
      Server'' switch (a major security hole) in the Preferences application
      to be turned on to work correctly.

      If no options are given at all or the special file name "-" is used,
      standard input is read. PostScript (.ps), Encapsulated PostScript
      (.eps), and Rich Text Format (.rtf) files are recognized on standard
      input and sent to the appropriate applications. All other files are
      considered typeless, i.e. they are opened in either the named
      application (see -a) or the default application (normally Edit).

      Wherever the word file is used, it also applies to wrappers and
      ordinary directories.

    OPTIONS
      -a app
           All further requests are directed to the named application. The
           application is launched if it is not running yet. If no -a option
           is given, the Workspace is asked for the default application for
           the files.

      -o file
           The application will be asked to open the named file. This option
           can be used to switch back from print mode or to prefix a file
           name which could be mistaken as an option. File names can also be
           escaped from being mistaken as an option by prefixing them with
           `./' (this also works with all other commands).

      -p   The application will be asked to print the specified files. Print
           mode will apply to all files given up to the next -o option.

      -NXHost hostname
           All requests are directed to the Workspace and applications on
           the remote host. The files to be accessed are looked for on the
           remote host's file system. This option requires the ``Public



                                    - 1 -         Formatted:  April 19, 2024






 OPEN(1L)                                                           OPEN(1L)
                               Local Commands



           Window Server'' switch on the remote host to be turned on, which
           is major security hole, if you are connected to a network.

      -unhide
           The named application is unhidden. Most applications will also
           unhide on a file opening request.

      -nostat
           The checks whether the next file to be opened or printed does not
           exist will not be performed. In case of failure of a request to
           an application, it is not possible to find out whether the file
           did not exist or the application could not open it. It is
           necessary for -NXHost, unless there is also a local file with the
           same name as the remote file. This option also allows certain
           applications (such as Emacs) to open files that do not exist yet.

      -wait
           open will not continue until the next file given is saved for the
           first time.

      -temp
           The next file will be opened as a temporary file. This tells the
           application it should remove the file when it is done. Despite it
           belongs to the official API, only few applications (such as
           Preview) honor this request.

      +linenum
           In the next file, line number linenum will automatically be
           selected. This is currently only supported by Edit and Emacs.

    ALTERNATE NAMES
      open can also be invoked by other names, where some defaults are
      automatically set.

      run app, appopen app
           Behave as if it was invoked as open -a app.

      unhide app
           Identical to open -a app -unhide.

      app  If open is invoked with any other name, it behaves as if it were
           called as open -a app.

 EXAMPLES
      open *.rtf
           opens all files ending in `.rtf' in the default application for
           this file type (usually Edit).

      open -p *.rtf
           prints all these files.




                                    - 2 -         Formatted:  April 19, 2024






 OPEN(1L)                                                           OPEN(1L)
                               Local Commands



      open /tmp
           opens up a new file viewer showing the contents of the named
           directory.

      appopen Yap Test.ps
           launches Yap (if it is not already running) and asks it to open
           Test.ps.

      Emacs *
           opens all files in Emacs (`Emacs' needs to be a link to `open').

      open -a Emacs -wait snd.2935
           asks Emacs to open the file.  open will not continue unless the
           file has been saved. This is an alternative to using emacsclient
           as your editor from within Unix programs.

 BUGS
      The -p, -temp and +linenum options are only supported by few
      applications.

      -NXHost should imply -nostat.  The current behaviour is compatible to
      the original open.

      -NXHost requires ``Public Window Server'' (a major security hole) to
      be turned on (this is not our fault).


 AUTHORS
      This version of open was written by Christian Limpach <chris@nice.ch>,
      with suggestions by Felix Rauch <felix@nice.ch> and Marcel Waldvogel
      <waldvogel@uptime.ch>. This manual page was written by Marcel
      Waldvogel.






















                                    - 3 -         Formatted:  April 19, 2024