Screen Multi-user Mode

Suppose Bob wants to show Alice what he’s doing in his console remotely. Bob would do the following:

1. Bob would make sure that the screen binary is suid root (sudo chmod +s /usr/bin/screen on my system).

2. Bob starts screen:
screen -S <session_name>

3. Bob allows multiuser access:
^A :multiuser on

4. Bob adds Alice to the access control list:
^A :acladd alice

5. Bob then changes Alice’s permissions to read-only:
^A :aclchg alice -w "#"

6. Alice will then ssh into the machine and:
screen -x bob/<session_name>

That’s awesome.

Notes:

  • People can join your session even if you skip acladd and just do aclchg, but they won’t be able to detatch. Weird.
  • ^A * lists all participating users (as does ^A :displays)
  • Anybody in the session can broadcast a message by typing ^A :wall <message_text>

Good Times

nmap -T 5 -M 1000 -sT 192.168.0.x

my taglist settings and taglist hints

My tag list settings (variable changes must be changed in the file .vim/plugin/taglist.vim) :

  • To exit Vim when only the taglist window is opened, set the “Tlist_Exit_OnlyWindow” variable to 1.
  • By default, existing files in the tag list will not be updated unless the tag list is open.  Change “Tlist_Process_File_Always” to 1 if you want it to update all files even when the tag list is not open.
  • You can recursively add multiple files from a directory tree using the “:TlistAddFilesRecursive” command.  This command takes two arguments. The first argument specifies the directory from which to recursively add the files. The second oTheseptional argument specifies the wildcard matching pattern for selecting the files to add. The default pattern is * and all the files are added.  Add this as a shortcut to .vimrc to save time.
  • You can toggle the tag list with “:TlistToggle”.  At first, I thought that “:TlistOpen” which toggles the tag list AND place your cursor inside of it was more convenient, but if you set the “Tlist_GainFocus_On_ToggleOpen” variable to 1, you can get the same effect while retaining the ability to toggle it closed without having to create a new binding to toggle the list closed.
  • Setting “Tlist_Close_On_Select” to 1 will close the Tlist when you’re done with it.  This would be convenient if you have a low-res screen like me.  * After turning on the “Tlist_File_Fold_Auto_Close” setting on, I turned this setting off because they conflict in functionality.  ** After finding about how to close all the trees using ‘=’ I’m not sure how helpful this auto-close thing is…

Some cool hints:

  • When you’re in the taglist window and you want to jump to the tag in a new window, press the ‘o’ key.
  • You can press the ‘p’ key to jump to preview the file, but still keep the cursor in the taglist window itself.
  • Inside the tag list, <Tab> jumps to the next file, and <Backspace> jumps to the previous file.
  • Inside the tag list, ‘zc’ closes trees, and ‘zo’ opens trees.
  • ‘=’ closes ALL trees!
  • ‘x’ maximizes/minimizes the tag list window.

Setting up Vim bindings for Pine

Edit the .pinerc file:

editor=vim

Start up pine.

Hit ’s’ for setup

Hit ‘c’ for config

Select the following two preferences under “composer preferences”:

enable-alternate-editor-command

enable-alternate-editor-implicitly

When you start up pine, you’ll need to ^n ^p to move around the upper portion of the email, but once you enter the body, you can now use vim!