{"record":{"id":"1a05cf002c69aee4","repo":"kovidgoyal/kitty","slug":"unknown-action-action","errorCode":null,"errorMessage":"Unknown action: {action}","messagePattern":"Unknown action: (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"warning","filePath":"kittens/choose_fonts/backend.py","lineNumber":229,"sourceCode":"def main() -> None:\n    setup_debug_print()\n    cache: dict[FaceKey, RenderedSampleTransmit] = {}\n    for line in sys.stdin.buffer:\n        cmd = json.loads(line)\n        action = cmd.get('action', '')\n        if action == 'list_monospaced_fonts':\n            opts = create_default_opts()\n            send_to_kitten({'fonts': create_family_groups(), 'resolved_faces': resolved_faces(opts)})\n        elif action == 'read_variable_data':\n            ans = []\n            for descriptor in cmd['descriptors']:\n                ans.append(get_variable_data_for_descriptor(descriptor))\n            send_to_kitten(ans)\n        elif action == 'render_family_samples':\n            opts, family_key, dpi_x, dpi_y = opts_from_cmd(cmd)\n            send_to_kitten(render_family_sample(opts, family_key, dpi_x, dpi_y, cmd['width'], cmd['height'], cmd['output_dir'], cache))\n        else:\n            raise SystemExit(f'Unknown action: {action}')\n\n\ndef query_kitty() -> dict[str, str]:\n    import subprocess\n\n    ans = {}\n    for line in subprocess.check_output([kitten_exe(), 'query-terminal']).decode().splitlines():\n        k, sep, v = line.partition(':')\n        if sep == ':':\n            ans[k] = v.strip()\n    return ans\n\n\ndef showcase(family: str = 'family=\"Fira Code\"', sample_text: str = '') -> None:\n    q = query_kitty()\n    opts = Options()\n    opts.foreground = to_color(q['foreground'])\n    opts.background = to_color(q['background'])","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/choose_fonts/backend.py#L211-L247","documentation":"After successfully loading libsystemd, sd_bus_default_user() failed to connect to the systemd user bus (kitty/systemd.c:91). The negative return is a -errno style code converted via strerror. kitty's systemd integration (used for scoped notifications) is disabled for the session.","triggerScenarios":"kitty startup when the user session has no user bus: XDG_RUNTIME_DIR not set, /run/user/$UID not mounted, running outside a systemd user session (plain startx, some SSH or container setups), or DBUS_SESSION_BUS_ADDRESS pointing somewhere invalid.","commonSituations":"Starting kitty from a non-systemd session (cv/lightdm without user lingering), inside containers, over SSH without a user bus, or after systemd --user crashed.","solutions":["Verify XDG_RUNTIME_DIR is set and /run/user/$(id -u)/bus exists.","Ensure the systemd user session is running: systemctl --user status; if dead, restart login session or enable lingering: loginctl enable-linger $USER.","Check DBUS_SESSION_BUS_ADDRESS is unset or valid for the user bus.","If you don't need systemd notifications, ignore the message."],"exampleFix":"# before: launched kitty via ssh without user bus\n# after\nexport XDG_RUNTIME_DIR=/run/user/$(id -u)\nloginctl enable-linger $USER  # then re-login","handlingStrategy":"fallback","validationCode":"test -S \"$XDG_RUNTIME_DIR/bus\" && echo user-bus-ok || echo no-user-bus","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure a systemd user session exists (loginctl show-user $USER).","Set XDG_RUNTIME_DIR correctly in custom launch scripts.","Treat missing user bus as non-fatal; kitty degrades gracefully."],"tags":["kitty","systemd","dbus","user-bus","session"],"backgroundTag":"dbus-connection-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}