From f85fc61b60ce5eb5de6f10d48ab98e2cfacfd21a Mon Sep 17 00:00:00 2001 From: Sven Vowe Date: Sat, 28 May 2022 17:41:22 +0200 Subject: [PATCH] chore: updated systemd user template to include display and target --- scripts/handle_tmux_automatic_start/systemd_enable.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/handle_tmux_automatic_start/systemd_enable.sh b/scripts/handle_tmux_automatic_start/systemd_enable.sh index 77e24eb..b198677 100755 --- a/scripts/handle_tmux_automatic_start/systemd_enable.sh +++ b/scripts/handle_tmux_automatic_start/systemd_enable.sh @@ -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}