tmux-system-service/etc/systemd/system/tmux@.service
2022-09-28 15:36:20 +02:00

26 lines
620 B
Desktop File

[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