kovidgoyal/kitty · warning · SystemExit
Unknown action: {action}
Error message
Unknown action: {action} What it means
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.
Source
Thrown at kittens/choose_fonts/backend.py:229
def main() -> None:
setup_debug_print()
cache: dict[FaceKey, RenderedSampleTransmit] = {}
for line in sys.stdin.buffer:
cmd = json.loads(line)
action = cmd.get('action', '')
if action == 'list_monospaced_fonts':
opts = create_default_opts()
send_to_kitten({'fonts': create_family_groups(), 'resolved_faces': resolved_faces(opts)})
elif action == 'read_variable_data':
ans = []
for descriptor in cmd['descriptors']:
ans.append(get_variable_data_for_descriptor(descriptor))
send_to_kitten(ans)
elif action == 'render_family_samples':
opts, family_key, dpi_x, dpi_y = opts_from_cmd(cmd)
send_to_kitten(render_family_sample(opts, family_key, dpi_x, dpi_y, cmd['width'], cmd['height'], cmd['output_dir'], cache))
else:
raise SystemExit(f'Unknown action: {action}')
def query_kitty() -> dict[str, str]:
import subprocess
ans = {}
for line in subprocess.check_output([kitten_exe(), 'query-terminal']).decode().splitlines():
k, sep, v = line.partition(':')
if sep == ':':
ans[k] = v.strip()
return ans
def showcase(family: str = 'family="Fira Code"', sample_text: str = '') -> None:
q = query_kitty()
opts = Options()
opts.foreground = to_color(q['foreground'])
opts.background = to_color(q['background'])View on GitHub (pinned to 6d5d0c4406)
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.
Example fix
# before: launched kitty via ssh without user bus # after export XDG_RUNTIME_DIR=/run/user/$(id -u) loginctl enable-linger $USER # then re-login
Defensive patterns
Strategy: fallback
Validate before calling
test -S "$XDG_RUNTIME_DIR/bus" && echo user-bus-ok || echo no-user-bus
Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- This must be run as kitten choose-files
- Pipe to kitten was broken while sending data to it
- {val} is not a valid layout
- Unknown command in session file: {cmd}
- failed to export interface: %s at object path: %s with error
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/1a05cf002c69aee4.
Report an issue: GitHub.