Variable: server-socket-dir

server-socket-dir is a variable defined in server.el.gz.

Value

"/tmp/emacs0"

Documentation

The directory in which to place the server socket.

If local sockets are not supported, this is nil.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/server.el.gz
;; We do not use `temporary-file-directory' here, because emacsclient
;; does not read the init file.
(defvar server-socket-dir
  (if internal--daemon-sockname
      (file-name-directory internal--daemon-sockname)
    (and (featurep 'make-network-process '(:family local))
	 (let ((runtime-dir (getenv "XDG_RUNTIME_DIR")))
	   (if runtime-dir
	       (expand-file-name "emacs" runtime-dir)
	     (expand-file-name (format "emacs%d" (user-uid))
                               (or (getenv "TMPDIR") "/tmp"))))))
  "The directory in which to place the server socket.
If local sockets are not supported, this is nil.")