From 90b9522b15a692532d9b3f28acc417670144e3fa Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 21 Sep 2021 10:56:14 +0300 Subject: feat(rpi): separate display and master sessions --- raspberry/.zlogin | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'raspberry/.zlogin') diff --git a/raspberry/.zlogin b/raspberry/.zlogin index 227f78e..729b420 100644 --- a/raspberry/.zlogin +++ b/raspberry/.zlogin @@ -1 +1,8 @@ -[ -z "$TMUX" ] && tmux attach -t default || tmuxinator start default +if [ -n "$SSH_CONNECTION" ]; then + # If we are logged in via SSH, automatically attach to master session + [ -z "$TMUX" ] && (tmux attach -t master || tmux new -s master) +else + # If we are logged in directly (not via SSH) + # create the session which will be displayed on TV + tmuxinator start display +fi -- cgit v1.2.3