Farid Ahmadian / General

GNU screen

Public domain


/etc/screenrc

bindkey -k k; focus
bindkey -k F1 prev
bindkey -k F2 next
startup_message off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'

Shortcuts

Ctrl-a S       (split)       Split region.
Ctrl-a tab     (focus)       Switch to next region.
Ctrl-a X       (remove)      Kill the current region.
Ctrl-a Q       (only)        Delete all regions but the current one.
Ctrl-a c       (screen)      Create a window.
Ctrl-a n       (next)        Next window.
Ctrl-a p       (prev)        Previous window.
Ctrl-a "       (windowlist)  List of windows.
Ctrl-a k       (kill)        Destroy window.
Ctrl-a d       (detach)      Detach screen.
Ctrl-a A       (title)       Set window title.
Ctrl-a [       (copy)        Copy/Scrollback mode.
Ctrl-a ]       (paste)       Paste to stdin.

Switchs

-r              resumes a detached screen session
-x              attach to a not detached screen session
-d -m           Start  screen  in  detached mode
-S essionname   specify a meaningful name for the session

Run from rc.local

env SCREENDIR="/root/.screen" screen -dmS download /usr/local/aria2/bin/aria2c http://ultilex.linux-bg.org/ultilex-5.0.0.iso

BY: Pejman Moghadam
TAG: screen
DATE: 2011-07-19 11:11:07


Farid Ahmadian / General [ TXT ]

With many thanks and best wishes for dear Pejman Moghadam, someone who taught me alot in linux and life :)