Tmux systemd service
This commit is contained in:
parent
09813e83f3
commit
52f66b5de1
2 changed files with 23 additions and 1 deletions
|
|
@ -1,8 +1,15 @@
|
|||
#!/bin/bash
|
||||
#tmux start-server;
|
||||
tmux start-server;
|
||||
tmux new-session -d -s Main;
|
||||
tmux new-window -t Main;
|
||||
tmux new-window -t Main;
|
||||
tmux new-window -t Main;
|
||||
tmux new-window -t Main;
|
||||
tmux new-window -t Main;
|
||||
tmux new-session -d -s Development;
|
||||
tmux new-window -t Development;
|
||||
tmux new-window -t Development;
|
||||
tmux new-window -t Development;
|
||||
tmux new-window -t Development;
|
||||
tmux new-window -t Development;
|
||||
tmux new-window -t Development;
|
||||
|
|
|
|||
15
systemd/tmux@.service
Normal file
15
systemd/tmux@.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Start tmux in detached session
|
||||
After=ssh.service
|
||||
|
||||
[Service]
|
||||
User=%I
|
||||
Environment=DISPLAY=:0
|
||||
Environment=XAUTHORITY=/tmp/xauth-1000-_0
|
||||
WorkingDirectory=/home/%I
|
||||
ExecStart=/bin/bash /home/%I/.bin/tmux_start
|
||||
RemainAfterExit=True
|
||||
Type=oneshot
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue