Gnome-Terminator
終結器窗格自動連接到不同的伺服器
幾週前我想出瞭如何使用自定義佈局啟動終結器,而不是手動創建它(通過使用
terminator -l
)。現在我想啟動終結器並讓我的自定義佈局的每個窗格自動連接到遠端伺服器(不幸的是我必須管理多個伺服器)。有沒有辦法或任何腳本支持/語言來做到這一點?
我的終結器配置如下所示:
[profiles] [[default]] # some settings [[root]] # some colour settings use_custom_command = True custom_command = sudo -i exit_action = restart [[lab]] # some more colour settings use_custom_command = True custom_command = ssh -R 2022:localhost:22 lab exit_action = restart [[server]] # some more colour settings use_custom_command = True custom_command = ssh server exit_action = restart [layouts] [[default]] [[[child0]]] type = Window order = 0 parent = "" [[[child1]]] labels = None, None, None, None type = Notebook order = 0 parent = child0 [[[terminal1]]] profile = root type = Terminal order = 0 parent = child1 [[[terminal2]]] profile = lab type = Terminal order = 1 parent = child1 [[[terminal3]]] profile = server type = Terminal order = 2 parent = child1 [[[terminal4]]] profile = default type = Terminal order = 3 parent = child1
通過將配置文件與 結合起來
custom_command
,我在啟動時獲得了四個選項卡,一個帶有根 shell,兩個打開的 ssh 連接和第四個正在執行的普通 shell。這些選項記錄在
terminator_config(5)
手冊頁中