Add support for creating utmp records

This patch adds support for creating utmp records using the ‘utempter’
helper binary from the ‘libutempter’ package.

* New config option ‘main.utempter’
* New meson command line option, -Ddefault-utempter-path. Defaults to
  auto-detecting the path.

The default value of the new ‘main.utempter’ config option depends on
the meson command line option ‘-Ddefault-utempter-path’.

If ‘main.utempter’ is *not* set to ‘none’, foot will try to execute
the utempter helper binary to create utmp records when a new terminal
is instantiated. The record is removed when the terminal instance is
destroyed.
This commit is contained in:
Daniel Eklöf 2022-09-23 20:24:04 +02:00
parent 77b74734a4
commit aa10b1d2da
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
11 changed files with 105 additions and 11 deletions

View file

@ -458,6 +458,7 @@ test_section_main(void)
test_string(&ctx, &parse_section_main, "shell", &conf.shell);
test_string(&ctx, &parse_section_main, "term", &conf.term);
test_string(&ctx, &parse_section_main, "app-id", &conf.app_id);
test_string(&ctx, &parse_section_main, "utempter", &conf.utempter_path);
test_c32string(&ctx, &parse_section_main, "word-delimiters", &conf.word_delimiters);