| View previous topic :: View next topic |
| Author |
Message |
cshehadi Newbie

Joined: 11 Aug 2006 Posts: 2
|
Posted: Tue Sep 11, 2007 2:06 pm Post subject: debugging openoffice problems starting up as service |
|
|
Hi:
I'm trying to set up a sysv script that will launch soffice as a service at startup.
When my redhat 3.0 ES system is already booted, I can start the service without any trouble from the command line.
[root@staging init.d]# service soffice start
Starting OpenOffice service:[ OK ]
however, when I reboot my machine, openoffice does not start up on its own, even though it says it does in the boot log:
Sep 11 16:52:14 www Xvfb: Starting Xvfb:
Sep 11 16:52:14 www Xvfb:
Sep 11 16:52:14 www Xvfb: Allowing full local access
Sep 11 16:52:18 www Xvfb: non-network local connections being added to access control list
Sep 11 16:52:18 www rc: Starting Xvfb: succeeded
Sep 11 16:52:18 www echo: Starting OpenOffice service:
Sep 11 16:52:18 www soffice: OpenOffice startup succeeded
but it's not actually running:
[root@staging init.d]# pgrep -fl soffice
[root@staging init.d]#
my first question is - how can I debug this? how can I get some output that will tell me why it's failing? The bootlog says everything's fine. Does OpenOffice have it's own log somewhere that can point me toward solving this?
I'll post my sysv init script, but really to start off I just want to know where to look to figure out what's going on here.
#!/bin/bash
#
# chkconfig: 35 96 4
# description: Open Office
#
#Source function library.
. /etc/init.d/functions
export DISPLAY=localhost:1.0
start() {
initlog -c "echo -n Starting OpenOffice service: "
/usr/bin/soffice -norestore -headless -display localhost:1.0 -accept="socket,port=8100;urp" &
### touch the lock file ###
touch /var/lock/subsys/soffice
success $"OpenOffice startup"
echo
}
stop() {
initlog -c "echo -n Stopping soffice: "
killproc soffice
### Remove the lock file ###
rm -f /var/lock/subsys/soffice
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status soffice
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
-Charlie |
|
| Back to top |
|
 |
cshehadi Newbie

Joined: 11 Aug 2006 Posts: 2
|
Posted: Wed Sep 12, 2007 1:46 pm Post subject: solution |
|
|
Hi:
I found the solution. When then sysV init script is run, the HOME environment variable is set to '/'. OpenOffice looks in HOME for the user-specific files it needs to start up. so in order to start up OpenOffice from a sysV init script, you'll need to call:
env HOME=/root /usr/bin/soffice -norestore -headless -display localhost:1.0 -accept="socket,port=8100;urp" &
instead of:
/usr/bin/soffice -norestore -headless -display localhost:1.0 -accept="socket,port=8100;urp" &
(and you'll also have to make sure start the program up once from the command-line as root to initialize all those files in root's home directory. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|