From aeee1ec852141ebd07d304f817fb88886b1ab2f6 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 20 Mar 2015 03:33:47 +0100 Subject: tmux.service: Adding a tmux systemd --user file that will launch a named tmux user session to attach to within a separate TMUX_TMPDIR set to the user's run directory. --- user/tmux.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 user/tmux.service (limited to 'user') diff --git a/user/tmux.service b/user/tmux.service new file mode 100644 index 0000000..089e759 --- /dev/null +++ b/user/tmux.service @@ -0,0 +1,14 @@ +[Unit] +Description=Start tmux in detached session +After=network.target local-fs.target +ConditionFileIsExecutable=/usr/bin/tmux + +[Service] +Type=forking +KillMode=control-group +Environment=TMUX_TMPDIR=/run/user/%U/tmux +ExecStart=/usr/bin/tmux new-session -s user -d +ExecStop=/usr/bin/tmux kill-session -t user + +[Install] +WantedBy=default.target -- cgit v1.2.3-70-g09d2