From dad7089d105ba6253c751b0f8bc4a12646a75f2b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 16 Oct 2026 17:21:40 +0530 Subject: [PATCH] make a note that saved session data can be read by any process that runs as the user --- docs/sessions.rst | 3 ++- kitty/options/definition.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/sessions.rst b/docs/sessions.rst index c27113be1..959ea37cb 100644 --- a/docs/sessions.rst +++ b/docs/sessions.rst @@ -290,7 +290,8 @@ not started again, since they could have been run for their effects, like The saved state, which includes the scrollback and the environment variables of every kitty instance, is encrypted, with a separate random key for every -kitty instance, stored in your login keychain. The keys are deleted when the +kitty instance, stored in your login keychain. Note that despite the encryption +any process that runs as you can read the saved session data. The keys are deleted when the state is restored, so any copies of it left on disk or in backups cannot be read. kitty never shows any keychain prompts for this. If the keychain needs user interaction, the state is not saved or not restored. This happens if: diff --git a/kitty/options/definition.py b/kitty/options/definition.py index cfcf3e690..4010fd16a 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -3183,8 +3183,9 @@ If several kitty instances were running, each is restored as a separate kitty in command line arguments and environment it originally had. Programs that were running in windows, other than the shell, are not started again. The saved session is used only once, and only when kitty is started without :option:`kitty --session` or a command to run. The saved state is encrypted, -with a key stored in your login keychain, and is deleted once it has been restored. Currently, this -works only on macOS. +with a key stored in your login keychain, and is deleted once it has been restored. Note that +despite the encryption any process that runs as you can access the stored session data. +Currently, this works only on macOS. See :ref:`restore_after_logout` for details. """, )