Commit graph

3 commits

Author SHA1 Message Date
Andrea Pappacoda
e2d67af8ed
fix(systemd): always use socket activation
foot --server supports socket activation when managed by systemd or s6,
so remove the Install section from the .service unit to make systemd
always use socket activation for the service.

Also mention in the foot(1) manpage how to easily enable the
systemd-managed foot server.

See <https://codeberg.org/dnkl/foot/pulls/1110#issuecomment-661389>
2022-10-28 21:47:22 +02:00
Max Gautier
ffdac61e2a
server: Use "normal" socket activation, not inetd
Systemd, when doing socket activation, pass file descriptors in a
non-stable order when there is multiples ones.

But we only use one, so we don't need to identify it, and the file
descriptors always start at 3.
So use 3 for the systemd service.

Source : sd_listen_fds (systemd man pages)

We also need to unset variables systemd pass to socket activated
process, since we don't need them and sub-process (footclient and
theirs forks) could be confused by those.

Closes #1107
2022-07-30 15:13:56 +02:00
Max Gautier
1783f69cbd Adding systemd unit files for socket activation
- Support for multiples concurrent instances, templated on
  WAYLAND_DISPLAY
- Use standard input for the socket file descriptor (inetd style)
- Always use the socket provided by systemd with the systemd user
  service
- wayland-instance@.target is intended to be a special target a bit like
  graphical-session.target.
2022-02-26 16:09:30 +01:00