maldito.orco Blogo

Saturday, October 18, 2008

Sync iPhone 3G with Google Calendar

This tutorial explain how to sync iphone 3g with Google Calendar!! Excellent!!

http://www.ianfernando.com/2008/sync-google-calendar-with-iphone-3g/

Labels: , , ,

Wednesday, August 20, 2008

Script to Shutdown a OAS instance with status info

This pair of scripts (shutdown/startup) of Oracle Application Server (OAS) realize the task together. The shutdown script store the OC4Js status prior shutdown opmn.

The startup script, start opmn and each OC4J stored on shutdown. (plus OHS).

Its really simply, to give us a framework where initial start our work.

enjoy!.


shutdown_OAS.sh
===============
#!/bin/bash
#

if [ "_${1}" = "_" ]; then
echo "Error: el script necesita de un ORACLE_HOME de un OAS como parametro de entrada"
exit 1
fi

OH=$1
ORACLE_HOME=$1
PATH=$OH/bin:$OH/opmn/bin:$OH/dcm/bin:$OH/OPatch:$OH/jdk/bin:$PATH

if [ ! -d $OH ]; then
echo "Error: el ORACLE_HOME=$OH no es un directorio valido"
exit 1
fi

if [ ! -x $OH/opmn/bin/opmnctl ]; then
echo "Error: no se encontro el ejecutable ORACLE_HOME/opmn/bin/opmnctl"
exit 1
fi

##
## seteo instance name
INAME=`opmnctl status | grep "Processes in Instance:" | awk '{print $4}' | awk -F. '{print $1}'`
##
## obtengo lista de oc4js activos
OC4J_ACTIVE_LIST=`grep "process-type" $ORACLE_HOME/opmn/conf/opmn.xml | grep OC4J | grep --invert-match "disabled" | awk '{ print $2 }' | awk -F= '{ print $2 }' | awk -F\" '{ print $2 }'`
##
## vaciar archivo
$INAME.oc4jalive.txt
##
## iterar cada uno de la lista de enableds del opmn.xml viendo si esta Active en el status
for i in $OC4J_ACTIVE_LIST; do
STATUS=`opmnctl status -fmt %prt%sta | grep -e "\(OC4J:\)\?$i " | uniq | awk '{print $3}'`
echo ST=$i[$STATUS]
if [ "$STATUS" = "Alive" ]; then
echo $i >> $INAME.oc4jalive.txt
fi
done
##
## bajo OAS
opmnctl shutdown
##
## si es un R2 y esta el comando emctl bajo aparte la consola
if [ -x $OH/bin/emctl ]; then
emctl stop iasconsole
fi

startup_OAS.sh
==============
#!/bin/bash
#

if [ "_${1}" = "_" ]; then
echo "Error: el script necesita de un ORACLE_HOME de un OAS como parametro de entrada"
exit 1
fi

OH=$1
ORACLE_HOME=$1
PATH=$OH/bin:$OH/opmn/bin:$OH/dcm/bin:$OH/OPatch:$OH/jdk/bin:$PATH

if [ ! -d $OH ]; then
echo "Error: el ORACLE_HOME=$OH no es un directorio valido"
exit 1
fi

if [ ! -x $OH/opmn/bin/opmnctl ]; then
echo "Error: no se encontro el ejecutable ORACLE_HOME/opmn/bin/opmnctl"
exit 1
fi

##
## start opmn process
opmnctl start
##
## seteo instance name
INAME=`opmnctl status | grep "Processes in Instance:" | awk '{print $4}' | awk -F. '{print $1}'`
##
## iterar cada componente levantandolo
for i in `cat $INAME.oc4jalive.txt`; do
opmnctl startproc process-type=$i
done
##
## carga del OHS
opmnctl startproc process-type=HTTP_Server
##
## carga del dcm-daemon (solo para R2, en R3 da error)
opmnctl startproc ias-component=dcm-daemon
##
## si es un R2 y esta el comando emctl bajo aparte la consola
if [ -x $OH/bin/emctl ]; then
emctl start iasconsole
fi









Labels: , , , ,

Thursday, August 07, 2008

I try to activate MP3 profile on "Output Format" (on Sound Juicer) or "Preferred Format" (on Rhythmbox) without success.

I'm using Ubuntu 8.04, upgrade from 7

The only thing I need to do was:

apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse

I get help from:
http://ubuntuforums.org/showthread.php?t=957&page=5

"Originally Posted by Jacob Bezemer View Post
Ubuntu: Ripping in mp3 with id3 tags
By default, ubuntu does not come with this enabled. To add functionality to rip mp3's in ubuntu with sound juicer with id3 tags, lets do the following.

1. Install the necessary gstreamer packages:
# apt-get install gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse
2. Load sound juicer, go to Edit->Preferences
3. Under Format, choose Edit Profiles, and click New.
4. For Profile name, pick mp3 and hit Create.
5. Then click on the mp3 profile and click Edit.
6. Change the gstreamer pipeline to the following:
audio/x-raw-int,rate=44100,channels=2 ! lame name=enc ! id3mux
7. Then set the File Extension to "mp3".
8. Click on the checkmark box "Active?" then click Ok.
9. Hit Close on the Edit profiles screen.
10. You will need to exit the sound juicer application and restart it.
11. After reloading sound juicer, go back to Edit->Preferences and under the Output format section, you will now be able to set the newly created mp3 profile you created.

This will create mp3 files with a bitrate of 128 kb/s. Now stick in your cd's and you should be ready to go! If you are using another cd extracting program which uses gstreamer, this functionality should work fine as you just added a new gstreamer profile to the system, not specifically to sound juicer.
Tested under dapper."


Thxs Ubuntu Forum and Community!!

Labels: , , , , , ,

Sunday, July 29, 2007

Ciclo Completo de las Fundaciones

Historias de Robots
1954 - The Caves of Steel (Bobedas de Acero)
1957 - The Naked Sun (El Sol Desnudo)
1983 - The Robots of Dawn (Los Robots del Amanecer)
1985 - Robots and Empire (Robots e Imperio)

El Imperio Galáctico
1951 - The Stars, Like Dust (En la arena estelar)
1952 - The Currents of Space (Las corrientes del espacio)
1950 - Pebble in the Sky (Un guijarro en el cielo)

Ciclo de la Fundación
1988 - Prelude to Foundation (Preludio a la Fundación)
1993 - Forward the Foundation (Hacia la Fundación)
1951 - Foundation (Fundación)
1952 - Foundation and Empire (Fundación e Imperio)
1953 - Second Foundation (Segunda Fundación)
1982 - Foundation's Edge (Los Límites de la Fundación)
1986 - Foundation and Earth (Fundación y Tierra)

Relacionadas
1955 - The End of Eternity (El fin de la eternidad)

Referencias
Wikipedia

Tuesday, February 13, 2007

Running VMWare Workstation on an Ubuntu upgraded to 6.10

I upgrade my Ubuntu 6.06 to 6.10 and VMWare Workstation don't run anymore!

This is because vmmon need compile again. When you run /usr/bin/vmware-config.pl for compile vmmon this tool finish with the following error.


Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config2/vmmon-only'
make -C /usr/src/linux/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.17-10-386'
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config2/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config2/vmmon-only/linux/driver.c:49:
/tmp/vmware-config2/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config2/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config2/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config2/vmmon-only/linux/driver.c:49:
/tmp/vmware-config2/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:62: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config2/vmmon-only/linux/driver.c:145: warning: initialization from incompatible pointer type
/tmp/vmware-config2/vmmon-only/linux/driver.c:149: warning: initialization from incompatible pointer type
make[2]: *** [/tmp/vmware-config2/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config2/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.17-10-386'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config2/vmmon-only'
Unable to build the vmmon module.


Don't panic!!

Use:

Thursday, October 12, 2006

Profiling tool

This a tool for proof a j2ee application . The first tool is a ServletFilter, this filter log to standard output.
The second part of the tool is a secuence of shell scripts for parsing the filter log and create reports.

Servlet Filter (RequestProfilerFilter.java)
package com.oracle.ar.proftools.web;

//log4j
//import org.apache.log4j.Logger;
//servlet
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;

/**
* Created: Aug 11, 2006, 6:33:12 PM
* Last Modification Date: $Date$
*
* @author maldito_orco (maldito_orco@users.sourceforge.net)
* @version $Revision$
*/
public class RequestProfilerFilter implements Filter {
public static final String RCS_ID = "$Header$";
//private static Logger logger = Logger.getLogger(RequestProfilerFilter.class);

public static final String BLANK = " ";
public static final String LINE_PREFIX = "+++ ";
public static final int LINE_PREFIX_LENGTH = LINE_PREFIX.length();
public static final String NOVALUE = "-";
public static final String REMOTE_USER_PREFIX = "bue/";
public static final int REMOTE_USER_PREFIX_LENGTH = REMOTE_USER_PREFIX.length();
public static final String EXP = "EXP";
public static final String EXPINT = "INT";

private static int concurrent = -1;
private static final Object concurrentMutex = new Object();

private FilterConfig filterConfig = null;
private StringBuffer sb = new StringBuffer();

//
// apache format: [14/Aug/2006:16:29:15 -0300]
private DateFormat df = new SimpleDateFormat("[dd/MMM/yyyy:HH:mm:ss Z]");


public RequestProfilerFilter() {
sb.append(LINE_PREFIX);
}

public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
}

public void destroy() {
filterConfig = null;
}

public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
//
// calculate concurrent
int thisConcurrency;
synchronized(concurrentMutex) {
thisConcurrency = ++concurrent;
}
//
// get now (Date)
Date now = Calendar.getInstance().getTime();
//
// get time after execution
long begin = System.currentTimeMillis();
//
// process request
String exception = NOVALUE;
try {
filterChain.doFilter(servletRequest,servletResponse);
} catch (IOException e) {
exception = EXP;
throw e;
} catch (ServletException e) {
exception = EXP;
throw e;
} finally {
//
// get time after execution
long end = System.currentTimeMillis();
String URI = null;
String method = null;
String protocol = null;
String user = null;
String sessionid = null;
try {
//
// get request info
HttpServletRequest httpServletRequest = (HttpServletRequest)servletRequest;
URI = httpServletRequest.getRequestURI();
method = httpServletRequest.getMethod();
protocol = httpServletRequest.getProtocol();
//
// get response info
//HttpServletResponse httpServletResponse = (HttpServletResponse)servletResponse;
//httpServletResponse.
//
// get user
user = httpServletRequest.getRemoteUser();
if (user==null)
user = NOVALUE;
else
if (user.startsWith(REMOTE_USER_PREFIX))
user = user.substring(REMOTE_USER_PREFIX_LENGTH).toUpperCase();
//
// get sessionid
HttpSession session = httpServletRequest.getSession(false);
if (session!=null)
sessionid = session.getId();
else
sessionid = NOVALUE;
} catch (Exception e) {
exception =EXPINT;
}
//
// print results (like apache format)
// 167.252.7.177 - FLTOMASZ [14/Aug/2006:16:29:16 -0300] "GET /BaseCero2007/images/burbujas.jpg HTTP/1.1" 200 2709
//
// clear buffer
if (sb.length()>=LINE_PREFIX_LENGTH)
sb.delete(LINE_PREFIX_LENGTH,sb.length());
//
// add user
sb.append(user);
sb.append(BLANK);
//
// add date
sb.append(df.format(now));
sb.append(BLANK);
//
// add request
sb.append("\"");
sb.append(method);
sb.append(" ");
sb.append(URI);
sb.append(" ");
sb.append(protocol);
sb.append("\" ");
//
// process millis
sb.append(end-begin);
sb.append(BLANK);
//
// begin millis
sb.append(begin);
sb.append(BLANK);
//
// end millis
sb.append(end);
sb.append(BLANK);
//
// concurrency
sb.append(thisConcurrency);
sb.append(BLANK);
//
// sessionid
sb.append(sessionid);
sb.append(BLANK);
//
// exception
sb.append(exception);
//
// print log
System.out.println(sb.toString());
//
// decrement concurrent
synchronized(concurrentMutex) {
--concurrent;
}
}
}
}


Master Shell Script
#!/bin/bash
#
. /home/oracle/bin/setEnvMt10gR2.sh

APPNAME=BaseCero2007

HOST=`hostname | awk -F"." ' { print $1 }'`
DATE=`date +%Y%m%d`
DATEALL=`date +%Y%m%d%H%M%S`
DATELS=`date +'%b %d'`
BASE_DIR=/Backup/monitoreo/logs
DIR=$BASE_DIR/$DATE


if [ ! -d "$DIR" ]
then
mkdir $DIR
fi

if [ ! -d "$DIR/opmn" ]
then
mkdir $DIR/opmn
fi

if [ ! -d "$DIR/apache" ]
then
mkdir $DIR/apache
fi

if [ ! -d "$DIR/oc4j" ]
then
mkdir $DIR/oc4j
fi

if [ ! -d "$DIR/app" ]
then
mkdir $DIR/app
fi
##
##
# copy and clear log opmn
cp -v $ORACLE_HOME/opmn/logs/OC4J~OC4J_$APPNAME~default_island~1 $DIR/opmn/$HOST.$DATEALL.OC4J~OC4J_$APPNAME~default_island~1
echo > $ORACLE_HOME/opmn/logs/OC4J~OC4J_$APPNAME~default_island~1

##
##
# copy log apache
for i in `ls -ltr $ORACLE_HOME/Apache/Apache/logs | grep "$DATELS" | awk '{ print $9 }'`
do
cp -v $ORACLE_HOME/Apache/Apache/logs/$i $DIR/apache/$HOST.$DATEALL.$i
done

##
##
# copy and clear log oc4j
for i in `ls $ORACLE_HOME/j2ee/OC4J_$APPNAME/log/OC4J_"$APPNAME"_default_island_1`
do
if [ -f $ORACLE_HOME/j2ee/OC4J_$APPNAME/log/OC4J_"$APPNAME"_default_island_1/$i ]
then
cp -v $ORACLE_HOME/j2ee/OC4J_$APPNAME/log/OC4J_"$APPNAME"_default_island_1/$i $DIR/oc4j/$HOST.$DATEALL.$i
echo > $ORACLE_HOME/j2ee/OC4J_$APPNAME/log/OC4J_"$APPNAME"_default_island_1/$i
fi
done

##
##
# copy and clear log app
cp -v $ORACLE_HOME/j2ee/OC4J_$APPNAME/application-deployments/"$APPNAME"APP/OC4J_"$APPNAME"_default_island_1/"$APPNAME"-OC4J-APP.log $DIR/app/$HOST.$DATEALL."$APPNAME"-OC4J-APP.log
echo > $ORACLE_HOME/j2ee/OC4J_$APPNAME/application-deployments/"$APPNAME"APP/OC4J_"$APPNAME"_default_island_1/"$APPNAME"-OC4J-APP.log

##
##
# runs stats
$BASE_DIR/stats.sh $DATE


Stats Shell Script (stats.sh)
#!/bin/sh
#

if [ ! $1 ]; then
echo "usage stats.sh YYYYMMDD"
echo "sample: dorank.sh 20060801"
exit 0
fi

if [ ! $ORACLE_HOME ]; then
echo "Please set ORACLE_HOME "
exit 0
fi

if [ -d "$DIR" ]
then
rm -rf $DIR/stats
fi

DATE=$1
BASE_DIR=/Backup/monitoreo/logs
DIR=$BASE_DIR/$DATE

if [ ! -d "$DIR" ]
then
echo "Directory not exists $DIR"
exit 0
fi

if [ -d "$DIR/stats" ]
then
rm -rf $DIR/stats
fi
mkdir $DIR/stats

for i in `ls $DIR/opmn`
do
##
## extraccion del log del oracle-proftool
cat $DIR/opmn/$i | $BASE_DIR/filter-proftool.sh > $DIR/stats/$i.proftool
# generar req x action
cat $DIR/stats/$i.proftool | $BASE_DIR/dorank.sh > $DIR/stats/$i.req_x_action
# generar actions
cat $DIR/stats/$i.req_x_action | awk '{ print $2 }' | awk 'BEGIN { FS="/" } { print $3 }' > $DIR/stats/$i.actions
# generar stat x action
$BASE_DIR/dorankext.sh $DIR/stats/$i.proftool $DIR/stats/$i.actions > $DIR/stats/$i.stat_x_action
# generar req x ususrio
cat $DIR/stats/$i.proftool | awk '{ print $4}' | sort | uniq -c > $DIR/stats/$i.req_x_user
# generar concurrent rank
cat $DIR/stats/$i.proftool | awk '{ print $13}' | sort -n | uniq -c > $DIR/stats/$i.concurrent_rank

##
## extracion del log del GC
cat $DIR/opmn/$i | $BASE_DIR/filter-jvmgc.sh > $DIR/stats/$i.gc
done


Stats AWK Script (stats.awk)
BEGIN {
total=0;
avg=0;
max1=0;
max2=0;

ni=0;
}

{
if (ni==0) {
# Me
nme=nnr/2;
if(nme<1) nme="1;
# Q1
nq1=nnr/4;
if(nq1<1) nq1="1;
# Q3
nq3=(3*nnr)/4;
if(nq3<1) nq3="1;
# P10
np10=(9*nnr)/10;
if(np10<1) np10="1;
}
++ni;
total+=$10;
#
# Me
if(ni>=nme && ni<(nme+1)) me=$10
#
# Q1
if(ni>=nq1 && ni<(nq1+1)) q1=$10
#
# Q3
if(ni>=nq3 && ni<(nq3+1)) q3=$10
#
# P10
if(ni>=np10 && ni<(np10+1)) p10=$10
#
# maxs
if (max1<$10) {
max2=max1;
max1=$10
}
else {
if(max2<$10) {
max2=$10
}
}
}

END {
avg=total/NR;
print $8,NR,total,avg,max1,max2,nq1,q1,nme,me,nq3,q3,np10,p10
}


ServlterFilter Log Filter Shell Script (filter-proftool.sh)
#!/bin/sh
#
grep -e "^[0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] +++ [A-Za-z0-9-]* \[[0-9][0-9]/[A-Z][a-z][a-z]/[0-9]\{4\}:[0-9][0-9]:[0-9][0-9]:[0-9][0-9] [-+][0-9]\{4\}\] \"[A-Z]\{3,4\} /[A-Za-z0-9/._-]* HTTP/1.1\" [0-9]* [0-9]* [0-9]* [0-9]* [A-Za-z0-9-]* [A-Z-]\{1,3\}"


Garbage Collector Log Filter Shell Sctipt (filter-jvmgc.sh)
#!/bin/bash
#
grep -e "K->"


Ranking Shell Script (dorank.sh)
#!/bin/sh
#
awk '{ print $8 }' | grep '/BaseCero' | sort | uniq -c | sort -n


Ranking Extendido Shell Script (dorankext.sh)
#!/bin/sh
#

ACTIONS=`cat $2`

for i in $ACTIONS
do
#echo Procesing $i
grep "/$i" $1 > $1.$i
sort -n --key=10 $1.$i > $1.$i.sort
NNR=`wc -l $1.$i.sort | awk '{print $1}'`
#echo 'awk -f ./stats.awk nnr='$NR' $1.$i.sort'
awk -f ./stats.awk nnr=$NNR $1.$i.sort
#cat $1 | grep "/$i" | awk 'BEGIN { total=0; avg=0; max1=0; max2=0 } { total+=$10; if (max1<$10){max2=max1;max1=$10} else { if(max2<$10){max2=$10} } } END { avg=total/NR; print $8,NR,total,avg,max1,max2 }'
done


Report Shell Script (viewstat.sh)
(printf "REQUEST FR TOTAL(ms) AVG(ms) MAX1(ms) MAX2(ms) #Q1 Q1(ms) #ME ME(ms) #Q3 Q3(ms) #P10 P10(ms)\n"; cat $1/stats/*.stat_x_action | sort -n --key=3) | column -t

Creating a script for route connections to a vmware

# Purpose: Route request from external machines to vmware
# Execute: as root: ./rr
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F -t nat
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
#iptables -A FORWARD -i eth0 -p tcp -s 192.168.122.128 --dport 80 -j ACCEPT
#iptables -t nat -A PREROUTING -p tcp -d 10.157.228.222 --dport 9700 -j DNAT --to 192.168.122.129:9700
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 167.252.7.212 --dport 80 -j DNAT --to 192.168.251.128:80
iptables -t nat -A POSTROUTING -o vmnet8 -j SNAT --to 192.168.251.1
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 167.252.7.212 --dport 9700 -j DNAT --to 92.168.251.128:9700

Tuesday, May 23, 2006

Impress 2.0.2 hangs on Ubuntu 5.10 when opening files

Mi OpenOffice Impress se colgaba cuando convertia ppts grandes (en realidad en casi todos), lo mostraba pero cuando terminaba de renderizar se colagaba al punto de tener que obligar a cerrar (kill). Estoy usando Ubuntu 5.10 "Breezy Badger"

Encontre lo que transcribo aqui:
http://www.oooforum.org/forum/viewtopic.phtml?t=36797&sid=0ffd9cdad0e45cb35f36affad1dd98f4

"
Posted: Fri May 19, 2006 5:05 am Post subject: Impress 2.0.2 hangs on Ubuntu 5.10 when opening files

Hi,

I recently upgraded from OOo 1.1.5 to 2.0.2 (from the OOo website - not Debian or Ubuntu .debs). Since the upgrade I have been unable to open any powerpoint files, or any SXI or ODP files that are of a reasonable size or have been converted to or from ppt. Impress hangs with the document partially open, i.e. slides in the slide sorter are not read/rendered and the application becomes completely unresponsive and needs to be forced to quit. By contrast if I reinstall OOo 1.1.5 I can open all the documents and everything is fine.

I have ensured that there are no reminents of old OOo installations, i.e. verified deletion of every file etc. Also had 1.1.5 and 2.0.2 coexist, basically 1.1.5 works and 2.0.2 doesn't.

The same files can be opened on OOo 2.0 on Windows XP without a problem at all (though animations etc. don't always convert well). Even then when resaved to ODP format etc., they still won't open on my Ubuntu PC.

Any ideas? As I said I am using the latest (as of yesterday) version of OOo 2.0.2 from the OOo website, I don't want to go back to 1.1.5 simply because 2.0.2 is easier to use.

Thanks in advance for any help anyone can give me.

Cheers

Alan


Posted: Sat May 20, 2006 10:52 am

Found the answer. For those that need it, simply add
export MALLOC_CHECK_=2

to /usr/bin/openoffice.org-2.0
i.e. the script that calls /jusr/bin/soffice.
That's it - simple!

"

El archivo /usr/bin/openoffice.org-2.0 no se encuentra, en vez de ese se utiliza el /usr/bin/ooffice2, pero es un script perl.

Buscando con el ps descubrí que el shell script maestro del Open Office es /usr/lib/openoffice2/program/soffice, por lo que agregé la definicion de la variable al comienzo del script.

done.