Commit ab1e05ad authored by Herdiansyah's avatar Herdiansyah Committed by GitHub

Merge pull request #740 from konimex/ssh

Terminal: Disable terminal detection if device is connected over SSH
parents 56fa0a56 b355096f
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)** - Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** - [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
- Use `$SSH_TTY` for terminal detection if machine is connected via SSH.
**GPU** **GPU**
......
...@@ -1648,6 +1648,9 @@ get_term() { ...@@ -1648,6 +1648,9 @@ get_term() {
# Check $PPID for terminal emulator. # Check $PPID for terminal emulator.
while [[ -z "$term" ]]; do while [[ -z "$term" ]]; do
if [[ "$SSH_CONNECTION" ]]; then
term="$SSH_TTY"
else
parent="$(get_ppid "$parent")" parent="$(get_ppid "$parent")"
name="$(get_process_name "$parent")" name="$(get_process_name "$parent")"
case "${name// }" in case "${name// }" in
...@@ -1657,6 +1660,7 @@ get_term() { ...@@ -1657,6 +1660,7 @@ get_term() {
"gnome-terminal-") term="gnome-terminal" ;; "gnome-terminal-") term="gnome-terminal" ;;
*) term="${name##*/}" ;; *) term="${name##*/}" ;;
esac esac
fi
done done
# Log that the function was run. # Log that the function was run.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment