AMIDIMINDER-DAEMON(8)       System Manager's Manual      AMIDIMINDER-DAEMON(8)



NAME
       midiminder-daemon - MIDI device connection daemon


SYNOPSIS
       midiminder [-v|-q] daemon [-p]


DESCRIPTION
       The  midiminder daemon maintains a set of desired connections (the pro‐
       file) between ALSA sequencer MIDI ports.

       ALSA provides library calls, and a user tool aconnect(1) for connecting
       pairs of ports.  However, these connections are lost when either of the
       member of the pair disappears, such as if a MIDI device  is  unplugged,
       or  an application with ports exits. Restoring the port doesn't restore
       the prior connections it had. As MIDI gear is often  inadvertently  un‐
       plugged  and  replugged, or power cycled, losing these connections is a
       significant frustration.

       The midiminder daemon takes care of this: It  tracks  what  connections
       were  desired between ports, and automatically reestablishes those con‐
       nections when ports reattach to the system. Connections (and disconnec‐
       tions)  initiated  by the user (or applications) are tracked and remem‐
       bered as well. The whole desired connection state is  persistent,  even
       across  system reboots, so that the configuration is quickly maintained
       once devices power back up and applications restarted.

   State
       The desired connection state is composed of two parts:

       Profile rules
              The profile is a list of rules for which ports to connect. It is
              written  in  a  simple  syntax that makes it possible to express
              these connections, even when the  devices  aren't  current  con‐
              nected.  The  commands  in midiminder(1) are used by the user to
              load, save, and reset the profile. The user  can  have  multiple
              profile files prepared, and by loading them, reconfigure all the
              connections with one command.

       Observed rules
              These are a set of rules the daemon learns by observing  connec‐
              tions  made  by the user via commands such as aconnect(1) and by
              other software. These rules are considered to override any  pro‐
              file rules, should they conflict.  This allows a change from the
              current profile to be just as robust as the profile itself.  The
              user  can also easily drop the observed rules by loading another
              profile, or using the midiminder reset command.

       Both parts of the connection state are persisted into the  file  system
       so that they survive restarts of the daemon, or the whole system.


OPTIONS
       -v, --verbose
              Increases  output message verbosity. Can be applied twice, which
              increase output to debugging level.

       -q, --quiet
              Suppress all output except errors, and basic logging to know the
              daemon is running.

       -p, --port-details
              Causes  output of all ALSA sequencer port information when ports
              are added or re-scanned by the daemon. This information is  pri‐
              marily for understanding how a piece of hardware is representing
              itself to the ALSA sequencer.



ENVIRONMENT
       These variables are normally set by systemd(8) before it  launches  the
       daemon.


       STATE_DIRECTORY
              The  path to the directory that the daemon uses to hold a copies
              of both the profile rules and the observed rules. This directory
              should  not  be  on  a temporary file system so that the desired
              connection state survives reboots.


       RUNTIME_DIRECTORY
              The path to the directory that has the UNIX-domain  socket  used
              to communicate between the control commands and the running dae‐
              mon.

              Note: If the system configuration is changed such that the midi‐
              minder  daemon  is  launched  with  a non-default value for this
              variable, it must also be set the same way when using any of the
              control commands.


FILES
       /var/lib/midiminder
              The default location of the state directory.


       /run/midiminder
              The default location of the runtime directory.


       profile.rules
              The  current,  loaded profile rules. Located in the state direc‐
              tory.


       observed.rules
              The observed rules. Located in the state directory.


       control.socket
              A UNIX-domain socket, located in the runtime  directory.  It  is
              used to communicate between the control commands and the daemon.


SEE ALSO
       midiminder(1), midiminder-profile(5)




                                                         AMIDIMINDER-DAEMON(8)
