chore: updated systemd user template to include display and target

pull/107/head
Sven Vowe 2022-05-28 17:41:22 +02:00
parent b8358c79ef
commit f85fc61b60
No known key found for this signature in database
GPG Key ID: 57B278B9BB832525
1 changed files with 3 additions and 1 deletions

View File

@ -12,15 +12,17 @@ template() {
local content=""
local resurrect_save_script_path="$(get_tmux_option "$resurrect_save_path_option" "$(realpath ${CURRENT_DIR}/../../../tmux-resurrect/scripts/save.sh)")"
local tmux_path="$(command -v tmux)"
local display="$DISPLAY"
read -r -d '' content <<-EOF
[Unit]
Description=tmux default session (detached)
Documentation=man:tmux(1)
After=graphical.target
[Service]
Type=forking
Environment=DISPLAY=:0
Environment=DISPLAY=${display}
ExecStart=${tmux_path} ${systemd_tmux_server_start_cmd}
ExecStop=${resurrect_save_script_path}