Open Office on FreeBSD 7

I am currently also running FreeBSD 7 on the Packard Bell EasyNote I was given by a friend. It is very fast and very stable, and the documentation is marvellous.

Using this machine for slide-show projection etc, I needed to get OpenOffice in some form running on it. This proved to be quite challenging, so here are some notes on the process.

The first attempt was a native install - an Open Office compiled on FreeBSD. No dice - finding a binary that would work, spending 12 hours compiling the Java JDK needed .... just too much pain.

But FreeBSD can run Linux binaries - here's how we do it!

First kernel support is needed for the Linux compatibility layer. Is it there? Does "kldstat" generate a line like

2 1 0xc08a3000 196c8 linux.ko
  ?

Then we're in business. If not then the simplest way is to load the module at boot time by adding

linux_load="YES"

to the file /boot/loader.conf

Next step is to obtain your Linux binary from the Open Office site - it will be something like

OOo_2.0.4_LinuxIntel_install.tar.gz

so then

mv OOo_2.0.4_LinuxIntel_install.tar.gz /usr/compat/linux/usr
cd /usr/compat/linux/usr
tar -xzf OOo_2.0.4_LinuxIntel_install.tar.gz

That should create a nice new directory, full of rpms. The current Linux packages for Open Office include the Java stuff needed to run OO.

cd newdirectory
rpm -Uvih —ignoreos —ignorearch —root /usr/compat/linux —nodeps .rpm

I was greeted with an error message first time I tried this.

"failed to open /usr/compat/linux/var/lib/rpm/packages.rpm"*

Ok - you want a file? You get a file!

mkdir /usr/compat/linux/var/lib/rpm
touch /usr/compat/linux/var/lib/rpm/packages.rpm

now the rpm command works and installs Open Office!

The almost-final touch:-

cd /usr/compat/linux
ln -s /var/tmp tmp

This stops OO trying to write files into a directory for which it lacks the right permissions.

THE final touch:-

# vim /usr/compat/linux/opt/openoffice.org2.4/program/soffice

then add

export OOO_FORCE_DESKTOP=gnome

just below the first block of comments (this file is only a shell script :-) This gives a nice gtk interface rather than the nasty MSloth look-a-like effort OO uses by default.

Back to FreeBSD page