Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to work with another programmer and I want the source code to be live in real-time on both of our screens. Is this possible on the Mac OS x or Linux? We're going to be using OS X but occasionally we might need to add an Ubuntu computer too.

Is there a way I can do this using ssh, any shell based program, or even a good GUI? I thought Coda might be capable of this but it's not really working.

Anyone ever do this? I'm not look for a git/svn/or any other version control system. This is more of a live coding session. :)

EDIT: To better explain this situation, let's say my friend Emily and I want to collaborate, should I have a hosted SSH over the internet?
...sometimes I find an SSH address in my sharing settings on OS X. Can I just take this SSH address and give it to Emily and will she be able to use it and after this, what do we need to connect simultaneously?

EDIT 2: Has anyone been able to do this using Coda over the internet?

Why I chose the answer that I did... Even though I found SubEthaEdit very useful, I didn't want to spend $60+ ($30 for me and $30 for my friend) on it because we already use a lot of tools for source editing. I realized that my friend is a big emacs user and I'm a vim user, also SSH was going to make it harder for myself to do the setup. Although in the future I might consider the latter the best solution. I chose to go with DocShare because it's an add-on for a tool we both know how to use, it's free, and I feel like I will be able to work simultaneously without much trouble.

TL;DR I need a tool that helps me collaborate source code with a friend of mine, it has to be either Mac only or multiplatform. I chose to go with DocShare.

share|improve this question
up vote 2 down vote accepted

While SEE is probably your best option for OS X only, if you have cross-platform requirements, take a look at Eclipse.

There are a few options for collaborative editing available:

  • DocShare (also see this video on Cola) is a plugin that shares single documents.
  • Saros is a plugin that shares whole projects.
share|improve this answer
This seems like the best solution, especially DocShare. – Muhammad Usman Jan 9 '11 at 9:03

Yes, I think what you are describing is what wikipedia calls a Collaborative real-time editor.

Since you're on OSX, SubEthaEdit might well be a good one for you.

share|improve this answer
Agreed. SubEthaEdit is fantastic. – Mike Scott Jan 9 '11 at 8:00
I use SubEthaEdit and it does exactly what you're asking. A single document that both computers can modify simultaneously. – bahamat Jan 9 '11 at 8:32
Hmm this does sound like the best solution. I'm trying out the trial right now...I tried it with a friend and she had Coda installed on her computer as well. The link that SubEthaEdit generates in the iChat message lead her to Coda and she was able to edit through this. So, I'm assuming Coda and SubEthaEdit use the same protocol to connect over the internet. Is there a way I can achieve this through Coda instead of SEE? B/c I'd like to save myself and a friend 30 bucks b/c I've already spent money on Coda. – Muhammad Usman Jan 9 '11 at 8:46

For SSH or shell-based solutions, look at "screen" for Linux. First connect via SSH to a server (that server could be one of the two machines, in which case you would only need to connect with the other) and run the following.

On the first computer:

$ screen -S my_screen
$ nano file.php

On the second computer:

$ screen -x my_screen
share|improve this answer
so, both computers are connecting to one SSH connection? Like let's say my friend Emily and I want to collaborate, what steps do we both take? – Muhammad Usman Jan 9 '11 at 8:36
You could either setup an SSH server on either Emily's computer or yours, and connect to the one running the server from the other. One of you would initiate the screen session (with the -S flag), and the other would join it (with the -x flag.) This will share your terminal, and you can open an editor program from it. – John M. Jan 9 '11 at 8:37
Is this SSH server the same as the one I find on OS X's sharing settings? If you're not on mac and dont know this, don't feel obligated to answer. – Muhammad Usman Jan 9 '11 at 8:40
I am not on a Mac, but if it has an SSH server included, yes, I would assume so. – John M. Jan 9 '11 at 8:44
Thanks for the help, I'll have to do some extensive googling! – Muhammad Usman Jan 9 '11 at 8:56

You could use X-forwarding and Emacs, just like in the good old days.

Start Emacs on one machine. On the other machine, make sure you have an X-server running and allow xhost <name> where <name> is either the first machine or the username of the guy working on the first machine.

Then in the Emacs running on the first machine, type M-x make-frame-on-display et voila, you should get an Emacs window on the second machine that shares the contents with the Emacs running on the first machine.

However, this may not be what you want, because the two frames will be in sync all the time: when one user changes the buffer, that's happening in the other window, too.

share|improve this answer
There are more user-friendly desktop sharing solutions available. – Daniel Beck Jan 13 '11 at 16:58
I'd claim that this is neither a desktop-sharing solution, nor is it especially user-unfriendly. But YMMV. – Thomas Jan 17 '11 at 11:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .