DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Multiple terminals operation on Windows and Ubuntu


基于多Tab页的Terminal工作环境

Tmux可以很好的解决一台主机上的多任务并行问题,但如果需要同时在本机和远程主机上工作, 而且这两台主机上都需要运行Tmux,就会出现Tmux的嵌套问题。 这时可以同时运行多个Terminal App,但切换时容易混淆, 更好的方法是在一个Terminal App里创建多个标签页,每个标签页对应一台主机。 Ubuntu预装的Gnome Terminal不支持自定义快捷键,下面基于Terminator实现多标签页, 假设远程主机名为alpha.

在System settings -> Keyboard中创建自定义快捷键:terminator: Alt-F11

配置Terminator: 在 Preferences 中:

  • Global: Maximised;

  • Profiles: 在 Global 子标签下:uncheck Show titilebar, check "copy on selection"; 若需要与tmux绑定,参考笔记"启动Console后自动进入tmux ".

  • Keybindings: new_tab: Ctrl-Shift-T, next_tab: Ctrl-Shift-N;

工作流程

  1. 用Alt-F11打开Terminator,窗口自动最大化;
  2. 用Ctrl-Shift-T创建新标签,双击Tab页上的标题重命名 (没有找到rename tab的快捷键),例如第一个tab设置为local, 第二个tab标题设置为alpha等;
  3. 用Ctrl-Shift-N在多个标签间切换;
  4. 用Ctrl-Shift-=和Ctrl--放大/缩小字体;

如果在alpha上的操作不复杂,只需要一个窗口,就不必采用多标签模式, 在本机启动Tmux,其中一个window SSH到远程主机就可以了。 这种情况下,第一个window命名为local,第二个命名为alpha.

基于多Workspace的Terminal工作环境

Termianl, a.k.a. console or command line, is a great tool to tell computers what to do. It's efficient and cool to type some words in a terminal(of course in full screen mode) and get all things done. But if you have only one terminal on the screen, switching between directories are always disturbing and time-consuming jobs. So to keyboard fans, a terminal enhancement tool is necessary. With the help of workspace (a.k.a. virtual desktop) switching tool and window arrangements shortcuts, a geek's screen is like this:

  1. Put all GUI windows in workspace 1;

  2. Put terminal windows in workspace 2;

  3. In workspace 2, switch multiple terminal tool in full screen mode;

  4. Use workspace switching shortcuts to switching between GUI workspace and terminal workspace;

Windows: Conemu + VirtuaWin

Terminal full screen: alt + enter;

Split window: alt + h/v (split horizontal/vertical, defined in [Settings-> Keys & Macros -> duplicate active <> split to bottom/right]);

Switch between terminal: [ctrl + tab] or [Win + q];

Hide tab bar: Settings -> Features -> Tabs -> Don't show;

Switch workspace: alt + win + Left/Right/Up/Down (defined in Setup -> Hotkeys of VirtuaWin);

Ubuntu: Teminator

Auto run command when startup (ssh to a remote server in this case): terminator -x ssh bvt@10.0.2.74;

(use terminator -h for details. xterm and konsole also surppot -e syntax).

Terminal full screen: F11 (defined in [System Settings -> Keyboard -> Shortcuts -> Windows -> Toggle fullscreen mode]);

Split window: alt + h/v (split horizontal/vertical, defined in [Preference -> Keybindings -> split_horiz/split_vert]);

Switch between terminal: alt + Left/Right/Up/Down;

Toggle Window max/normal of one of all terminals: ctrl + shift + z (defined in [Preferences -> Keybindings -> scaled_zoom]);

Make background transparent: [Preferences -> Profiles -> defaults -> Background -> Transparent background: 0.8];

copy on selection: [Preferences -> Profiles -> Copy on selection];

Switch workspace: alt + ctrl + Left/Right/Up/Down (defined in [System Settings -> Keyboard -> Shortcuts -> Navigation -> Move to workspace left/right/above/below]);



Published

May 14, 2013

Last Updated

May 14, 2013

Category

Tech

Tags

  • ConEmu 3
  • not_eaten: wordpress post 4
  • terminal 8
  • terminator 1
  • ubuntu 61

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor