Created
November 25, 2009 19:16
-
-
Save dysinger/242945 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # 1 - install emacs on the server w/ the same version as your desktop | |
| # cd ~/src/emacs && ./configure --prefix=$HOME --without-x && make install | |
| # 2 - install screen on the server w/ suid bit turned on for multi-user | |
| # sudo chmod 4755 `which screen` | |
| # 3 - start a local emacs daemon on your desktop | |
| # emacs --daemon --eval '(setq server-use-tcp t)' | |
| # -OR- start your local emacs app w/ the following in your .emacs | |
| # (setq server-use-tcp t) (server-start) | |
| # 4 - send our emacs tcp host/port & cookie to the remote box | |
| rsync ~/.emacs.d/server/server dev.sa2s.us:~/.emacs.d/server/server | |
| # 5 - ssh & tunnel in | |
| PORT=$( \ | |
| cat ~/.emacs.d/server/server | \ | |
| awk 'NR>1{exit};{print $1}' | \ | |
| awk '{sub(/127.0.0.1\:/, "");print}' \ | |
| ) | |
| echo $PORT | |
| ssh-add && ssh -R $PORT:127.0.0.1:$PORT dev.sa2s.us | |
| # 6 - start a remote screen & emacsclient for pairing | |
| # ~/bin/emacsclient -f server -nw $HOME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment