Domanda

ssh -X root@localhost "emacsclient -c"

Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
emacsclient: could not get terminal name

I have googled but i can't find the solution to solve it.

Update: I thought that emacs client (on local machine) connect to emacs server (on remote machine) so that emacs client can edit file on local machine. But it doesn't seem to work that way...

È stato utile?

Soluzione

using emacsclient with remote forwarding is a little tricky (and the behavior may have been fixed/changed at some point).

one thing you could do is just ssh to the server normally, and pass the current ssh display to emacs explicitly:

emacsclient -c -d $DISPLAY

also found this on the emacsclient wiki:

ssh remote_host -f emacsclient --eval ‘”(make-frame-on-display \”$DISPLAY\”)”’

UPDATE:

since emacs doesn't seem to like the ":0" display, try writing it out explicitly:

emacsclient -c -d localhost:0
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top