Home

openoffice startup script

You are here

11 posts / 0 new
Last post
openoffice startup script

I can't get openoffice to start as part of the Alfresco startup script. I'm using OpenOffice 2.3 and followed the steps from here:

http://wiki.alfresco.com/wiki/Running_OpenOffice_From_Terminal

I'm not sure I totally understand the syntax of this command:

$ sudo -H -u alfresco /usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" 
-nologo -headless -nofirststartwizard

I am guessing this is asking to execute the soffice program as the user "alfresco". How do I know if the alfresco user is running tomcat?

If I try to launch it from the command line (by entering the code above) I get an error..."Could Not Find a Java Runtime Enviornment).

Blech...

Re: openoffice startup script

Hi ,

Quote:
"Could Not Find a Java Runtime Enviornment).

Will be solved by installing open office by calling : $sudo apt-get install openoffice.org to re-install open office.
Best regards


Mehdi BELLMEKKI
Technical Consultant
Professional Service
Alfresco Software Ltd

Re: openoffice startup script

I'll try that. I've currently got the headless version installed, so I'm removing that and installing the openoffice.org package. I'll post back with the results.

Thanks!

Re: openoffice startup script

OK. Removed the headless version and installed the openoffice.org package using apt-get. When I tried launching OO from the command line I got this error:

/usr/lib/openoffice/program/soffice.bin X11 error: Can't open display: 
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)

So I removed openoffice.org and re-installed the headless version. When I try and start it from the command line I get nothing...the cursor just sits there with no error or other output (like its caught in a loop or something).

How much space should the openoffice.org-headless install require?

The Linux installer binary does not work for me, so I've done this install the "Linux Way".

:?

Re: openoffice startup script

Hi,
please try to change this line :

$ sudo -H -u alfresco /usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"
-nologo -headless -nofirststartwizard

by this :
$ sudo -H -u alfresco /usr/bin/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"
-nologo -headless -nofirststartwizard

After starting alfresco , perform a scan port , if 8100 is open then OO is OK , else will try another trick.
Good luck


Mehdi BELLMEKKI
Technical Consultant
Professional Service
Alfresco Software Ltd

Re: openoffice startup script

If I run:
echo $JAVA_HOME

I get this:

/usr/lib/jvm/java-6-sun

So that's where Java is...yes?

Re: openoffice startup script

My portscan results...

Port Scanning host: <myhost>
 
	 Open TCP Port: 	22     		ssh
	 Open TCP Port: 	25     		smtp
	 Open TCP Port: 	53     		domain
	 Open TCP Port: 	110    		pop3
	 Open TCP Port: 	111    		sunrpc
	 Open TCP Port: 	143    		imap
	 Open TCP Port: 	993    		imaps
	 Open TCP Port: 	995    		pop3s
	 Open TCP Port: 	1139
	 Open TCP Port: 	1445   		proxima-lm
	 Open TCP Port: 	1723   		pptp
	 Open TCP Port: 	8080   		http-alt
	 Open TCP Port: 	39846
	 Open TCP Port: 	49689
	 Open TCP Port: 	50500
Port Scan has completed ...

Re: openoffice startup script

Another portscan after starting OO from the terminal:

~# netstat -antuwp | egrep "(^[^t])|(^tcp.*LISTEN)"
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN     5060/dovecot        
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN     5060/dovecot        
tcp        0      0 127.0.0.1:8100          0.0.0.0:*               LISTEN     6322/soffice.bin    
tcp        0      0 0.0.0.0:39846           0.0.0.0:*               LISTEN     4001/rpc.statd      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     4838/mysqld         
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN     5060/dovecot        
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN     5060/dovecot        
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     3983/portmap        
tcp        0      0 172.16.1.25:53          0.0.0.0:*               LISTEN     4641/named          
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     4641/named          
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     4762/cupsd          
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     4993/master         
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN     4641/named          
tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN     5011/pptpd          
tcp6       0      0 :::50500                :::*                    LISTEN     5887/java           
tcp6       0      0 ::ffff:127.0.0.1:8005   :::*                    LISTEN     5887/java           
tcp6       0      0 :::1445                 :::*                    LISTEN     5887/java           
tcp6       0      0 :::8080                 :::*                    LISTEN     5887/java           
tcp6       0      0 :::1139                 :::*                    LISTEN     5887/java           
tcp6       0      0 :::53                   :::*                    LISTEN     4641/named          
tcp6       0      0 :::22                   :::*                    LISTEN     4666/sshd           
tcp6       0      0 :::49689                :::*                    LISTEN     5887/java           
tcp6       0      0 :::25                   :::*                    LISTEN     4993/master         
tcp6       0      0 ::1:953                 :::*                    LISTEN     4641/named          
udp        0      0 0.0.0.0:32768           0.0.0.0:*                          4001/rpc.statd      
udp        0      0 0.0.0.0:32769           0.0.0.0:*                          4641/named          
udp        0      0 0.0.0.0:32771           0.0.0.0:*                          4723/avahi-daemon:  
udp        0      0 0.0.0.0:785             0.0.0.0:*                          4001/rpc.statd      
udp        0      0 172.16.1.25:53          0.0.0.0:*                          4641/named          
udp        0      0 127.0.0.1:53            0.0.0.0:*                          4641/named          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          4723/avahi-daemon:  
udp        0      0 0.0.0.0:111             0.0.0.0:*                          3983/portmap        
udp6       0      0 :::32770                :::*                               4641/named          
udp6       0      0 :::32773                :::*                               5887/java           
udp6       0      0 :::53                   :::*                               4641/named          
udp6       0      0 :::1137                 :::*                               5887/java      

Re: openoffice startup script

hi,
try to use -display otpion like this :

/usr/bin/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -display :0 -nologo -headless -nofirststartwizard &

it works for me.
best regards


Mehdi BELLMEKKI
Technical Consultant
Professional Service
Alfresco Software Ltd

Re: openoffice startup script

Tried this and this is the output I got:

~# Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Re: openoffice startup script

boy412 wrote:
Tried this and this is the output I got:

~# Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Hello , Try this : $xhost -ac then execute your script. If it did nt solve the problem , use this : $ Xvfb :5 -screen scrn 800x600x16 & $xhost -ac $ soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.NamingService" -headless -display :5.0 -nofirststartwizard ( change the last line by specifying your soffice path ) Best regards .


Mehdi BELLMEKKI
Technical Consultant
Professional Service
Alfresco Software Ltd