From 01b1af490fcf900be4614786d3a90a87a48a520f Mon Sep 17 00:00:00 2001 From: pete 'Peteches' McCabe Date: Thu, 19 May 2016 08:06:45 +0100 Subject: [PATCH 1/2] Fixed tmux-plugins/tmux-continuum#18 - created systemd user dir if it doesn't exist. --- scripts/handle_tmux_automatic_start/systemd_enable.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/handle_tmux_automatic_start/systemd_enable.sh b/scripts/handle_tmux_automatic_start/systemd_enable.sh index b68442b..cf19d50 100755 --- a/scripts/handle_tmux_automatic_start/systemd_enable.sh +++ b/scripts/handle_tmux_automatic_start/systemd_enable.sh @@ -49,6 +49,9 @@ main() { local systemd_tmux_server_start_cmd="$(get_tmux_option "${systemd_tmux_server_start_cmd_option}" "${systemd_tmux_server_start_cmd_default}" )" local tmux_start_script_path="${CURRENT_DIR}/linux_start_tmux.sh" local systemd_unit_file=$(template "${tmux_start_script_path}" "${options}") + if [[ ! -d $( dirname $systemd_unit_file_path ) ]]; then + mkdir -p $(dirname $systemd_unit_file_path) + fi echo "$systemd_unit_file" > "${systemd_unit_file_path}" enable_tmux_unit_on_boot } From d92726c937f303f46f8802adba6cdf2213af319b Mon Sep 17 00:00:00 2001 From: pete 'Peteches' McCabe Date: Thu, 19 May 2016 08:09:21 +0100 Subject: [PATCH 2/2] Fixed strange output issues with some commands - Some commands such as `ip` or `ssh-keygen -t edcsa` there would be no output - strace showed the command writing to stdout. - starting the tmux command via bash resolved the issue. --- scripts/handle_tmux_automatic_start/systemd_enable.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/handle_tmux_automatic_start/systemd_enable.sh b/scripts/handle_tmux_automatic_start/systemd_enable.sh index cf19d50..9bfeefc 100755 --- a/scripts/handle_tmux_automatic_start/systemd_enable.sh +++ b/scripts/handle_tmux_automatic_start/systemd_enable.sh @@ -19,7 +19,7 @@ template() { [Service] Type=forking Environment=DISPLAY=:0 - ExecStart=/usr/bin/tmux ${systemd_tmux_server_start_cmd} + ExecStart=/bin/bash -c /usr/bin/tmux ${systemd_tmux_server_start_cmd} ExecStop=${HOME}/.tmux/plugins/tmux-resurrect/scripts/save.sh ExecStop=/usr/bin/tmux kill-server