Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use make-frame-on-display and multi-tty in Emacs?

This page from the Emacs manual describes a function called make-frame-on-display that allows you to access a remote Emacs session. My interest in this function is to use it to share buffers for pair programming remotely with a colleague.

From the page:

It is even possible to use this feature to let two or more users type simultaneously on the two displays, within the same Emacs job. In practice, however, the different users can easily interfere with each others' edits if they are not careful.

How exactly do I set this up? What do I need? What does my partner need? The details are not stated, but I don't know enough about Emacs to know where to start.

Is there any other way to get a shared Emacs session? This page from the Emacs Wiki refers to something called multi-tty. The questions I asked above also apply to this.

Which is better: multi-tty or make-frame-on-display?

like image 448
hekevintran Avatar asked Jul 14 '10 08:07

hekevintran


2 Answers

I haven't tried multi-tty, but make-frame-on-display is pretty simple. You type M-x make-frame-on-display, hit return, then type the display you want the frame to show up on. For example:

I have my local host (thor) running emacs and I want to make a frame pop up on a machine called zeus, on its only X display (0.0). So I would type M-x make-frame-on-display<ret>zeus:0.0<ret>

All set!

You may need to configure the remote machine's X server to accept incoming connections from your machine with "xhost +thor". You may also need to configure its firewall to allow incoming connections on the X11 port, which is 6000. Keep in mind that X forwarding is not encrypted, so if you aren't working with someone on your LAN you may want to go through a VPN in order to keep things private.

Edited to fix brackets.

like image 127
nmichaels Avatar answered Sep 29 '22 20:09

nmichaels


You can also have the person at zeus type ssh -X thor emacsclient -c.

like image 39
offby1 Avatar answered Sep 29 '22 20:09

offby1