Etherpad Office Import & Export after Upgrade to V1

V1 does not natively support office import / exports yet due to a licensing issue but if you had it working before you can do a few steps that will get you started.  We use Open Office in a headless mode to accomplish this.

1.  Copy the cos.jar to infrastructure/lib (replacing etherpadbackup is the folder you backed your original etherpad installation to (etherpad <v1)

cp /usr/local/etherpadbackup/trunk/infrastructure/lib/cos.jar /usr/share/etherpad/infrastructure/lib/

2. Run soffice in headless mode

/usr/bin/soffice -headless -nofirststartwizard -accept=”socket,host=localhost,port=8100;urp;StarOffice.Service”


3. Uncomment the lines in execution.scala that are commented “REMOVED_COS_OF_COS”

4. Reset your exports

export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export SCALA_HOME="/usr/share/java"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="/usr/bin:/usr/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java-5.1.10.jar"

4. Rebuild and Run.

cd /usr/share/etherpad/etherpad/
bin/rebuildjar.sh clearcache
/etc/init.d/etherpad stop
/etc/init.d/etherpad start
Note, in your etherpad.properties.local you should have the line:
etherpad.soffice = /usr/bin/soffice
It is important so don’t forget it.

Etherpad on Android based devices

etherpad_on_android
This isn’t working yet, nor is it working on the iphone.  It is because the web browser that comes on these devices does not have the correct support for the Etherpad objects.  You can however view pads in read only by browsing to the usual URL.

We expect more mobile support in late 2010 but it may not be something we can change server side, it may be dependant on the client device browser implementing designMode. Opera Mini now has partial support for designMode however I haven’t tested Etherpad with it. *Update 31/03/2010 – This doesn’t work

iPhone claims to have support for this but of course it doesn’t work.

Android’s web browser is built on the WebKit application Framework.  Optional browsers Steel and Dolphin do not appear to support designMode at current.

Find out more about Etherpad

How to push changes to your Etherpad using Git and Github (Debian)

apt-get install git-core 

Goto http://github.com/redhog/pad
Click Fork
Go to http://github.com/YOURUSERNAME/pad
Copy the git@github.com:YOURUSERNAME/pad.git
IE (

git clone git@github.com/johnyma22/pad.git

)
Set the comment.

git commit -a -m "Added Hello World" 
git remote rm origin 
git remote add origin git@github.com:YOURUSERNAME/pad.git 

IE (

git remote add origin git@github.com:johnyma22/pad.gif

)

If you don’t already have an ssh key (

    ssh-keygen -t rsa 

use defaults
cat the path to the .pub (Copy the contents)_
Open up Github.com and login
Click Account settings
Click Add public Key
Give it a title (ie etherpad)
Paste the contents of the .pub file
)

git push

Done =)

Installing Etherpad on Debian

IMPORTANT NOTE: ETHERPAD HAS BEEN REPLACED BY ETHERPAD LITE. YOU SHOULD FOLLOW THIS GUIDE.

IMPORTANT NOTE: THIS DOCUMENTATION IS NOW DATED.  You can now install Etherpad from apt.

Installing Etherpad 1.0.1 with APT

Add the following line as a source in your graphical package manager (In Ubuntu: System->Administration->Synaptic package manager; then Settings->Repositories and then finally Third party software), or edit the file /etc/apt/sources.list and add it there.

deb http://apt.etherpad.org all .
apt-get update
apt-get install etherpad

Answer the questions (if any, depends on your system settings)

/etc/init.d/etherpad start

Other Linux distributions
Download the .tgz and unpack it
Follow instructions in README 🙂

BELOW IS THE OLD GUIDE for Etherpad V1 released by Google

Install prereqs

echo "deb http://ftp.de.debian.org/debian sid main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install sun-java6-jdk

If the above fails then do not continue.  The output of

java -version

Should read..

java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
apt-get install scala mysql-server libmysql-java mercurial

Paste the below to /etc/profile

export PATH
export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export SCALA_HOME="/usr/share/java"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="/usr/bin:/usr/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java-5.1.10.jar"
export JAVA_HOME SCALA_HOME JAVA SCALA MYSQL_CONNECTOR_JAR PATH
umask 022

Download the etherpad source to /usr/local/etherpad

hg clone https://etherpad.googlecode.com/hg/ /usr/local/etherpad

Set the environment variables

export JAVA_HOME="/usr/lib/jvm/java-6-sun"
export SCALA_HOME="/usr/share/java"
export JAVA="/usr/bin/java"
export SCALA="/usr/bin/scala"
export PATH="/usr/bin:/usr/bin:/usr/local/mysql/bin:$PATH"
export MYSQL_CONNECTOR_JAR="/usr/share/java/mysql-connector-java-5.1.10.jar"

Add your domain to the superdomain section


nano /usr/local/etherpad/trunk/etherpad/src/etherpad/globals.js

Search for etherpad.com and replace it with your domain (confused? You will figure it out)

Create the etherpad mysql db and privelidges

mysql -u root -p

Enter your password when prompted

create database etherpad;
grant all privileges on etherpad.* to 'etherpad'@'localhost' identified by 'password';
quit
cd /usr/local/etherpad/trunk/etherpad/
ln -s /usr/share/java /usr/share/java/lib
bin/rebuildjar.sh
bin/run-local.sh

Wait quite a while while it builds.

Test by browsing to your server at http://hostnameofserver:9000

Making pro work…

Make sure it doesn’t redirect to etherpad.com for pro

Edit /usr/local/etherpad/trunk/etherpad/src/main.js

Replace all instances of Etherpad.com with yourdomain.com

Edit /usr/local/etherpad/trunk/etherpad/src/static/crossdomain.xml

Add to the obvious section


<allow-access-from domain="yourdomain.com" to-ports="*"/>

<allow-access-from domain="*.yourdomain.com" to-ports="*"/>

Edit /usr/local/etherpad/trunk/etherpad/src/etherpad/pro/pro_utils.js

Replace

var fromDomain = 'etherpad.com';

with

var fromDomain = 'yourdomain.com';

Note: Originally published on the 19th of Dec 2009, Revised on the 10th of March 2010

Etherpad CentOS installation

Nuba has written a fantastic guide for installing Etherpad onto CentOS – I recommend you follow that before reading this.

My problem is that the JAR wouldn’t compile on my box.

I ran into a problem, my box wouldn’t let me use fsc (Fast Scala Compiler) so I had to change the fsc references to use scalac(Scala Compiler) then I could compile the JAR.  I also had to use JAR instead of FastJAR

This isn’t a guide as such, just an overview of how I fixed the problems I had.