zellij
zellij copied to clipboard
Unable to start server in a systemd service (ENOTTY: Not a typewriter)
Basic information
zellij --version: 0.36.0
stty size: 86 319
uname -av or ver(Windows): Linux hmbx 6.3.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 21 May 2023 16:15:22 +0000 x86_64 GNU/Linux
List of programs you interact with as, PROGRAM --version: output cropped meaningful, for example:
systemctl --version: systemd 253 (253.4-1-arch) +PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified
Further information
Using the following systemd user unit (e.g. as ~/.config/systemd/user/zellij.service)
[Unit]
Description=Zellij default session
After=local-fs.target
ConditionFileIsExecutable=/usr/bin/zellij
[Service]
Type=forking
ExecStart=/usr/bin/zellij --session default --server=$XDG_RUNTIME_DIR/zellij/default --debug
[Install]
WantedBy=default.target
and starting it (using systemctl --user start zellij) one gets:
failed to open terminal:
ENOTTY: Not a typewriter
Hello,
unfortunately, running zellij as server directly is not supported so right now your on your own. This also applies to #2475 and #2476. Running zellij as server directly is something that is related to #1062 (created by me :)) and as far as I know, not implemented at the moment.
A quick and dirty workaround I found for creating a zellij session in the background, through e.g. a systemd service is to run it through script and immediately detach it.
References:
- https://stackoverflow.com/a/32981392/1831096
- https://stackoverflow.com/a/1402389/1831096