I know I haven’t always been the biggest fan of pair programming but I don’t think [in my past life](http://www.cabedge.com) it wasn’t a feasible solution. At [work](http://www.notifymd.com) the other day we came up with a solution for pair programming while we are working from home. We knocked it out and man it is pretty sweet.
Here are the things you are going to need
1) Server/Computer (with ssh access) that is accessible by both parties.
2) The computer must have screen.
You will need to run:
:::bash
$ sudo chmod u+s /usr/bin/screen
so that screen will allow for multiple users accessing the same executable.
Here is the [gist](http://gist.github.com/71662) of .screenrc located in your home directory.
Once you have all of this setup you are ready to go.
1) User 1 should log into the computer and if a screen session isn’t already started run:
:::bash
$ screen
If a screen session is already started then run:
:::bash
$ screen -r
2) User 1 should allow User 2 to access their screen session. This is done by pressing Ctrl-A : then:
:::bash
acladd *user2-ssh-username*
3) User 2 should ssh into the computer and run:
:::bash
screen -x *user1-username*/
That should be it, both users should be able to see each others work. This functionality only works well with command line editors but Vim and Emacs are great and powerful tools that should be a part of every programmers arsenal.
**Note:** This assumes that all network settings are correct for each individual to access the box accordingly.
I know I haven’t always been the biggest fan of pair programming but I don’t think [in my past life](http://www.cabedge.com) it wasn’t a feasible solution. At work the other day we came up with a solution for pair programming while we are working from home. We knocked it out and man it is pretty sweet.
Here are the things you are going to need
- Server/Computer (with ssh access) that is accessible by both parties.
- The computer must have screen.
You will need to run:
$ sudo chmod u+s /usr/bin/screen
so that screen will allow for multiple users accessing the same executable.
Here is the gist of .screenrc located in your home directory.
Once you have all of this setup you are ready to go.
- User 1 should log into the computer and if a screen session isn’t already started run:
$ screen
If a screen session is already started then run:
$ screen -r
- User 1 should allow User 2 to access their screen session. This is done by pressing Ctrl-A : then:
acladd *user2-ssh-username*
- User 2 should ssh into the computer and run:
screen -x *user1-username*/
That should be it, both users should be able to see each others work. This functionality only works well with command line editors but Vim and Emacs are great and powerful tools that should be a part of every programmers arsenal.
**Note:** This assumes that all network settings are correct for each individual to access the box accordingly.