Common Lisp Remote Server Guide

Kent Quanrud and Noah Quanrud

Connecting SLIME to a remote server

Connecting SLIME to a remote server

Kent Quanrud and Noah Quanrud

  1. on the remote server:
    1. detachtty x /usr/bin/sbcl // where x is a file path specifying where detachtty should create a file socket.
    2. attachtty x // connects the user to the sbcl environment created in (1.1)
  2. in sbcl, on the remote server:
    1. (ql:quickload :quicklisp) loads quicklisp into sbcl
    2. (ql:quickload :swank)
    3. (swank:create-server :port 4005 :style :spawn :dont-close t)
    4. press ctrl+\ // detaches attachtty, leaving sbcl running
  3. on the local computer:
    1. ssh -L4005:127.0.0.1:4005 u@a // where a is the address of the remote server, and u is the username on the remote server.
  4. in emacs, on the local computer:
    1. alt+x slime-connect
    2. (enter address) 127.0.0.1
    3. (enter port) 4005

1. Introduction

2. Components

In this section, we give a brief overview of each of the different tools and components that we use.

detachtty

detachtty is a Unix command that lets users run interactive programs in the background, non-interactively. Normally, any running command exits when a user logs out. detachtty will run a program in the background, so that continues even when the user exits. Moreover, detachtty sets up a pipe so that the user can interactive with the program (see attachtty below), and also sets up networking so that one can connect to it by ssh.