Screen - Finestra de commandes: diferència entre les revisions

De WikiMar
Salta a la navegació Salta a la cerca
 
(Hi ha 7 revisions intermèdies del mateix usuari que no es mostren)
Línia 1: Línia 1:
Crea una sessió que continua executant-se tot i tancar la sessió o finestra actual:  
Crea una sessió que continua executant-se tot i tancar la sessió o finestra actual:  
  screen
  screen


Recupera la sessió:  
Recupera la sessió:  
screen -r
Sortir de la finestra pero deixa executant el que hi hagi:
Control + a  d  (en minuscules)
Acabar la finestra:
Control + d
Llistar totes les sessions de finestres de la maquina;
screen -ls
Crear nova finestra
Control + a c  /  Control + a  Control + c
Canviar entre les dues ultimes finestres
Control + a a  /  Control + a  Control + a
Canviar a la finestra anterior
Control + a p
Canviar a la finestra següent
Control + a n
Partir la pantalla en dos screens adalt abaix
Control + a Shift + S
Canviar entre screens adalt abaix
Control + a Tabulació


screen -r


Tancar:
Mode visual (copiar)
Control + a ESC
Enganxar
Control + a ]


Control + A  D
Control + D


<br>


== Varis Usuaris  ==
== Varis Usuaris  ==
Línia 34: Línia 58:




==Personalitzar opcions .screenrc==
O millor /etc/screenrc (per aplicar-ho a tots els usuaris)
<pre>
# Afegit Marti:
#From https://www.mattcutts.com/blog/screen-power-tips-screenrc/
autodetach on # Autodetach session on hangup instead of terminating screen completely
startup_message off # Turn off the splash screen
defscrollback 30000 # Use a 30000-line scrollback buffer
termcapinfo xterm ti@:te@
# From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# Q: My xterm scrollbar does not work with screen.
# A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. ‘vi’). You can tell screen not to use these initialisations by adding the line “termcapinfo xterm ti@:te@” to your ~/.screenrc file.
</pre>


== Opcions més complicades ==
== Opcions més complicades ==
Informació a http://lpi.aluzina.org/wiki/Multiuser_screen
Informació a http://lpi.aluzina.org/wiki/Multiuser_screen
==Més info==
http://www.linuxforums.org/applications/the_screen_program.html

Revisió de 18:27, 1 març 2016

Crea una sessió que continua executant-se tot i tancar la sessió o finestra actual:

screen

Recupera la sessió:

screen -r

Sortir de la finestra pero deixa executant el que hi hagi:

Control + a  d  (en minuscules)

Acabar la finestra:

Control + d

Llistar totes les sessions de finestres de la maquina;

screen -ls 


Crear nova finestra

Control + a c  /  Control + a  Control + c

Canviar entre les dues ultimes finestres

Control + a a  /  Control + a  Control + a

Canviar a la finestra anterior

Control + a p

Canviar a la finestra següent

Control + a n


Partir la pantalla en dos screens adalt abaix

Control + a Shift + S

Canviar entre screens adalt abaix

Control + a Tabulació


Mode visual (copiar)

Control + a ESC

Enganxar

Control + a ]


Varis Usuaris

Usuari 1:

screen
screen -X multiuser on

Usuari 2:

screen -list

i apareix una llista dels screens actuals amb el format:

20604.pt-3.59995 (Multi,attached)

cal seleccionar el screen:

screen -x 20604.pt-3.59995



Personalitzar opcions .screenrc

O millor /etc/screenrc (per aplicar-ho a tots els usuaris)


# Afegit Marti:

#From https://www.mattcutts.com/blog/screen-power-tips-screenrc/

autodetach on # Autodetach session on hangup instead of terminating screen completely

startup_message off # Turn off the splash screen

defscrollback 30000 # Use a 30000-line scrollback buffer

termcapinfo xterm ti@:te@
# From http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# Q: My xterm scrollbar does not work with screen.
# A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text buffer. (The scrollbar also does not work when you start e.g. ‘vi’). You can tell screen not to use these initialisations by adding the line “termcapinfo xterm ti@:te@” to your ~/.screenrc file. 

Opcions més complicades

Informació a http://lpi.aluzina.org/wiki/Multiuser_screen


Més info

http://www.linuxforums.org/applications/the_screen_program.html