Skip to content

Instantly share code, notes, and snippets.

@ayinlaaji
Last active September 13, 2019 07:27
Show Gist options
  • Save ayinlaaji/f1f902db9145c14029476844223bd0a1 to your computer and use it in GitHub Desktop.
Save ayinlaaji/f1f902db9145c14029476844223bd0a1 to your computer and use it in GitHub Desktop.
GNU screen

resize

C-a :resize 50%

rename tab

C-a A

list screens

C-a "

allow vim themes to work in GNU screen

terminfo and termcap for nice 256 color terminal

allow bold colors - necessary for some reason

attrcolor b ".I"

tell screen how to set colors. AB = background, AF=foreground

termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

erase background with current bg color

defbce "on"

CTRL a + Q unsplits and lets you remain on the current window

whereas

CTRL a + X unsplits and puts you on the following available window


Set password $ screen

  • hit ctrl A :password enter the new password twice Now, the encrypted password is in the screen clipboard. We need to retrieve it

  • Paste the crypted password The key shortcut for pasting the clipboard is by default Ctrl-A ] hit ctrl A ] the encrypted password should be pasted in the console Edit the screen configuration file Copy the encrypted password and paste it in ~/.screenrc (or whatever your screen configuration file is)

  • add this line, with your encrypted password password VGdGzMopF Restart screen You need to restart screen to take the password in account. Now, next time a screen is reattached, the password will be prompted.

dams@foo:~$ screen -r -d plop Screen password:

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