kovidgoyal/kitty · warning · SystemExit

This must be run as kitten choose-files

Error message

This must be run as kitten choose-files

What it means

While dynamically loading libsystemd via dlsym in kitty's systemd integration (kitty/systemd.c LOAD_FUNC macro), a symbol such as sd_bus_default_user could not be resolved. kitty loads systemd functions at runtime so it can run on systems without systemd; failure means the installed libsystemd is missing expected symbols.

Source

Thrown at kittens/choose_files/main.py:237

map('Change to root directory', 'cd_root ctrl+/ cd /')
map('Change to home directory', 'cd_home ctrl+~ cd ~')
map('Change to home directory', 'cd_home ctrl+` cd ~')
map('Change to home directory', 'cd_home ctrl+shift+` cd ~')
map('Change to temp directory', 'cd_tmp --allow-fallback=shifted,ascii ctrl+t cd /tmp')

map('Next filter', 'next_filter --allow-fallback=shifted,ascii ctrl+f 1')
map('Previous filter', 'prev_filter --allow-fallback=shifted,ascii alt+f -1')

map('Toggle showing dotfiles', 'toggle_dotfiles --allow-fallback=shifted,ascii alt+h toggle dotfiles')
map('Toggle showing ignored files', 'toggle_ignorefiles --allow-fallback=shifted,ascii alt+i toggle ignorefiles')
map('Toggle sorting by dates', 'toggle_sort_by_dates --allow-fallback=shifted,ascii alt+d toggle sort_by_dates')
map('Toggle showing preview', 'toggle_preview --allow-fallback=shifted,ascii alt+p toggle preview')

egr()  # }}}


def main(args: list[str]) -> None:
    raise SystemExit('This must be run as kitten choose-files')


def relative_path_if_possible(path: str, base: str) -> str:
    if not base or not path:
        return path
    from contextlib import suppress
    from pathlib import Path

    b = Path(base)
    q = Path(path)
    with suppress(ValueError):
        return str(q.relative_to(b))
    return path


def format_selection_for_paste(paths: list[str], cwd: str | None, at_prompt: bool) -> str:
    items = []
    for path in paths:

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Update systemd/libsystemd to a current version (>= 230).
  2. On Alpine/musl, install the real apsd/dbus-broker-providing package or accept that systemd integration is disabled (the log is harmless).
  3. If in a container/Flatpak, ensure the runtime ships a complete libsystemd.
  4. Ignore the message if you don't use kitty's systemd notification integration - kitty continues without it.
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: kitty startup on Linux with dbus/desktop notification integration enabled; dlopen succeeded for a libsystemd shared object but dlsym returned NULL for one of the sd_* functions (sd_bus_default_user, sd_bus_call, sd_pid_get_user_slice, etc.) and dlerror() reported the missing symbol.

Common situations: Very old or stub libsystemd (e.g. musl/Alpine compatibility packages, chroots, Flatpak/sandbox runtimes shipping a partial libsystemd), or a systemd version older than the functions kitty uses (sd_pid_get_user_slice needs systemd >= 230).

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/094ebe55df1f8fd4. Report an issue: GitHub.