关闭screen的进程

如果开了多个screen都没关闭,每次一screen -r 就让选择reattach到哪个。原因是我一直不知道如何完全关闭一个screen session。

今天看了一下,原来只要在从那个screen session中所有窗口都退出,如果是应用程序就退出来然后在bash中exit,换个窗口,同理。最后,就会出现 [screen is terminating] 。就完全退出了。

学习screen的资源之一: http://jmcpherson.org/screen.html

To scroll back through screen's history, first enable the copy mode by pressing Ctrl+a [ . Now, use either one of the arrow keys, page up, page down, home and end keys to scroll through screen's history.

Pressing Enter will start marking text for copying. Pressing Enter again will copy the selected text into the clipboard. Now, to paste that text, press Ctrl+a ].

To kill not responding programs, use Ctrl+a K.

To split the screen in two, first create two screen sessions. Then press Ctrl+a S which will split the screen in half, giving you a session on the top that you're already using and a blank session at the bottom.

To move to the bottom half, press Ctrl+a, then the TAB key. This key combination will move the console cursor to the lower half. Once in the blank half, you have to set this bottom half of the screen to use one of the two earlier created sessions. To do this, press Ctrl+a, then " (shift+'). You will be presented with a list of available screen sessions, pick one using the arrow keys (be careful not to pick the one already at the top or you'll have a mirror console), and activate it by pressing Enter. Now type top and switch to the upper half by pressing again Ctrl+a TAB. You should now have a bash prompt waiting for commands in the upper half and system resources monitoring in the bottom half.

To return to full size screen, switch to the half you want it to remain and press Ctrl+a Q.

http://news.softpedia.com/news/GNU-Screen-Tutorial-44274.shtml

Making it go away

screen救命命令

screen救命命令

启动用 screen -r 接着上次会话用 r是retache
完全退出screen,就是说杀死screen下所有bash窗口和程序用screen -d,d=detache

C-a C-c 开一个新的terminal窗口
C-a " 显示窗口列表
C-a ? 帮助
C-a A 给当前窗口命名

对我来说,暂时足够了。screen相当于一个窗口管理器。最大好处是我登录远端服务器做工作,比如下载一个很大文件要耗费很长时间,或者进行需要很长时间的计算,如果不用screen,我桌面电脑关机,或者从remote terminal登录出来,那些工作就结束了。用screen,登录出来那些工作还在继续。下次登录上去用screen -r查看完成没有。有时压缩和下载任务要进行20多个小时,我可不想两台电脑都开着,费电,也不安全。

learn screen。学习screen这个窗口管理器 :)

** learn screen
http://aperiodic.net/screen/
Many links are broken

screen survial
C-a C-a, which will switch you to whichever window you were using before the current one.

  1. Use C-a n and C-a p to switch to the next or previous window in the list, by number.
  2. Use C-a N, where N is a number from 0 to 9, to switch to the corresponding window.
  3. Use C-a " to get a full-screen list of windows. You can navigate this list with the arrow keys (or vi-style, with j and k), and pick a window to activate by pressing Enter when it's highlighted. C-a w will give you a small, non-interactive list of windows.

    C-a A to give it a name.

    kill misbehaving programs with C-a K.