Outils pour utilisateurs

Outils du site


linux:gnu_screen

GNU Screen

Commandes

Fenêtres

  • changer le numéro de la fenêtre : Ctrl a + : number x
  • split vertical : Ctrl a + |
  • split horizontal : Ctrl a + S
  • changer la région de focus : Ctrl a + Tab
  • close region : Ctrl a + X
  • close all region but current : Ctrl a + Q

Session

  • name a session and start it : screen -S mySessionName
  • rename a sesion outside screen session : screen -X sessionname mySessionName
  • rename a session inside screen session: C-a :sessionname mySessionName

Divers

  • Scroll buffer avec la souris : Ctrl-A + Esc pour passer en mode copy → scroll → Esc pour sortir de ce mode

Configuration : /etc/screenrc

++++ Config perso |

/etc/screenrc
hardstatus alwayslastline
hardstatus string "%{= kM}[%{= kB}%H%{= kM}]%{= kB}%L=%=%-w%{= kM}%45L> %n%f* %t%{= kB}%+w%=%-13=%{= kM}[%{= kB}%d/%m %c%{= kM}]"
# pour le split vertical, définit la ligne de statut pour chaque fenêtre (ici juste les couleurs ForeBackGround)
caption string "%{= dd} "  # default on default colors
# pour le split vertical, pas de ligne de démarcation
sorendition "="

++++

Configurer sa ligne 'hardstatus' avec l'aide de : aperiodic.net

Exemple décortiqué : hardstatus string

'%{= kG}[ %{y}%H %{g}][%15= %>%-Lw%40>%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{g}%+Lw%-22< ][%{c} %Y-%m-%d %c %{g}]'

Output green [ ] with the hostname colored brown in the middle :

%{= kG}[ %{y}%H %{g}]

Output a [ thats green

[

Leave a gap for the hostname

%15=

Mark that spot for truncation :

%>

Print all the other windows prior to the current one up to 40% width :

%-Lw%40>

Print out a red ( :

%{r}(

Print out White Bold Text Of the Window Number, a *, flags, title :

%{W}%n*%f %t

Print out other users on that screen (if some exist) :

%?(%u)%?

Print out a red ) and then switch back to green :

%{r})%{g}

Print out all the other windows after the current one :

%+Lw

Leave some room on the end for the date and time and mark that as the other truncation point :

%-22<

Print the closing bracket, the opening bracket for the final section, a cyan marker, the date and time, and a green ] :

][%{c} %Y-%m-%d %c %{g}]

search?q=screen&amp;btnI=lucky

linux/gnu_screen.txt · Dernière modification: 2018/04/30 13:01 (modification externe)