Terminal: Disable terminal detection if device is connected over SSH

This commit is contained in:
Muhammad Herdiansyah 2017-06-02 19:22:51 +07:00
parent 56fa0a566e
commit 6762381a82
1 changed files with 13 additions and 9 deletions

View File

@ -1648,6 +1648,9 @@ get_term() {
# Check $PPID for terminal emulator.
while [[ -z "$term" ]]; do
if [[ "$SSH_CONNECTION" ]]; then
term="$SSH_TTY"
else
parent="$(get_ppid "$parent")"
name="$(get_process_name "$parent")"
case "${name// }" in
@ -1657,6 +1660,7 @@ get_term() {
"gnome-terminal-") term="gnome-terminal" ;;
*) term="${name##*/}" ;;
esac
fi
done
# Log that the function was run.