[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

local emacsclient to remote emacs server

From: t
Subject: local emacsclient to remote emacs server
Date: Mon, 21 Mar 2022 16:15:01 +0000
User-agent: Cyrus-JMAP/3.5.0-alpha0-4907-g25ce6f34a9-fm-20220311.001-g25ce6f34

Hi Emacs users.

Is there a way to connect local emacsclient to the remote emacs server? I am 
trying to figure out a way to leverage emacs for remote dev work, wherein the 
remote machine is my development server: files are there, processes run there 
(TRAMP therefore isn't enough). E.g. could be a containerized dev environment.

Kinda surprised that VSCode "just works" for that sort of thing, but perhaps I 
shouldn't be. After all it runs in the browser.

Yes, ssh + screen or tmux + terminal emacs kinda work, but feels wrong to have 
all of these intermediate layers when all I really care about is Emacs. I don't 
use shells much and when I do I prefer to do it from Emacs.

Ideally I wish I could run X version in all its GUI glory, but XQuartz on OSX 
can't handle hiDPI or I failed to figure a way to get reasonable resolution. 
Ditto `xpra`. Linux to Linux it actually works just fine.

Let's go with `caveman` version then. We'll start remote daemon and forward its 
Unix socket to our local machine:
> ssh -L /tmp/foomacs:/run/user/1000/foomacs remote
> emacs --daemon=foomacs --no-desktop

Local machine (OSX in my case):
> emacsclient -s /tmp/foomacs -t
> *ERROR*: could not open file: /dev/ttys007

Should I have reasonably expected this to work? Or was Emacs client/server not 
built for such usecase? Remote server running Emacs 28. Tried local 
emacsclient27 and emacsclient28 - same result.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]