diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -28,15 +28,21 @@ For a quick manual run (e.g. while developing): $ rebar3 shell --eval "application:ensure_all_started(xdg_pipe_menu)." -To have it start automatically with your session, add a systemd -user unit, e.g. `~/.config/systemd/user/xdg-pipe-menu.service`: +To run it as a service, build a production release (a self-contained +directory with its own copy of the Erlang runtime): + + $ rebar3 as prod release + +This produces `_build/prod/rel/xdg_pipe_menu`. Re-run the command +after pulling changes, then restart the service. To start it with +your session, add a systemd user unit, e.g. +`~/.config/systemd/user/xdg-pipe-menu.service`: [Unit] Description=XDG pipe menu daemon [Service] - WorkingDirectory=/path/to/xdg-pipe-menu - ExecStart=/usr/bin/rebar3 shell --eval "application:ensure_all_started(xdg_pipe_menu)." + ExecStart=/path/to/xdg-pipe-menu/_build/prod/rel/xdg_pipe_menu/bin/xdg_pipe_menu foreground Restart=on-failure [Install] @@ -44,6 +50,14 @@ user unit, e.g. `~/.config/systemd/user/xdg-pipe-menu.service`: then enable it with `systemctl --user enable --now xdg-pipe-menu`. +The running node is named `xdg_pipe_menu@localhost` and only accepts +Erlang distribution connections from localhost, using the cookie in +`~/.erlang.cookie` (see `config/vm.args`). That lets you manage it with +the release script: + + $ _build/prod/rel/xdg_pipe_menu/bin/xdg_pipe_menu ping + $ _build/prod/rel/xdg_pipe_menu/bin/xdg_pipe_menu remote_console + Openbox itself doesn't talk to the socket directly -- it invokes `bin/xdg_pipe_menu_menu` as the pipe menu command, which connects to the daemon's socket and prints whatever comes back (or, if the |
