Lugaru's Epsilon
Programmer's
Editor 14.00

Context:
Epsilon User's Manual and Reference
   Getting Started
      . . .
      Unix Installation
      macOS Installation
         Epsilon for macOS Keyboard Issues
         Epsilon for macOS Startup
         Epsilon for macOS and Privacy-protected Folders
      DOS Installation
      . . .

Previous   Up    Next
Epsilon for macOS Keyboard Issues  Getting Started   Epsilon for macOS and Privacy-protected Folders


Epsilon User's Manual and Reference > Getting Started > macOS Installation >

Epsilon for macOS Startup

When you run Epsilon for macOS, a helper program runs first and manages starting Epsilon. For example, it adds various flags to Epsilon's command line that make it start in your home directory the very first time you run Epsilon, remember any directory you've set from session to session, and use a single instance.

Unlike most Unix-based systems, macOS applications run from an icon aren't descended from any shell process that loads user-defined environment variables. Since Epsilon uses some environment variables for configuration, on macOS, Epsilon's helper program loads environment variables from the file ~/.epsilon/environment if it exists. The format is a series of lines with VAR=VALUE, the same as the env command produces. Invalid lines are ignored. Any settings here override variables in the environment.

Epsilon includes a setup script, which will install Epsilon and its EEL compiler on your path, so you can run them from the command line more conveniently. Running it is optional. To run Epsilon's setup script from a shell prompt, type

sudo "/Applications/Epsilon 14.00.app/Contents/esetup"

assuming /Applications is where you installed Epsilon.

The setup script creates a link to Epsilon's startup helper, instead of running Epsilon's executable directly. If you want to run Epsilon using a shell alias, via an XQuartz Applications menu entry, or in some similar way, either have it run the startup helper program within Epsilon's app bundle (Epsilon 14.00.app/Contents/MacOS/epsilon-starter), or use the "open" command on Epsilon's app bundle, rather than directly running the Epsilon binary file within the app bundle, to let it switch privacy contexts if necessary. (See the next section.)

Normally Epsilon runs with a single instance when invoked via its icon, while each command-line invocation begins a new instance. You can change this by adding an entry to the file ~/.epsilon/startup-config. Add the line singleinstance=always to make Epsilon, when run from a command line, first try to bring any running instance to the front (via the -add flag), starting up normally if there's no previous instance running. Add the line singleinstance=never to make Epsilon's icon start a new Epsilon instance always. (This works for icons in a folder, not icons in the dock, which are always single-instance.)

Similarly, from an icon Epsilon normally restores the current directory from a previous session (via the -w1 flag), while from the command line it inherits the invoking shell's current directory. You can change this by adding a line useolddir=always or useolddir=never, just as above. If you want the startup helper to pass a different flag in such cases, set wflag=-w17, for example. (The value 17 combines 1, setting the current directory from a previous session, and 16, overriding that by setting the current directory to that of the first file listed on the command line, if any.)

Some other settings are available to work around issues. To operate with the macOS privacy system explained in the next section, Epsilon's startup helper sometimes needs to know if X11's DISPLAY environment variable refers to a local display, where starting Epsilon in a different privacy context would work, or a remote ssh connection where it would not. At present, it checks to see if the value of DISPLAY contains "xquartz:", which indicates a local X11 server. You can change this string by setting localdisplaydetect, if that's not working right with your configuration. Epsilon also skips switching privacy contexts if invoked with sudo, but this check may be disabled with ignoresudo=1.



Previous   Up    Next
Epsilon for macOS Keyboard Issues  Getting Started   Epsilon for macOS and Privacy-protected Folders


Lugaru Epsilon Programmer's Editor 14.00 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.