[Unit] Description=tmux default session (detached) for user %i Documentation=man:tmux(1) BindsTo=multiplexer.target After=sssd.service [Service] #Type=simple Type=forking User=%i WorkingDirectory=/home/%i ExecStartPre=-/usr/bin/xdg-user-dirs-update #RemainAfterExit=yes # On older tmux-versions session-names with dot in name are not allwed, so replace "-s %I" with "-s User" ExecStart=/usr/bin/tmux new-session -d -s User #ExecStart=/usr/bin/tmux new-session ExecStop=-/usr/bin/tmux kill-server KillMode=mixed #Restart=on-success Restart=always RestartSec=3s GuessMainPID=true [Install] WantedBy=multiplexer.target