一、安装
- 添加仓库/软件源
# 如显示禁用该源,尝试直接第3步进行安装。
sudo add-apt-repository ppa:gnome-terminator
- 更新源
sudo apt update
- 安装 terminator
sudo apt install terminator
二、美化 terminator 界面
这是初始界面。
通过修改配置文件美化窗口。
在终端输入以下命令:
cd ~/.config/terminator/
sudo gedit config
注意!第一次进入~/.config/terminator/目录时,config文件是不存在的,要通过以下步骤生成config
- 在 terminator 黑色背景上右键
- 单击 Preferences (首选项)
- 选择 Profiles (布局),按照图中标记选择,default 处可以自定义名称。
4. 按照上面的步骤找到 config,进行编辑。
我的 config 内容:
[global_config]
handle_size = -3
title_transmit_fg_color = "#000000"
title_transmit_bg_color = "#3e3838"
inactive_color_offset = 1.0
enabled_plugins = CustomCommandsMenu, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
[keybindings]
split_horiz = <Primary><Shift>o
[profiles]
[[default]]
background_color = "#282828"
background_darkness = 1.0
background_type = transparent
cursor_shape = ibeam
cursor_color = "#e8e8e8"
font = Ubuntu Mono 14
foreground_color = "#e8e8e8"
show_titlebar = False
scroll_background = False
scrollback_lines = 3000
palette = "#292424:#ef2929:#8ae234:#cdcd00:#1e90ff:#cd00cd:#00cdcd:#d6d9d4:#4c4c4c:#868e09:#00ff00:#ffff00:#4682b4:#ff00ff:#00ffff:#ffffff"
use_system_font = False
[layouts]
[[default]]
[[[child1]]]
parent = window0
profile = default
type = Terminal
[[[window0]]]
parent = ""
size = 925, 570
type = Window
[plugins]
美化后的 terminator
加 title bar 版本:
[global_config]
handle_size = -3
title_hide_sizetext = True
title_transmit_fg_color = "#f3f3f3"
title_transmit_bg_color = "#4e9a06"
title_inactive_fg_color = "#babdb6"
title_inactive_bg_color = "#4b4b4b"
inactive_color_offset = 1.0
enabled_plugins = CustomCommandsMenu, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
[keybindings]
split_horiz = <Primary><Shift>o
[profiles]
[[default]]
icon_bell = False
background_color = "#282828"
background_darkness = 1.0
background_type = transparent
cursor_shape = ibeam
cursor_color = "#e8e8e8"
font = Ubuntu Mono 14
foreground_color = "#e8e8e8"
scroll_background = False
scrollback_lines = 3000
palette = "#292424:#ef2929:#8ae234:#cdcd00:#1e90ff:#cd00cd:#00cdcd:#d6d9d4:#4c4c4c:#868e09:#00ff00:#ffff00:#4682b4:#ff00ff:#00ffff:#ffffff"
use_system_font = False
[layouts]
[[default]]
[[[child1]]]
parent = window0
profile = default
type = Terminal
[[[window0]]]
parent = ""
size = 925, 570
type = Window
[plugins]
三、常用快捷键
Ctrl + Shift + O 水平分割终端(分成上下两个窗口)
Ctrl + Shift + E 垂直分割终端(分成左右两个窗口)
Ctrl + Shift + W 关闭当前终端
Ctrl + Shift + X 放大(还原)当前终端
Ctrl + Shift + G 清屏
Ctrl + Shift + Right/Left 在垂直分割的终端中将分割条向右/左移动
Ctrl + Shift + S 隐藏/显示滚动条
Ctrl + Shift + Q 关闭所有终端(退出程序)
F11 全屏
四、打不开或闪退问题
一般发生这种问题的电脑都是默认 Python3.x 版本的,而 terminator 是基于python2开发的,所以会出问题。
如下方法解决:
终端输入:
sudo gedit /usr/share/terminator/terminator
将第一行的将第一行的 #!/usr/bin/python
修改为 #!/usr/bin/python2
然后 terminator 就能打开了,亲测可用。