Support custom TERM and COLORTERM env vars. Patch from John Feuerstein. Closes LP#794561

This commit is contained in:
Chris Jones 2012-10-18 20:51:39 -07:00
parent d1835cecf1
commit 4516d991a5
3 changed files with 14 additions and 2 deletions

View File

@ -382,6 +382,14 @@ Default value: \fBblock\fR
Sets what type of terminal should be emulated. Sets what type of terminal should be emulated.
Default value: \fBxterm\fR Default value: \fBxterm\fR
.TP .TP
.B xterm
This translates into the value that will be set for TERM in the environment of your terminals.
Default value: \fBxterm\fR
.TP
.B colorterm
This translates into the value that will be set for COLORTERM in the environment of your terminals.
Default value: \fBgnome-terminal\fR
.TP
.B use_system_font .B use_system_font
Whether or not to use the GNOME default monospace font for terminals. Whether or not to use the GNOME default monospace font for terminals.
Default value: \fBTrue\fR Default value: \fBTrue\fR

View File

@ -186,6 +186,8 @@ DEFAULTS = {
'cursor_shape' : 'block', 'cursor_shape' : 'block',
'cursor_color' : '#aaaaaa', 'cursor_color' : '#aaaaaa',
'emulation' : 'xterm', 'emulation' : 'xterm',
'term' : 'xterm',
'colorterm' : 'gnome-terminal',
'font' : 'Mono 10', 'font' : 'Mono 10',
'foreground_color' : '#aaaaaa', 'foreground_color' : '#aaaaaa',
'show_titlebar' : True, 'show_titlebar' : True,

View File

@ -164,8 +164,8 @@ class Terminal(gtk.VBox):
self.connect_signals() self.connect_signals()
os.putenv('TERM', 'xterm') os.putenv('TERM', self.config['term'])
os.putenv('COLORTERM', 'gnome-terminal') os.putenv('COLORTERM', self.config['colorterm'])
env_proxy = os.getenv('http_proxy') env_proxy = os.getenv('http_proxy')
if not env_proxy: if not env_proxy:
@ -1278,6 +1278,8 @@ class Terminal(gtk.VBox):
pass pass
envv = [] envv = []
envv.append('TERM=%s' % self.config['term'])
envv.append('COLORTERM=%s' % self.config['colorterm'])
envv.append('TERMINATOR_UUID=%s' % self.uuid.urn) envv.append('TERMINATOR_UUID=%s' % self.uuid.urn)
if self.terminator.dbus_name: if self.terminator.dbus_name:
envv.append('TERMINATOR_DBUS_NAME=%s' % self.terminator.dbus_name) envv.append('TERMINATOR_DBUS_NAME=%s' % self.terminator.dbus_name)