Skip to content

Instantly share code, notes, and snippets.

@MartinPaulo
Last active August 29, 2015 14:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinPaulo/110f51a111f51938f2f7 to your computer and use it in GitHub Desktop.
Save MartinPaulo/110f51a111f51938f2f7 to your computer and use it in GitHub Desktop.

###Notes for working with Screen and devstack...

# to join the screen session:
./rejoin-stack.sh 
# to the list of current screen sessions:
screen -list
# another way to join:
screen -r

to get help:

(Ctrl+ a) ?

to move to the next screen

(Ctrl + a) n

or...

(Ctrl + a) space

to move to the previous screen

(Ctrl + a) p

to move to a given screen number (only works for numbers 0-9)

(Ctrl + a) number

to see a list of all the screens, and to be able to select one from the list

(Ctrl + a) "

to detach from the list of screens

(Ctrl + a) d

to create a screen

(Ctrl + a) c 

to see a list of available screens

(Ctrl + a) .

In any screen session enter ctrl+c to kill a service, and then up-arrow enter to restart it.

###How to share a terminal session with Screen

# install screen
apt-get install screen

# create a user 
adduser demo
# if need be, set the new user password
# passwd demo

Then in a terminal session

# connect as the new user
ssh demo@130.56.249.78

# start a new screen session
screen -d -R shared_session

Then in a new terminal session, connect as the same user

ssh demo@130.56.249.78

# join the current session
screen -x shared_session

To adjust all shared users to the dimensions of the current terminal

(Ctrl + a) F

Note that typing exit will kill the screen session for all parties :( Detach is the way to go if you want to exit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment