Group text editing with Gobby

926

Author: Federico Kereki

If you program in a distributed environment, you surely are used to working with tools such as CVS or SVN, two version control systems that allow many users to work on a group of files. However, those tools don’t provide for real-time updates, and if two programmers work on the same piece of code, they will need to reconcile their updates, which can be troublesome. Gobby provides group editing capability, so two or more people can edit the same document at the same time, in a collaborative fashion, with every participant getting to see all edits at the same time.

Gobby also allows you to try out “pair programming,” in which two programmers share the same monitor and keyboard, alternatively working on code. In fact, you can do this with many people at different sites.

Gobby (and its supporting tools) can run in Linux, Windows, and Mac OS X. It’s released under the GPLv2. Avoid versions earlier than the current stable 0.4.5 release, which worked just with the UTF-8 character representation scheme in Linux, but didn’t handle the usual Windows schemes. (In fact, this isn’t quite correct: Windows uses the Windows-1252 scheme, while Gobby offers ISO-8859-1, and these are not precisely the same!)

Installation

Installing Gobby isn’t hard, but the phrase “dependency hell” will come to mind as you start chasing all the needed packages. Of course, at first I tried downloading the program from the usual repositories (I work with openSUSE) but they were dated versions: 0.3 for openSUSE 10.1 and 0.4.1 for openSUSE 10.2. Installing an older version of Gobby first from a repository, and then getting the current version, might help, because that way you can install the other packages you need and reduce your later work.

You will want to download and install Net6 (a network library), then Obby (a synchronizing library), and finally Gobby, the editor itself. If you want to allow remote users to work on documents on their own, even if you are not online, you will have to add Sobby, an independent session manager. All are available from the Gobby project.

Some of the package names cited on the Gobby site seem to be wrong: you will have to get by yourself libsigc++2-devel, gnutls-devel, gtkmm2-devel, libxml++-devel, and gtksourceview-devel. If you don’t want to start trawling all around the Web for their needed packages, use YAST or Smart or a similar package manager to download them.

After downloading and opening all the files, you will have to do the usual configure, make, make install sequence for each program in sequence. After a longish time, you will be able to start creating sessions and collaborating with others.

Working in groups

In order to share files, you must either start a session of your own, or join somebody else’s session. For the former, click on “Create Session…” and specify your name and the port you will use — 6522 is the default, but you can change it; just take care not to pick an already used port. If you plan to allow remote editing, you must open the port you selected in your firewall. You can specify the background color that will mark your changes (a palette of pastel colors is provided; do not pick a dark color or you won’t be able to read your changes) and an optional password that users must enter to join your session, then click on “Host…”. If you want, you can save the session and later restore it.

To join a session, click on “Join Session…” and specify the URL of the session, the port, your name, and your color; you will be prompted for a password if one is needed. If you pick a color that another user has already chosen, Gobby will let you know and make you change your pick.

Once you are in a session, Gobby works pretty much like any text editor. You have the standard editing functions, except for an Undo function. (Why no undo? If one person writes something, a second person edits it, and the first person wants to undo his changes, what should happen? That’s the key problem the developers haven’t solved yet, so no undo for now, though it might be added in the future.) Whenever any of the session members makes a change, it shows up instantly on all screens, marked with the appropriate color. You can open (via the menu or an icon) a window showing all users and their respective colors. Any user can open a file or save it to his own machine. All currently opened files appear as tabs.

The editing features themselves are limited; rather than vi or Emacs, think Notepad. Also, don’t expect anything but standard plain text files. There’s a search and replace function with “match case” and “match word” options, but no regular patterns or heavier duty options. You can also set a few display options (font and font size, word wrap, and syntax coloring, for example), but the automatic indentation option didn’t seem to work. Also, I found a weird problem: some menu functions appear to be disabled, but work anyway!

You can enhance your collaboration by using the included chat facility. Open the chat window and you will see an area showing recent text messages, and another area where you can write your own messages and send them to everybody. In the first area you will also see whenever anybody joins or leaves the session.

More serious work

Working as described above is good enough for short sessions of common work, but what happens if you turn your machine off? In order to allow for more independent sessions, you can set up any machine to work as a server. To do this, install Sobby and run it: a simple way is sobby –port=6522 –name=nameYourSession –password=YourSessionPassword.

You can save a session and restore it by using the –configfile and –write-config options. You can also set up a directory for automatic saving of all documents; a good practice!

While Gobby isn’t yet a full-featured text editor, it can help with group work in real time. Remotely fixing a script, or tweaking some code, while working in pairs or groups as if everybody were just standing around the same terminal, greatly promotes productivity and also helps less experienced team members learn more. There are other tools that do similar things, but none comes close to the level of interaction Gobby provides.

 

Category:

  • Desktop Software