Skip to content

Instantly share code, notes, and snippets.

@JJL772
Last active December 14, 2023 05:54
Show Gist options
  • Select an option

  • Save JJL772/fcce369fa5b0e90369bcc95af3a733a6 to your computer and use it in GitHub Desktop.

Select an option

Save JJL772/fcce369fa5b0e90369bcc95af3a733a6 to your computer and use it in GitHub Desktop.

Revisions

  1. JJL772 revised this gist Dec 14, 2023. 2 changed files with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions 31-module-versions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # Module Versions

    Module versions are listed below. Using git, these can be checked out using `git checkout VERSION`, where `VERSION` is the value in the rightmost column.

    | Module Name | Link | Version |
    |---|---|---|
    | calc | https://github.com/epics-modules/calc | R3-7-5 |
    | sscan | https://github.com/epics-modules/sscan.git | R2-11-6 |
    | asyn | https://github.com/epics-modules/asyn | R4-44 |
    | miscUtils | https://github.com/slac-epics/miscUtils.git | R2.branch |
    | devBusMapped | https://github.com/slac-epics/devBusMapped.git | R3.2.3 |
  2. JJL772 revised this gist Dec 3, 2023. 4 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  3. JJL772 revised this gist Dec 2, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions extensions.md
    Original file line number Diff line number Diff line change
    @@ -77,6 +77,7 @@ index 70b248c..d0673b6 100644
    ```
    This is required for EDM to compile, if you so choose to install it.

    Then, compilation is as simple as:
    ```sh
    cd /epics/extensions
    make -j$(nproc)
  4. JJL772 revised this gist Dec 2, 2023. 1 changed file with 33 additions and 0 deletions.
    33 changes: 33 additions & 0 deletions extensions.md
    Original file line number Diff line number Diff line change
    @@ -30,6 +30,7 @@ Install the following via APT:
    * libgif-dev
    * libx11-dev
    * libxtst-dev
    * libxmu-dev


    ### Getting the files
    @@ -44,6 +45,38 @@ git clone https://github.com/gnartohl/edm

    ### Building

    If you're on Ubuntu or Debian, you will need to point the extensions makefiles at the correct library location.
    In `/epics/extensions/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64`, add the following lines to the _end_ of the file:
    ```
    X11_LIB=/usr/lib/x86_64-linux-gnu
    MOTIF_LIB=/usr/lib/x86_64-linux-gnu
    ```

    Modify `/epics/extensions/src/Makefile` to include the following patch:
    ```
    diff --git a/extensions/src/Makefile b/extensions/src/Makefile
    index 70b248c..d0673b6 100644
    --- a/extensions/src/Makefile
    +++ b/extensions/src/Makefile
    @@ -45,6 +45,7 @@ JPROBE = jprobe
    KM = km
    NOBCONFIG = knobconfig
    MEDM = medm
    +EDM = edm
    MOTIFBUTTON = motifButton
    EXTENSION_MSI = msi
    NAMECAPTURE = namecapture
    @@ -96,6 +97,7 @@ DIRS += $(JDCT)
    DIRS += $(JPROBE)
    DIRS += $(KM)
    DIRS += $(MEDM)
    +DIRS += $(EDM)
    DIRS += $(MOTIFBUTTON)
    DIRS += $(EXTENSION_MSI)
    DIRS += $(NAMECAPTURE)
    ```
    This is required for EDM to compile, if you so choose to install it.

    ```sh
    cd /epics/extensions
    make -j$(nproc)
  5. JJL772 revised this gist Nov 29, 2023. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions base.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,12 @@ For all examples, we will be using `/epics` as the root directory for the EPICS

    ## Important References

    Complete EPICS documentation can be found here: https://docs.epics-controls.org/en/latest/

    Documentation about the EPICS build system: https://docs.epics-controls.org/en/latest/build-system/specifications.html
    * Complete EPICS documentation can be found here: https://docs.epics-controls.org/en/latest/
    * Documentation about the EPICS build system: https://docs.epics-controls.org/en/latest/build-system/specifications.html
    * EPICS base: https://github.com/epics-base
    * EPICS modules: https://github.com/epics-modules
    * EPICS extensions: https://github.com/epics-extensions
    * SLAC's EPICS modules: https://github.com/slac-epics and https://github.com/slac-epics-modules

    ## Getting the files

  6. JJL772 revised this gist Nov 29, 2023. 3 changed files with 151 additions and 1 deletion.
    2 changes: 1 addition & 1 deletion extensions.md
    Original file line number Diff line number Diff line change
    @@ -155,4 +155,4 @@ index b125a50..e77426d 100644
    #-misc-liberation sans-(medium,bold)-(r,i)-normal--0-(80,100,120,140,160=150,180,200,240,280,320,360,420,480,600,720)-75-75-p-0-*-* exact
    ````

    Once you have this done, and your environment setup (as per [Setting up the environment](Setting-up-the-environment), you can run edm with `edm`.
    Once you have this done, and your environment setup (as per [Setting up the environment](https://gist.github.com/JJL772/fcce369fa5b0e90369bcc95af3a733a6#setting-up-the-environment), you can run edm with `edm`.
    52 changes: 52 additions & 0 deletions module-build-instructions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,52 @@
    # Module Build Instructions

    This document covers build instructions for some of the core EPICS modules.

    ## calc

    `cd /epics/modules`

    ```
    git clone https://github.com/epics-modules/calc
    cd calc
    ```

    `configure/RELEASE.local`:
    ```make
    SUPPORT=/epics/modules
    EPICS_BASE=/epics/base

    SSCAN=
    ```

    ## modbus

    `cd /epics/modules`

    ```sh
    git clone https://github.com/epics-modules/modbus.git
    cd modbus
    ```

    `configure/RELEASE.local`:
    ```make
    SUPPORT=/epics/modules
    EPICS_BASE=/epics/base

    ASYN=$(SUPPORT)/asyn
    ```

    ## autosave

    `cd /epics/modules`

    ```sh
    git clone https://github.com/epics-modules/autosave.git
    cd autosave
    ```

    `configure/RELEASE.local`:
    ```make
    SUPPORT=/epics/modules
    EPICS_BASE=/epics/base
    ```
    98 changes: 98 additions & 0 deletions modules.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,98 @@
    # EPICS Modules

    Modules are libraries based on EPICS base that are designed to be used by IOC applications. They may include support for different types of hardware, general utilities for the IOC engineers, new record types and plenty more.

    The general convention for modules is that they will live in the `modules` directory under a particular EPICS installation.

    Unlike extensions, the build configuration for these is generally done using `RELEASE.local` files, which override content specified within their `configure/RELEASE` file. `configure/RELEASE` tells the module where its dependencies live, and it supplies additional configuration flags to the module for build.

    In this guide, we will go over building the `asyn` module. Asyn is one of the most commonly used EPICS modules, as it forms the basis for threaded asynchronous device support modules.

    ## Creating the directories

    ```sh
    cd /epics
    mkdir modules
    ```

    ## Installing Dependencies (for asyn)

    * libtirpc-dev

    ## Getting the files (for asyn)

    ```sh
    git clone https://github.com/epics-modules/asyn
    ```

    ## Configuring the build

    `cd /epics/modules/asyn`

    The first step to building any module is to configure the build using a RELEASE.local file. These are ignored by `.gitignore`, and generally should not be committed to the repository.

    Create `configure/RELEASE.local`

    Now, open `configure/RELEASE` to see what it contains. For asyn, it looks like this:
    ```
    ```make
    #RELEASE Location of external products
    SUPPORT=/corvette/home/epics/devel
    # IPAC is only necessary if support for Greensprings IP488 is required
    # IPAC release V2-7 or later is required.
    # It can be obtained here: https://github.com/epics-modules/ipac
    IPAC=$(SUPPORT)/ipac-2-15
    # SEQ is required for testIPServer
    # It can be obtained here: https://www-csr.bessy.de/control/SoftDist/sequencer/Manual.html
    SNCSEQ=$(SUPPORT)/seq-2-2-5
    # For sCalcout support in asynOctet - applications include asynCalc.dbd
    # It can be obtained here: https://github.com/epics-modules/calc
    CALC=$(SUPPORT)/calc-3-7-3
    # If CALC was built with SSCAN support then SSCAN must be defined for testEpicsApp
    # It can be obtained here: https://github.com/epics-modules/sscan
    SSCAN=$(SUPPORT)/sscan-2-11-3
    # EPICS_BASE 3.14.6 or later is required
    # It can be obtained here: https://github.com/epics-base/epics-base
    EPICS_BASE=/corvette/usr/local/epics-devel/base-7.0.5
    -include $(TOP)/../RELEASE.local
    -include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
    -include $(TOP)/configure/RELEASE.local
    ```

    As you can see, the default `RELEASE` file provided by asyn is very much site-specific to the author's workstation. We'll need to change that.

    For this example, we will not be enabling IPAC support, testIPServer or sCalcout support in asynOctet.

    Additionally, on modern Linux systems (i.e. Debian 13, Ubuntu 22.04), the RPC library is no longer provided by glibc and is instead in a separate package called tirpc. asyn has a flag we can enable in `RELEASE.local` to enable that, if we're building on a modern system.

    Thus, our `RELEASE.local` will look like this:
    ```make
    IPAC=
    SNCSEQ=
    SSCAN=
    CALC=

    # Enable libtirpc. Required for modern linux
    TIRPC=YES

    SUPPORT=/epics/modules
    EPICS_BASE=/epics/base

    # If you build and install calc, specify it like this:
    CALC=$(SUPPORT)/calc
    ```

    ## Building

    Build, and you're done!
    ```
    make
    ```
  7. JJL772 revised this gist Nov 29, 2023. 2 changed files with 5 additions and 5 deletions.
    8 changes: 4 additions & 4 deletions base.md
    Original file line number Diff line number Diff line change
    @@ -26,14 +26,14 @@ Put the following into a script, and source this script before working with EPIC
    # Set to the arch of the machine you will be compiling with.
    export EPICS_HOST_ARCH="linux-x86_64"
    export EPICS_BASE="/epics/base"
    export EPICS_EXTENSIONS="/epics/modules"
    export EPICS_EXTENSIONS="/epics/extensions"
    export PATH="$EPICS_BASE/bin/$EPICS_HOST_ARCH:$PWD/scripts:$PATH"
    export PATH="$EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH:$PATH"

    # Required for EDM
    export EDMOBJECTS=$EPICS_EXTENSIONS/etc
    export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc
    export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain
    export EDMOBJECTS=$EPICS_EXTENSIONS/src/edm/setup
    export EDMPVOBJECTS=$EPICS_EXTENSIONS/src/edm/setup
    export EDMFILES=$EPICS_EXTENSIONS/src/edm/setup
    export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles
    export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH

    2 changes: 1 addition & 1 deletion extensions.md
    Original file line number Diff line number Diff line change
    @@ -155,4 +155,4 @@ index b125a50..e77426d 100644
    #-misc-liberation sans-(medium,bold)-(r,i)-normal--0-(80,100,120,140,160=150,180,200,240,280,320,360,420,480,600,720)-75-75-p-0-*-* exact
    ````

    Once you have this done, and your environment setup, you can run edm with `edm`.
    Once you have this done, and your environment setup (as per [Setting up the environment](Setting-up-the-environment), you can run edm with `edm`.
  8. JJL772 created this gist Nov 29, 2023.
    55 changes: 55 additions & 0 deletions base.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    # Building EPICS Base

    For all examples, we will be using `/epics` as the root directory for the EPICS install. Please substitute with your own directory.

    ## Important References

    Complete EPICS documentation can be found here: https://docs.epics-controls.org/en/latest/

    Documentation about the EPICS build system: https://docs.epics-controls.org/en/latest/build-system/specifications.html

    ## Getting the files

    `cd /epics`

    1. Clone EPICS base to your desired directory: `git clone --recursive https://github.com/epics-base/epics-base base` (NOTE: The --recursive flag is necessary here, otherwise you will need to run `git submodule update --init --recursive` later.)
    2. Now you should have `myepics/base`

    ## Setting up the environment

    EPICS requires several environment variables be set. In general, it is recommended to have a script that defines the environment and location for a particular EPICS install. Only a few of these environment variables are required.

    See: https://docs.epics-controls.org/en/latest/getting-started/installation-linux.html

    Put the following into a script, and source this script before working with EPICS.
    ```sh
    # Set to the arch of the machine you will be compiling with.
    export EPICS_HOST_ARCH="linux-x86_64"
    export EPICS_BASE="/epics/base"
    export EPICS_EXTENSIONS="/epics/modules"
    export PATH="$EPICS_BASE/bin/$EPICS_HOST_ARCH:$PWD/scripts:$PATH"
    export PATH="$EPICS_EXTENSIONS/bin/$EPICS_HOST_ARCH:$PATH"

    # Required for EDM
    export EDMOBJECTS=$EPICS_EXTENSIONS/etc
    export EDMPVOBJECTS=$EPICS_EXTENSIONS/etc
    export EDMFILES=$EPICS_EXTENSIONS/src/edm/edmMain
    export EDMHELPFILES=$EPICS_EXTENSIONS/src/edm/helpFiles
    export EDMLIBS=$EPICS_EXTENSIONS/lib/$EPICS_HOST_ARCH

    # Only required if you're using the CLANG compiler
    #export CC=clang
    #export CXX=clang++
    #export CCC=clang++
    #export CMPLR_CLASS=clang
    ```

    ## Compile

    With your environment setup, you should now be able to compile EPICS base.
    ```sh
    cd base
    make -j$(nproc)
    ```

    If you've done everything correctly, `caget` `caput` `pvget`, etc. should exist on your path.
    158 changes: 158 additions & 0 deletions extensions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,158 @@
    # EPICS Extensions

    Extensions are software packages such as EDM or MEDM that are not designed to be used within IOCs. Building these is a little bit different than modules.

    ## Getting the files

    `cd /epics`

    First, we will need to grab the files for the EPICS extensions directory: `git clone --recursive https://github.com/epics-extensions/extensions extensions`

    Now, we should have the directory `myepics/extensions` with some content.

    `cd /epics/extensions/src`

    In the `src` directory within `extensions`, we will place our EPICS extensions. This exact setup is unfortunately required due to how EDM and other extensions have their Makefiles setup.

    ## EDM

    The first major extension we will install is EDM, or "Extensible Display Manager". This is a Motif-based tool for viewing screens.

    ### Installing Dependencies

    (NOTE: I'm testing all of this on Debian 13, but I am cross-referencing packages with Ubuntu 22.04)

    Install the following via APT:
    * libpng-dev
    * libmotif-dev
    * libxm4
    * zlib1g-dev
    * libgif-dev
    * libx11-dev
    * libxtst-dev


    ### Getting the files

    `cd /epics/extensions/src`

    The files may be obtained from this Github repository: https://github.com/gnartohl/edm

    ```
    git clone https://github.com/gnartohl/edm
    ```

    ### Building

    ```sh
    cd /epics/extensions
    make -j$(nproc)
    ```

    ### Running

    EDM will search for screens in directories listed in `$EDMDATAFILES` and `$EPICS_DISPLAY_PATH`.

    Depending on your system, the default EDM font configuation may not work. It certainly didn't work on my Debian 13 system due to missing fonts that also couldn't be found in the package manager.

    To fix this, you will need to modify `edm/setup/fonts.list` to point to courier or some other installed font family. In reality, courier doesn't *actually* need to be installed, EDM will fall back to some other built-in font. Nonetheless, it still requires the fonts.list be filled out.

    ```diff
    diff --git a/setup/fonts.list b/setup/fonts.list
    index b125a50..e77426d 100644
    --- a/setup/fonts.list
    +++ b/setup/fonts.list
    @@ -2,83 +2,18 @@
    courier-bold-r-12.0
    helvetica-bold-r-12.0

    -substitutions {
    -
    --misc-liberation sans-bold-r-normal--0-80-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-80-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-80-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-80-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-80-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-80-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-80-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-80-75-75-p-*-*-*
    -
    --misc-liberation sans-bold-r-normal--0-100-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-100-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-100-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-100-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-100-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-100-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-100-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-100-75-75-p-*-*-*
    -
    --misc-liberation sans-bold-r-normal--0-120-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-120-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-120-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-120-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-120-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-120-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-120-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-120-75-75-p-*-*-*
    -
    --misc-liberation sans-bold-r-normal--0-140-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-140-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-140-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-140-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-140-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-140-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-140-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-140-75-75-p-*-*-*
    -
    --misc-liberation sans-bold-r-normal--0-180-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-180-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-180-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-180-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-180-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-180-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-180-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-180-75-75-p-*-*-*
    -
    --misc-liberation sans-bold-r-normal--0-240-75-75-p-0-*-*=-adobe-helvetica-bold-r-normal--*-240-75-75-p-*-*-*
    --misc-liberation sans-bold-i-normal--0-240-75-75-p-0-*-*=-adobe-helvetica-bold-o-normal--*-240-75-75-p-*-*-*
    --misc-liberation sans-medium-r-normal--0-240-75-75-p-0-*-*=-adobe-helvetica-medium-r-normal--*-240-75-75-p-*-*-*
    --misc-liberation sans-medium-i-normal--0-240-75-75-p-0-*-*=-adobe-helvetica-medium-o-normal--*-240-75-75-p-*-*-*
    -
    -
    --misc-liberation mono-bold-r-normal--0-80-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-80-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-80-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-80-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-80-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-80-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-80-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-80-75-75-m-*-*-*
    -
    --misc-liberation mono-bold-r-normal--0-100-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-100-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-100-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-100-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-100-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-100-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-100-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-100-75-75-m-*-*-*
    -
    --misc-liberation mono-bold-r-normal--0-120-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-120-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-120-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-120-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-120-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-120-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-120-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-120-75-75-m-*-*-*
    -
    --misc-liberation mono-bold-r-normal--0-140-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-140-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-140-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-140-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-140-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-140-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-140-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-140-75-75-m-*-*-*
    -
    --misc-liberation mono-bold-r-normal--0-180-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-180-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-180-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-180-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-180-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-180-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-180-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-180-75-75-m-*-*-*
    -
    --misc-liberation mono-bold-r-normal--0-240-75-75-m-0-*-*=-adobe-courier-bold-r-normal--*-240-75-75-m-*-*-*
    --misc-liberation mono-bold-i-normal--0-240-75-75-m-0-*-*=-adobe-courier-bold-o-normal--*-240-75-75-m-*-*-*
    --misc-liberation mono-medium-r-normal--0-240-75-75-m-0-*-*=-adobe-courier-medium-r-normal--*-240-75-75-m-*-*-*
    --misc-liberation mono-medium-i-normal--0-240-75-75-m-0-*-*=-adobe-courier-medium-o-normal--*-240-75-75-m-*-*-*
    -
    -}
    -
    # note that a tab separates the font spec and the word "exact"
    -courier=-misc-liberation mono-(medium,bold)-(r,i)-normal--0-(80=90,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-m-0-*-* exact
    +#courier=-misc-liberation mono-(medium,bold)-(r,i)-normal--0-(80=90,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-m-0-*-* exact

    -helvetica=-misc-liberation sans-(medium,bold)-(r,i)-normal--0-(80,100,120,140,160=150,180,200,240,280,320,360,420,480,600,720)-75-75-p-0-*-* exact
    +#helvetica=-misc-liberation sans-(medium,bold)-(r,i)-normal--0-(80,100,120,140,160=150,180,200,240,280,320,360,420,480,600,720)-75-75-p-0-*-* exact

    # note that lists of candidate fonts may be specified as follows:

    -#courier={
    -#-misc-liberation mono-(medium,bold)-(r,i)-normal--0-(80=90,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-m-0-*-* exact
    -#-adobe-courier-(medium,bold)-(r,o)-normal--0-(80,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-*-0-*-1
    -#-monotype-arial-(medium,bold)-(r,i)-normal--*-(80,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-p-*-*-*
    -#}
    +courier={
    +-misc-liberation mono-(medium,bold)-(r,i)-normal--0-(80=90,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-m-0-*-* exact
    +-adobe-courier-(medium,bold)-(r,o)-normal--0-(80,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-*-0-*-1
    +-monotype-arial-(medium,bold)-(r,i)-normal--*-(80,100,120,140,160,180,200,240,280,320,360,420,480,600,720)-75-75-p-*-*-*
    +}

    #helvetica={
    #-misc-liberation sans-(medium,bold)-(r,i)-normal--0-(80,100,120,140,160=150,180,200,240,280,320,360,420,480,600,720)-75-75-p-0-*-* exact
    ````

    Once you have this done, and your environment setup, you can run edm with `edm`.