LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2011, 09:35 AM   #1
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Rep: Reputation: 1
trying to start openoffice in linux


I am trying to start openoffice3 in linux ,failing with this error

Code:
[root@ACFAS11 ~]# /usr/lib64/openoffice.org3/program/soffice
/usr/lib64/openoffice.org3/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)
please advice me what is causing this and how to resolve this.
 
Old 11-29-2011, 11:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Hi,

Why are you trying to run soffice as root? You should run it as a normal user.
In any case, if you have logged in X as a normal user and then su to root to run soffice you need to do the following:
In an xterm as normal user run:
Code:
xhost +localhost
su -
export DISPLAY=:0.0
/usr/lib64/openoffice.org3/program/soffice
Regards
 
Old 11-29-2011, 02:13 PM   #3
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
I want to run openoffice as a service not as s GUI ,I am using jodconverter http://artofsolving.com/node/12

jodconverter has java java api which allows file conversion in various formats this jodconverter internally uses openoffice.The api connects to openoffice running as a service.
the link aboove talks about running openoffice as a service in linux . I am trying to run openoffice as service.
 
Old 11-29-2011, 02:21 PM   #4
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
I tried this still failing

Code:
[root@ACFAS11 webapps]# export DISPLAY=:0.0
[root@ACFAS11 webapps]# echo $DISPLAY
:0.0
[root@ACFAS11 webapps]#  /usr/lib64/openoffice.org3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard 
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

/usr/lib64/openoffice.org3/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)
[root@ACFAS11 webapps]#
 
Old 11-29-2011, 03:33 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Hi,

According to the link you've posted, you don't need to set a DISPLAY. Instead you need to unset it, if it's already set (i.e. if you're going to run the soffice command from inside an X terminal)
Quote:
$ unset DISPLAY
$ soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
BTW, I've tested the command above from CLI and it works as expected. It only complained that using a simple dash "-" is deprecated (I'm running libreoffice), so I had to use double dashes:
Code:
soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard
Regards

Last edited by bathory; 11-29-2011 at 03:48 PM. Reason: Add more info
 
Old 11-30-2011, 09:35 AM   #6
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Initially I tried
Code:
$ unset DISPLAY
as it is not working I tried your suggestions. I am loggin to this linux server using ssh , you said about X Terminal, I dont know about X terminal do I need one ? canT I do this using ssh ?
 
Old 11-30-2011, 01:53 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
I am loggin to this linux server using ssh , you said about X Terminal, I dont know about X terminal do I need one ? canT I do this using ssh ?
If you use ssh to connect to the remote box, there is no DISPLAY set, so you don't have to unset it, even it doesn't hurt to.
To verify you can run:
Code:
echo $DISPLAY
Just run the soffice command and see what happens

Regards
 
Old 12-01-2011, 09:29 AM   #8
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
If you use ssh to connect to the remote box, there is no DISPLAY set, so you don't have to unset it, even it doesn't hurt to.
To verify you can run:
Code:
echo $DISPLAY
Just run the soffice command and see what happens

Regards


I did as you said.
Code:
[root@ACFAS11 ~]# echo $DISPLAY

[root@ACFAS11 ~]# /usr/lib64/openoffice.org3/program/soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard
/usr/lib64/openoffice.org3/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)
[root@ACFAS11 ~]#
its the same error.
 
Old 12-01-2011, 12:30 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Huh, it works here (Slackware and LibreOffice 3.4.4) and I don't think that Openoffice is different on this.
Anyway try to run Xvfb before soffice to get a dummy DISPLAY and see what you have
Code:
Xvfb :0 -screen 0 1024x768x8 &
soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --display 0:0
 
Old 12-01-2011, 01:57 PM   #10
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
Huh, it works here (Slackware and LibreOffice 3.4.4) and I don't think that Openoffice is different on this.
Anyway try to run Xvfb before soffice to get a dummy DISPLAY and see what you have
Code:
Xvfb :0 -screen 0 1024x768x8 &
so/usffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --display 0:0
still not working

Code:
[root@ACFAS11 ~]# Xvfb :0 -screen 0 1024x768x8 &
[1] 16600
[root@ACFAS11 ~]# -bash: Xvfb: command not found

[root@ACFAS11 ~]# /usr/lib64/openoffice.org3/program/soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard --display 0:0
/usr/lib64/openoffice.org3/program/soffice.bin X11 error: Can't open display: 0:0
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)
[1]+  Exit 127                Xvfb :0 -screen 0 1024x768x8
[root@ACFAS11 ~]#
 
Old 12-01-2011, 02:27 PM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
You don't have Xvfb installed. You can use your package manager to install it.
What is your distro btw?
There is an openoffice-headless package for various distros (e.g for centos it's openoffice.org-headless), so you might install that, instead of going into that trouble.

Regards
 
Old 12-02-2011, 10:03 AM   #12
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
You don't have Xvfb installed. You can use your package manager to install it.
What is your distro btw?
There is an openoffice-headless package for various distros (e.g for centos it's openoffice.org-headless), so you might install that, instead of going into that trouble.

Regards


Thanks a lot for all your help,

I tried this

Code:
[root@ACFAS11 tmp]# yum install openoffice.org-headless
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.lga7.us.voxel.net
 * updates: mirror.ash.fastserv.com
 * extras: mirror.ash.fastserv.com
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package openoffice.org-headless.x86_64 1:3.1.1-19.5.el5_5.6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================================================

 Package                                                  Arch                                    Version                                                  Repository                             Size
=======================================================================================================================================================================================================

Installing:
 openoffice.org-headless                                  x86_64                                  1:3.1.1-19.5.el5_5.6                                     base                                  672 k

Transaction Summary
=======================================================================================================================================================================================================

Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 672 k
Is this ok [y/N]: y
Downloading Packages:
openoffice.org-headless-3.1.1-19.5.el5_5.6.x86_64.rpm                                                                                                                           | 672 kB     00:00     

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : openoffice.org-headless                           [1/1] 

Installed: openoffice.org-headless.x86_64 1:3.1.1-19.5.el5_5.6
Complete!
I dont know where it installed
I tried find

Code:
[root@ACFAS11 tmp]# find /   -name 'soffice'
/usr/lib64/openoffice.org3/program/soffice
/usr/bin/soffice
it still showing the two old installations ,Help me further.
 
Old 12-02-2011, 10:40 AM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,786

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Hi,

I can only guess that /usr/bin/soffice is a symlink for /usr/lib64/openoffice.org3/program/soffice.
Did you try to see if it works now?
 
1 members found this post helpful.
Old 12-02-2011, 12:26 PM   #14
fachhoch@gmail.com
Member
 
Registered: Apr 2010
Posts: 82

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bathory View Post
Hi,

I can only guess that /usr/bin/soffice is a symlink for /usr/lib64/openoffice.org3/program/soffice.
Did you try to see if it works now?
Yes it worked. Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenOffice 2.0.2 does not start tarheel92x Linux - Software 5 04-25-2006 11:22 PM
openoffice slow to start cgoerner Linux - Software 4 08-07-2004 06:32 PM
openoffice crash at start matador Linux - Software 1 03-01-2004 03:54 PM
OpenOffice doesn't start boreo Linux - Software 1 10-08-2003 11:25 PM
start application openoffice through php on linux pradeepsamale Linux - Software 0 08-01-2003 06:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration