This project provides remote Emacs integration. Basically, if you want to run Emacs on a remote server via SSH, you can integrate it with your local machine's clipboard and web browser.
There are two parts:
reintegrate.el, an Emacs packageemacs-integration, an HTTP server
reintegrate.el in the remote Emacs sends HTTP requests to
emacs-integration running on your local machine through a forwarded
port.
On your local machine:
-
Install clipboard utilities:
- For X, install xsel.
- For Wayland, install wl-clipboard.
-
Build the integration server (requires Go):
(cd emacs-integration && go install .) # Installs into $HOME/go/bin -
Assuming your local machine uses systemd, copy the service and socket files into
~/.config/systemd/user:cp *.socket *.service ~/.config/systemd/user -
If you're using Wayland, edit the service file and replace the
ExecStartline with the commented one. -
Enable systemd socket activation:
systemctl --user enable --now emacs-integration.socket
You don't have to start the service manually, as systemd can do it automatically when something conects to the port.
On your remote machine:
-
Add
reintegrate.elto yourload-path. -
Add to your
init.el:(when (getenv "SSH_TTY") (require 'reintegrate) (reintegrate))
When using:
-
SSH into your remote machine and forward the ports:
ssh -R 9999:localhost:9999 myhost -
Start Emacs.