Terminator 介紹
Ubuntu 中默認使用的 shell 終端工具是 gnome-terminal,雖然它已經很好用了,但有時還是無法滿足我們程序員各種各樣的需求,例如在同一個窗口中啟動多個終端!
但是!Terminator 就可以完美地實現了在 Ubuntu在同一窗口中啟動多個終端,並且可以自由的在一個窗口中分割區域建立新終端,還可以通過鼠標拉伸調整每個終端的大小。
效果圖如下:

Terminator 安裝
Terminator 的安裝非常方便,在 Ubuntu 中只需要用 apt 的包管理工具就能輕松地進行安裝:
$ sudo apt-get install terminator
Terminator 美化
Terminator 默認的配色和界面是非常非常不好看的,它默認的標題欄是紅色的,就是下面這種很難看的樣子:

但是經過我配色后的樣子就是本文第一幅圖片時的哪種樣子。
雖然它的功能是如此強大,但是還好我們可以對 Terminator 的外觀進行配置,我們可以自己自由地進行字體、背景等設置,下面就是我 Ubuntu 14.04 上 Terminator 的配置文件:
有關 terminator 的配置選項可以通過 man terminator_config 命令進行查閱:
[global_config]
title_transmit_bg_color = "#d30102"
focus = system
suppress_multiple_term_dialog = True
[keybindings]
[profiles]
[[default]]
palette = "#2d2d2d:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#d3d0c8:#747369:#f2777a:#99cc99:#ffcc66:#6699cc:#cc99cc:#66cccc:#f2f0ec"
background_color = "#2D2D2D" # 背景顏色
background_image = None
background_darkness = 0.85
cursor_color = "#FFFFFF" # 光標顏色
cursor_blink = True # 光標是否閃爍
foreground_color = "#EEE9E9" # 文字的顏色
use_system_font = False # 是否啟用系統字體
font = Ubuntu Mono 13 # 字體設置,后面的數字表示字體大小
copy_on_selection = True # 選擇文本時同時將數據拷貝到剪切板中
show_titlebar = False # 不顯示標題欄,也就是 terminator 中那個默認的紅色的標題欄
[layouts]
[[default]]
[[[child1]]]
type = Terminal
parent = window0
profile = default
[[[window0]]]
type = Window
parent = ""
[plugins]
Terminator 常用快捷鍵
命令 | 說明 |
---|---|
Ctrl+Shift+O | 水平分割窗口 |
Ctrl+Shift+E | 垂直分割窗口 |
F11 | 全屏/退出全屏 |
Ctrl+Shift+C | 復制 |
Ctrl+Shift+V | 粘貼 |
Ctrl+Tab | 在分割的各窗口之間切換 |
Ctrl+Shift+X | 將分割的某一個窗口放大至全屏使用 |
Ctrl+Shift+Z | 從放大至全屏的某一窗口回到多窗格界面 |
更改 Ubuntu 默認終端工具
我們前面說到過,在 Ubuntu 系統中默認使用的終端工具是 gnome-terminal,而當我們安裝完 Terminator 之后,Ubuntu 系統中默認采用的終端工具就變成了 Terminator,所以如果我們想重新把 gnome-terminal 作為默認的終端工具該怎么辦呢?
修改 Ubuntu 默認使用的終端工具,我們就得借助於 dconf-tools 工具來進行重新設置。
首先,還是使用 apt 來安裝 dconf-tools:
$ sudo apt-get install dconf-tools
安裝成功后,就可以在終端中通過命令 “dconf-editor” 來打開這個工具,然后從左邊的的菜單欄中按照下面的步驟依次進入指定的菜單項:
org > gnome > desktop > applications > terminal
此時,我們可以看到使用 Terminator 作為默認終端工具的配置為:
exec x-terminal-emulator
exec-arg -e
如果想使用 gnome-terminal 為默認終端工具的話,就將上面的配置更改為:
exec gnome-terminal
exec-arg -x
保存退出之后,使用快捷鍵 “Ctrl + Alt + T” 啟動一個終端時,這時啟動起來的就是 gnome-terminal 工具了!