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.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index 6d03f8fb..78d52764 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -25,7 +25,7 @@ t: run application in a new terminal window
 import os
 import sys
 from subprocess import Popen, PIPE
-from ranger.ext.get_executables import get_executables
+from ranger.ext.get_executables import get_executables, get_term
 from ranger.ext.popen_forked import Popen_forked
 
 
@@ -194,11 +194,7 @@ 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.get('TERMCMD', os.environ.get('TERM'))
-            if term not in get_executables():
-                term = 'x-terminal-emulator'
-            if term not in get_executables():
-                term = 'xterm'
+            term = get_term()
             if isinstance(action, str):
                 action = term + ' -e ' + action
             else:
11'>11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84