remove tmux from autostart by ssh and tty2. (Its always now)

This commit is contained in:
thek4n 2024-03-27 22:33:09 +03:00
parent 4c4622a764
commit 4212284e94
2 changed files with 2 additions and 13 deletions

View File

@ -223,12 +223,8 @@ most-often-commands() {
echo "$*" | bc -l echo "$*" | bc -l
} }
# Disable tmux on remote machine
ssht() {
TERM=tmux-256color ssh $@
}
# Enable X11Forwarding and disable mux and tmux session # Enable X11Forwarding and disable mux session
sshx() { sshx() {
ssht -X -o ControlMaster=no -o ControlPath=none $@ ssh -X -o ControlMaster=no -o ControlPath=none $@
} }

View File

@ -5,11 +5,4 @@ fi
if [[ "$TTY" = "/dev/tty1" ]] && [[ $XDG_VTNR -eq 1 ]] && [[ -z $DISPLAY ]] && systemctl -q is-active graphical.target; then if [[ "$TTY" = "/dev/tty1" ]] && [[ $XDG_VTNR -eq 1 ]] && [[ -z $DISPLAY ]] && systemctl -q is-active graphical.target; then
exec startx >> ~/.xlogs 2>&1 exec startx >> ~/.xlogs 2>&1
elif [[ "$TTY" = "/dev/tty2" ]] && command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then
exec tmux new-session -s "$(basename $TTY)" -A
fi
if [[ -n "$SSH_CLIENT" ]] && command -v tmux &>/dev/null && [[ ! "$TERM" =~ tmux ]] && [[ -z "$TMUX" ]]; then
export SSH_CLIENT
exec tmux new-session -s ssh -A
fi fi