Working together on text and source code with Gobby and infinoted
Originally published on the weblog TechMonks, which no longer exists.
While Suze is typing this Latex code, Angel sees that Suze forgets a backslash (\), so she adds that backslash. Suze works straigh on, but she sees the backslash added by Angel instantaneously. It is marked with the user color of Angel, so it draws her attention. She knows that she probably made an error, so now she chats with Angel, asking why she has to add a backslash when typing C#.
Suze and Angel are working on a highly confidential technical paper. Trusting the drafts to “the cloud” or a third party system was out of the question. They installed this software for collaborative editing on their own Linux server, although they also could have installed it on their own Windows XP client computers. But the server setup allows them to automatically produce a PDF version of their report each five minutes.
Suze and Angel didn’t exist. In fact, it was me that installed infinoted (the Gobby server) on my Ubuntu Server. And it worked great for me and two other medical informatics students when we had to create a report using Latex.
It’s easy, and here is a quick tutorial so if you have your own Linux based server, you can play with it.
Get infinoted with
sudo apt-get install infinoted
First, edit or create this configuration file: /etc/xdg/infinoted.conf
[infinoted] security-policy=require-tls certificate-file=/etc/xdg/infinoted.cert key-file=/etc/xdg/infinoted.key password=YOURPASSWORDHERE autosave-interval=5 root-directory=/mnt/data/gobby/data sync-directory=/mnt/data/gobby/export sync-interval=120
In this example, I use a directory structure like
The data directory holds the files you and others have created. They are stored in an XML envelope, because infinoted must remember which user edited which part of a text file. The export directory holds the files without the XML enclosure, and its use will be explained at the end of this short guide. The backup directories can be handy when something goes really wrong. I added scripts to /etc/cron.daily and /etc/cron.hourly to do the backups. For example, the hourly script just looks like this:
cp -ruf /mnt/data/gobby/data/* /mnt/data/gobby/backup/hourly/
It’s time to see the thing doing something. Do a one-time run to create keys and to see if it works:
infinoted --create-certificate --create-key
Now you need to install the client. There is a client for Linux and Windows, and I used the Windows client. Install the latest development version of Gobby, and you can go ahead. Connect with Gobby and test document creation in gobby/data and* gobby/export*. It it works, cancel infinoted with Ctrl-C. It’s time to make the setup permanent and automated. Infinoted must run as a daemon. Alas, daemonizing still is buggy, but we can work around that
Add to /etc/rc.local
# starts up infinoted (gobby server) # do NOT use "-d" to daemonize (up to 0.4.1, there are bugs), use " &" instead # configuration file is in /etc/xdg/infinoted.conf infinoted &
Activate infinoted by running /etc/init.d/rc.local or by rebooting your server. Alternatively, you can start infinoted in a a new screen.
The gobby/export directory will hold the exported source files, ready for automatic test-compiling or exporting to other places. In the case of Latex, you could use a simple script to automatically produce a PDF and to publish it to a website or email it to yourself. To do that periodically, add the script to /etc/cron.hourly or edit crontab if you want to repeat the action even more often. (This didn’t work as advertised in earlier versions of infinoted. I only got this to work after our student project finished, but you might profit!)
And in case you want to work on Windows computers where you cannot install the Gobby client: just copy the Gobby directory from your Program Files to your memory key, and there you go with your portable Gobby. Happy editing!
Deze blogpost werd in december 2022 overgezet van WordPress naar een methode gebaseerd op Markdown; het is mogelijk dat hierbij fouten of wijzigingen zijn ontstaan t.o.v. de originele blogpost.