From 046c19b6fca6c30bd632817fd4f06f365dc90d96 Mon Sep 17 00:00:00 2001 From: Adam Schmalhofer Date: Mon, 11 Nov 2024 22:06:47 +0100 Subject: [PATCH 1/2] Howto prevent systemd from killing zellij on logoff Fixes: https://github.com/zellij-org/zellij/issues/3531 --- docs/src/integration.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/src/integration.md b/docs/src/integration.md index c716814d..cb08df77 100644 --- a/docs/src/integration.md +++ b/docs/src/integration.md @@ -61,6 +61,21 @@ The following environment variables can also be used in the provided script. | `ZELLIJ_AUTO_ATTACH` | If the zellij session already exists, attach to the default session. (not starting as a new session) | false | | `ZELLIJ_AUTO_EXIT` | When zellij exits, the shell exits as well. | false | +## Keep session running after logout on systemd + +Systemd ensures that no processes are accidentally left running after logouts. +One common use case for zellij (and other terminal multiplexers) is to run +processes after logging out and reconnect after logging in later possibly +switching between local and remote (ssh) logins. To achieve this let systemd-bin +run zellij from outside of the session scope with: + +``` +systemd-bin --scope --user zellij +``` + +For more information see example 5 in [systemd-run's man page](https:// +www.freedesktop.org/software/systemd/man/latest/systemd-run.html). + ## List current sessions List current sessions, attach to a running session, or create a new one. Depends on [`sk`](https://github.com/lotabout/skim) & `bash` From 34e9f4cc33649e043bf2e1f6b035fa824d69e9cf Mon Sep 17 00:00:00 2001 From: Adam Schmalhofer Date: Thu, 21 Nov 2024 18:04:19 +0100 Subject: [PATCH 2/2] Fix: wrong binary name Thanks: chubi-x --- docs/src/integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/integration.md b/docs/src/integration.md index cb08df77..c19815e8 100644 --- a/docs/src/integration.md +++ b/docs/src/integration.md @@ -66,11 +66,11 @@ The following environment variables can also be used in the provided script. Systemd ensures that no processes are accidentally left running after logouts. One common use case for zellij (and other terminal multiplexers) is to run processes after logging out and reconnect after logging in later possibly -switching between local and remote (ssh) logins. To achieve this let systemd-bin +switching between local and remote (ssh) logins. To achieve this let systemd-run run zellij from outside of the session scope with: ``` -systemd-bin --scope --user zellij +systemd-run --scope --user zellij ``` For more information see example 5 in [systemd-run's man page](https://