Remote emacsclient via ssh

I have an emacs daemon on another machine running Ubuntu. I am sitting at a Windows machine with Cygwin/X. I’ve launched “startxwin” to get a local X server and pulled up an xterm. I connect to the remote machine with ssh –X and attempt to run “emacsclient –n –c”. The error I get is “X11 connection rejected because of wrong authentication.” No luck.

I found this page to fix the problem. For some reason $XAUTHORITY is blank, but it needs to be set to the same value that emacs has. To fetch that value, run: emacsclient –e “(getenv \”XAUTHORITY\”)”. Follow the directions in that email. Now you can open new emacs frames on your machine that is connected to a remote instance of an emacs daemon. You can’t do that with Visual Studio!

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s