cancel
Showing results for 
Search instead for 
Did you mean: 

Installing OpenOffice via Xvfb

hikenboots
Champ in-the-making
Champ in-the-making
I installed Xvfb on Fedora Core 4 via yum install Xvfb per http://www.alfresco.org/mediawiki/index.php/Installing_on_Linux

When it starts I see sever errors as such:
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!

I've been scouring google trying out whay to do next.  How do you access the gui?  Am I supposed to use a viewer of some sort?  I'm sure others have installed openoffice to a headless linux machine, please help.

Update:
I got rid of the font error by passing a font directoy parameter:
Xvfb -fp /usr/X11R6/lib/X11/fonts/misc :1 -screen 0 800x600x16 -fbdir /usr/src &

Also had to allow connections to xvfb by:
[root@home program]# xhost local:
[root@home program]# xhost +

I can get openoffice to start by dropping the -headless parameter:
[root@home program]# ./soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo  -display :1 &
[3] 21819
[root@home program]# ps -a
  PID TTY          TIME CMD
11787 pts/0    00:00:01 Xvfb
21819 pts/0    00:00:00 soffice
21830 pts/0    00:00:01 soffice.bin
21977 pts/0    00:00:00 ps
[root@home program]#

I still have no clue how to manipulate the program from here I've dug all around openoffoce.org and only found a bunch of circular posting with no hard answers.  Looking for a paradigm here.. I dont want to have to install X on my nice unbloated server…..
3 REPLIES 3

hikenboots
Champ in-the-making
Champ in-the-making
OK here's how to do it.  Took me all day to figure it out…

A point of confusion for me was that Xvfb is used for installing openoffice and for running openoffice once it is installed. I couldn't get openoffice to run without the -display parameter, at least.

Get a windows x client if you are working from a windows workstation, connect to your server over ssh.  1. You need to register openoffice before it'll work and you have to do it graphically.  2. Afterwards, you need Xvfb to give it a "GUI" with which to interface to make it run.

Install MI/X  (used as a windows X client) on your pc ( http://www.microimages.com/mix/download.htm )

In PUTTY (your ssh client), check SSH/Tunnels/Enable X11 Forwarding before logging in to your linux box.  Then log in (as root).

Download and move openoffice (linuxversion w/ no jre) to /usr/src. (currently it is OOo_2.0.1_LinuxIntel_install.tar.gz)

tar xvf OOo_2.0.1_LinuxIntel_install.tar.gz

cd into unpacked directory/RPMS

mv openoffice.org-gnome-integration-2.0.1-1.i586.rpm openoffice.org-gnome-integration-2.0.1-1.i586.off (we don't want it, has dependencies)

rpm -Uvih *rpm

rpm -qa | grep xorg | sort

if you don't have xorg-x11-Xvfb-… then yum install it

Rename zstart_oo.sh to start_oo.sh and modify as below:
#!/bin/sh
# —————————————————————————
# Start script for the OpenOffice transform service
# —————————————————————————
export DISPLAY=:1
echo "Starting Xvfb…"
`/usr/X11R6/bin/Xvfb -fp /usr/X11R6/lib/X11/fonts/misc :1 -screen 0 800x600x16 -fbdir /usr/src` &
echo "Starting OpenOffice service…"
cd /opt/openoffice.org2.0/program
/opt/openoffice.org2.0/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager -nologo -headless -display :1"  &

(note: I got errors about missing fonts so I added -fp /usr/X11R6/lib/X11/fonts/misc to change the fonts dir.  YMMV)

Open MI/X on your pc.

in PUTTY:
[root@hq ~]# xterm

You'll get a terminal window in MI/X

in that MI/X terminal window:
cd /opt/openoffice/programs
./soffice and follow the steps to register
Close openoffice and exit xterm.

start alfresco and in ps -A you should see:
soffice
soffice.bin

You should be good to go. 

I hope this accurate from my notes. It is late and I'm tired.  No regard has beeen made to security (i.e. 'xhost +': don't run it on an unsecured network without locking it down.)  Make changes, correction, post them back and enjoy.  Hope this saves someone some hours.

rbramley
Champ in-the-making
Champ in-the-making
You don't actually have to register OpenOffice, as mentioned in the OpenOffice project documentation (http://ui.openoffice.org/specification/product_registration.html), this can be customised or disabled by setting the (Common/Help/Registration/) URL value to an empty string (easy with some XPath).

If you look at C:\Program Files\OpenOffice.org 2.0\share\registry\data\org\openoffice\Office\Common.xcu or
/usr/lib/openoffice/share/registry/data/org/openoffice/Office/Common.xcu you'll see:

<oor:component-data oor:name="Common" oor:package="org.openoffice.Office" 
  xmlns:install="http://openoffice.org/2004/installation"
  xmlns:oor="http://openoffice.org/2001/registry"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    …
    <node oor:name="Help">
        <node oor:name="Registration">
            <prop oor:name="URL">
                <value>http://www.openoffice.org/welcome/registration20.html</value>
            </prop>
        </node>
    </node>
    …
</oor:component-data>

Hope this helps!

simon
Champ in-the-making
Champ in-the-making
Thanks RBramley, I had some troubles with this when I was installing OpenOffice on a terminal without GUI so this is useful feedback.

I added your reaction to the WIKI.  This could help some people in the future.