Both sides previous revisionPrevious revisionNext revision | Previous revision |
linux:screen [2019/09/19 07:14] – js | linux:screen [2024/06/27 11:58] (current) – [Help] js |
---|
====== Screen ====== | ====== Screen ====== |
| |
|shortcut|description| | ===== Shortcuts ===== |
| |
| |@#6495ed:shortcut|@#6495ed:description| |
| |<key>CTRL</key>-<key>a</key> <key>?</key>|key commands overview / help| |
|<key>CTRL</key>-<key>a</key> <key>CTRL</key>-<key>c</key>|create new tab| | |<key>CTRL</key>-<key>a</key> <key>CTRL</key>-<key>c</key>|create new tab| |
| |<key>CTRL</key>-<key>a</key> <key>d</key>|detach session (run in background)| |
| | || |
|<key>CTRL</key>-<key>a</key> <key>n</key>|jump to the next tab| | |<key>CTRL</key>-<key>a</key> <key>n</key>|jump to the next tab| |
|<key>CTRL</key>-<key>a</key> <key>p</key>|jump to the previous tab| | |<key>CTRL</key>-<key>a</key> <key>p</key>|jump to the previous tab| |
|<key>CTRL</key>-<key>a</key> <key>0</key>|jump to tab 0| | |<key>CTRL</key>-<key>a</key> <key>0</key>|jump to tab 0| |
|<key>CTRL</key>-<key>a</key> <key>1</key>|jump to tab 1| | |<key>CTRL</key>-<key>a</key> <key>1</key>|jump to tab 1| |
|<key>CTRL</key>-<key>a</key> <key>d</key>|detach session (run in background)| | |
|<key>CTRL</key>-<key>a</key> <key>CTRL</key>-<key>a</key>|jump between windows| | |<key>CTRL</key>-<key>a</key> <key>CTRL</key>-<key>a</key>|jump between windows| |
|<key>CTRL</key>-<key>a</key> | | || |
|<key>CTRL</key>-<key>a</key> | |<key>CTRL</key>-<key>a</key> <key>"</key>|windows list| |
|<key>CTRL</key>-<key>a</key> | |<key>CTRL</key>-<key>a</key> <key>'</key>|choose which window to jump (apostrophe)| |
|<key>CTRL</key>-<key>a</key> | | || |
| |<key>CTRL</key>-<key>a</key> <key>A</key>|rename window| |
|command|description| | |<key>CTRL</key>-<key>a</key> <key>x</key>|screen lock| |
| |<key>CTRL</key>-<key>a</key> <key>ESC</key>|copy mode (scroll up)| |
| |<key>CTRL</key>-<key>a</key> <key>[</key>|copy mode (scroll up)| |
| | |Choose start and <key>ENTER</key> -> choose end and <key>ENTER</key>| |
| | |or for retangle mode: choose start and <key>c</key>+<key>ENTER</key> -> choose end and <key>c</key>+<key>ENTER</key>| |
| |<key>CTRL</key>-<key>a</key> <key>]</key>|insert from STDIN| |
| |<key>CTRL</key>-<key>a</key> <key>a</key>|send ctrl+a to application| |
| || |
| |<key>CTRL</key>-<key>a</key> <key>|</key>|split screen vertical| |
| |<key>CTRL</key>-<key>a</key> <key>S</key>+<key>s</key>|split screen horizontal| |
| |<key>CTRL</key>-<key>a</key> <key>TAB</key>|jump other split screen| |
| |<key>CTRL</key>-<key>a</key> <key>Shift</key>+<key>X</key>|split screen off| |
| |<key>CTRL</key>-<key>Up</key>%%|%%<key>Down</key>%%|%%<key>Left</key>%%|%%<key>Right</key>|navigate in splitt screens| |
| \\ |
| \\ |
| ===== Startcommands ===== |
| |@#6495ed:command|@#6495ed:description| |
|screen -S <session name>|start a new screen session| | |screen -S <session name>|start a new screen session| |
|screen -r <session name>|reattach existing screen session| | |screen -r <session name>|reattach existing screen session| |
|screen -x <session name>| | | |screen -x <session name>| | |
|screen -ls|show all screen sessions| | |screen -ls|show all screen sessions| |
| \\ |
| \\ |
| ===== Theme Config ===== |
| |
| <code># Blaue Statusleiste, aktueller Tab ist rot hinterlegt. Rechts Hostname sowie Datum und Uhrzeit |
| hardstatus on |
| hardstatus alwayslastline |
| hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %d.%m.%y %c:%s " |
| </code> |
| \\ |
| \\ |
| ===== Example screenrc ===== |
| <code>deflogin on |
| vbell on |
| vbell_msg " Wuff ---- Wuff!! " |
| |
| termcap facit|vt100|xterm|xterm-* LP:G0 |
| terminfo facit|vt100|xterm|xterm-* LP:G0 |
| termcap vt100 dl=5\E[M |
| terminfo vt100 dl=5\E[M |
| termcap facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%d;%dr:ic@ |
| terminfo facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%p1%d;%p2%dr:ic@ |
| termcap sun 'up=^K:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:IC=\E[%d@:WS=1000\E[8;%d;%dt' |
| terminfo sun 'up=^K:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC:IC=\E[%p1%d@:WS=\E[8;%p1%d;%p2%dt$<1000>' |
| termcap hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' |
| terminfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' |
| termcap wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h |
| terminfo wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h |
| |
| #remove some stupid / dangerous key bindings |
| bind ^k |
| #bind L |
| bind ^\ |
| #make them better |
| bind \\ quit |
| bind K kill |
| bind I login on |
| bind O login off |
| bind } history |
| |
| startup_message off |
| pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." |
| defscrollback 100000 |
| |
| termcapinfo xterm* OL=10000 |
| |
| termcapinfo xterm|xterm-* 'VR=\E[?5h:VN=\E[?5l' |
| |
| termcapinfo xterm|xterm-* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' |
| |
| termcapinfo xterm|xterm-* 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' |
| |
| termcapinfo xterm* be |
| termcapinfo wy75-42 xo:hs@ |
| termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J |
| termcapinfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@' |
| termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC |
| terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC |
| termcapinfo linux C8 |
| |
| # Blaue Statusleiste, aktueller Tab ist rot hinterlegt. Rechts Hostname sowie Datum und Uhrzeit |
| hardstatus on |
| hardstatus alwayslastline |
| hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %d.%m.%y %c:%s " |
| |
| # Default Shell as login Shell |
| shell -$SHELL |
| </code> |
| \\ |
| \\ |
| ===== Help ===== |
| * [[https://www.kilobitspersecond.com/2014/02/10/understanding-gnu-screens-hardstatus-strings/]] Help and documentation |
| * [[http://www.gnu.org/software/screen/manual/html_node/String-Escapes.html]] documentation of the escape strings |
| |
| |
| |