Run an app with its own config root

Point any standalone OctoMY app at the settings directory you want with --base-dir

Run an app with its own config root

Every standalone OctoMY app — construct, bahn, auda and singularity — keeps its settings in one directory. The --base-dir option (short form -d) tells the app which directory to use:

construct --base-dir ~/projects/kitchen-robot/construct
bahn      --base-dir ~/music/session-a

Use it in three situations. You want two independent setups of the same app. Your configuration belongs with a project, not in your home directory. Or you want to reproduce a first run exactly.

What lands in the base directory

The base directory is the root for everything the app persists:

Path Contents
<base-dir>/settings.ini All app preferences — window geometry, panel layout, last-used directories, per-app toggles.
<base-dir>/opal/… The OPAL working directory (construct).

The app creates the directory if it does not exist.

Two apps pointed at two different base directories never touch each other's state, so you can run them side by side:

construct --base-dir ~/work/scene-a &
construct --base-dir ~/work/scene-b &

A relative path is made absolute before use. --base-dir . therefore means the directory you started the app from, and it keeps that meaning for the whole run.

Where it goes if you do not say

Without --base-dir the app resolves a root for you, in this order:

  1. The directory that holds the binary — debug builds only. This keeps parallel development builds apart, so one build cannot overwrite another build's settings.
  2. The content_dir setting, if one was stored earlier.
  3. The platform application-data location — ~/.local/share/<brand>/<app>/ on Linux, %LOCALAPPDATA%\<brand>\<app>\ on Windows, and ~/Library/Application Support/<brand>/<app>/ on macOS.

A release build never picks a location from the directory you happened to launch from, and never writes settings beside your current working directory.

Get a clean first run

Point the app at an empty directory:

mkdir -p /tmp/construct-fresh
construct --base-dir /tmp/construct-fresh

Your existing construct settings move with you

The first time construct starts under a base directory, it copies your old settings into the new settings.ini. Your panel layout, your recent files and your preferences all survive.

The copy happens once. Every later start reads the new file and ignores the old one. If the new file already exists, nothing is copied.

bahn, auda and singularity do not copy anything. Each of them used to write an INI file beside its launch directory. There is therefore no single old location to copy from, and they start fresh under the new root.

Do not edit settings.ini while the app runs. The app holds the file open and overwrites your changes when it exits.

Find the directory an app is using

Start the app from a terminal. It prints one line near the start of its output:

Config root: /home/you/work/scene-a (settings: /home/you/work/scene-a/settings.ini )

That line names the directory it resolved and the settings file inside it, whether you passed --base-dir or let it choose.

Topics
howto configuration settings base-dir standalone
See also