[Note][Unix] Screen 筆記

Screen

Screen功能

  • Console界的VNC
  • terminal multiplexer
  • hookup,keep programs online,保持連線,ex: bbs 連線
  • easy detaching ,reattaching to terminal

Screen使用

常用快速鍵

增減
C-a C-c :新視窗
C-a k : kill current session
C-a \  : 一次 kill all windows

分割
C-a S : 分裂兩個Screen
C-a TAB : 切換

Info
C-a ? : 說明
C-a t : host name, loading
C-a w : 所有window 列表

切換
C-a C-a 快速切換
註:還是用 .screenrc的快速鍵  Alt-Z , Alt-X 比較快
C-a n 或 C-a p : next , previous
C-a N : N是視窗的號碼, 0 – 9
C-a "  : 切換,會有選單選擇
C-a ‘   : 切換,會請你輸入號碼

Detaching
C-a d

Reattaching
screen -URD

Copying,pasting
C-a [ : copy,
C-a ] : paste

C-a [, 開始copy mode, 移動游標, 到定點,enter,再移到結尾,enter
開個text editor,C-a ]貼上

screen -ls : list screen jobs

設定
C-a A : set window title
C-a : input config
C-a : encoding big5 utf8  設定轉編碼

監視windows, Screen會提醒你哪個window有無活動

C-a _  : To start or stop monitoring the current window for 30 seconds of silence
C-a M : to start or stop monitoring a window for activity

Screen設定

shelltitle

在 screen 裡顯示 vi 正在編輯的檔案

狀態列顏色

設定 screenrc 的心得

其他程式

  • screenie: 管理screen的程式
  • Gnome-Ternimal + Screen 合併
  • Rotating GNU Screens 自動在各視窗切換 ,top , thin之類的

From wikipedia

  • splitvt — split terminal utility
  • tmux — terminal multiplexer
  • Text windows (Twin) — a textmode windowing environment
  • Window (BSD) — window is a program on BSD Unix that implements a window environment on ASCII terminals.
  • dvtm – a tiling terminal multiplexer which can display several applications at once

Reference:

  1. Gnome-Terminal +Screen 合併
  2. 在 screen 裡顯示 vi 正在編輯的檔案
  3. 設定 screenrc 的心得
  4. Introduction to “screen" command
  5. GNU Screen

By:

Posted in:


發表留言