The Perfect Mobile Coding Environment

(with tmux, mosh, iterm, aws)

Goal

  1. Mobility: Plane, train, coffeeshop or home. take your coding environment with you, including your code, your layout
  2. Continuity : Leave your work’s state at any time , and pick up when you ant, where you want
  3. Resiliency : Does not depend on state of Internet, fast or slow.
  4. Client independent : I do not have to setup anything on the client side, whether its a MacBook or a chrome book.
  5. Zero overhead : No servers to maintain at home, No sshing into servers each time I want to pick up work

Step 1: Make a development server in AWS

  • Base AMI : I have a base AMI that has all the packages on it , that I can boot up in secs.
  • Give it elastic IP with open SSH and UDP 60,000 (for mosh)

Step 2: Install tmux and Mosh on the server

Install tmux

apt-get install tmux

Install and start MOSH

  • Install Mosh
  • Start mosh server

Step 3 : Make your coding environment on the server as you want

  • Run tmux on the server
  • Make the environment as you like

Step 4: Attach to your coding environment from anywhere

  • Buy a brand new chrome book
  • Install mosh client
  • Goto coffeeshop
  • Fire iterm, type mosh — ssh=”/usr/bin/ssh -i yourpem.pem” ubuntu@yourserverip — tmux attach -t 0 -d
  • There is your environment

After you are done, close your chrome book. Go to home and open your mac book, run the mosh client and attach to your tmux on the server, you would connect to your coding environment just as you left it — your mosh keeps the ssh connection open, your tmux keeps all the coding environment — just pick it up where you left

Show your support

Clapping shows how much you appreciated Venkat Pothamsetty’s story.