You are not logged in.
Hello, there appears to be a small hiccup in controlling tmux's sessions via systemd services. Namely ExecStop=/usr/bin/tmux kill-session -t ts in the following example kills all tmux sessions instead of only the 'ts' session.
[ll@arch ~]$ cat /usr/lib/systemd/system/tmux.service
[Unit]
Description=Start tmux in detached session
[Service]
Type=forking
ExecStart=/usr/bin/tmux new-session -s ts -d
ExecStop=/usr/bin/tmux kill-session -t ts
User=ll
[Install]
WantedBy=multi-user.target[ll@arch ~]$ tmux ls
failed to connect to server
[ll@arch ~]$ sudo systemctl start tmux && tmux new -s manual -d && tmux ls
manual: 1 windows (created Sat Mar 16 11:45:26 2013) [104x53]
ts: 1 windows (created Sat Mar 16 11:45:26 2013) [80x23]
[ll@arch ~]$ sudo systemctl stop tmux && tmux ls
failed to connect to server
[ll@arch ~]$ Is it a bug or the service file is missing something?
Last edited by cngn (2013-03-17 11:13:16)
Offline
per systemd.kill KillMode=none is the required option, I have edited Services#tmux
Offline