summary refs log tree commit diff stats
path: root/ranger/core/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/core/runner.py')
-rw-r--r--ranger/core/runner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index ba6d82a8..17cdcca5 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -204,7 +204,9 @@ class Runner(object):
 		if 't' in context.flags:
 			if 'DISPLAY' not in os.environ:
 				return self._log("Can not run with 't' flag, no display found!")
-			term = os.environ['TERMCMD'] if 'TERMCMD' in os.environ  else os.environ['TERM']
+			term = os.environ.get('TERMCMD', os.environ.get('TERM'))
+			if term not in get_executables():
+				term = 'x-terminal-emulator'
 			if term not in get_executables():
 				term = 'xterm'
 			if isinstance(action, str):