OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Xvfb howto on fedora 2

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Mon May 16, 2005 9:26 am    Post subject: Xvfb howto on fedora 2 Reply with quote

First of all, I must admit I am not at all a Linux expert.
I don't have access to the X on the server (anyway, I am not pleased with the idea of OO running in a real graphical interface just for some conversions called from scripts).
The distrib is fedora 2, it has x.org installed and I've found and installed a rpm for it.
Then, as I did not find a xvfb-run rpm or even compilable source for fedora, I tried to experiment whit Xvfb on /usr/X11T6/bin
I'm launching "Xvfb :1 &" (also tried with -screen) then launch soffice, but still it tells me that there is not available display.
Please advise me how it can be started.
Thanks
Back to top
View user's profile Send private message Send e-mail
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Mon May 16, 2005 9:58 am    Post subject: Re: Xvfb howto on fedora 2 Reply with quote

carpatic wrote:
I'm launching "Xvfb :1 &" (also tried with -screen) then launch soffice, but still it tells me that there is not available display.

How do you start soffice? Please provide all paramters. All I can guess withou them is, that you didn't provide a correct display-Parameter like "-display localhost:1.0". Or do you?

With kind regards
hol.sten
Back to top
View user's profile Send private message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Mon May 16, 2005 10:44 pm    Post subject: Reply with quote

Thank you Hol.sten, actually I did not knew how to set -display.
So I start it like this:
Xvfb :1 &
and it says:
[1] 11091
then I say:
soffice -headless -display localhost:1.0 -accept="socket,host=localhost,port=2002;urp;"
and it returns
Quote:
X11 error : Can't open display: localhost:1.0


I believe that -headless is futile now, as I don't have an actual screen anyway, but I don't understand how to make soffice work with xvfb.
I also mention 2 things: I work from within ssh
As it is not my server and I report what I'm doing to the server admin, I've agreed for now to try to work with ooo-1.1 which is previuosly installed. Is it too old ?

Thanks
Back to top
View user's profile Send private message Send e-mail
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Mon May 16, 2005 11:58 pm    Post subject: Reply with quote

carpatic wrote:
So I start it like this:
Xvfb :1 &
and it says:
[1] 11091

So everything seems to be fine with Xvfb.

carpatic wrote:
then I say:
soffice -headless -display localhost:1.0 -accept="socket,host=localhost,port=2002;urp;"
and it returns
Quote:
X11 error : Can't open display: localhost:1.0


I also mention 2 things: I work from within ssh

On which host did you start Xvfb, and is that the same host you start OOo? If not, you have to change "localhost" with an appropriate host name.

carpatic wrote:
I believe that -headless is futile now

No, it is not. Even with Xvfb OOo would paint the GUI without -headless.

carpatic wrote:
As it is not my server and I report what I'm doing to the server admin, I've agreed for now to try to work with ooo-1.1 which is previuosly installed. Is it too old ?

Definitely not. OOo 1.14 is the latest stable OOo version. OOo 2.0 is still Beta.


With kind regards
hol.sten
Back to top
View user's profile Send private message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Tue May 17, 2005 2:20 am    Post subject: Reply with quote

Quote:
On which host did you start Xvfb, and is that the same host you start OOo? If not, you have to change "localhost" with an appropriate host name.

I confess I don't quite understand what you mean. I'm starting Xvfb and soffice in the same ssh session. I've tested with 'localhost:1.0' and with the IP instead of localhost.
Still the same result -Can't open display
The complete output is like bellow, in sh file I have the OO starting command, described above
Code:
[root@...]# Xvfb :1 &
[1] 11091
[root@...]# ./startOO1.sh
/usr/lib/ooo-1.1/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@...]#
[root@...]#
[root@....]#
[root@...]# ./startOO1.sh
/usr/lib/ooo-1.1/program/soffice.bin X11 error: Can't open display: localhost:1.0
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)
Back to top
View user's profile Send private message Send e-mail
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Tue May 17, 2005 5:25 am    Post subject: Reply with quote

I only need a clear example to start, I am sure it is not at all hard to do it but I am yet to find a solution.
As the display was not found, I've tried to
...$ Xvfb :0 &
..]$ export DISPLAY=localhost:0.0
..]$ echo $DISPLAY
Ant the output of this was strange for me:
Quote:
localhost:0.0

[1]+ Stopped Xvfb :0

So, is three a confusion, as the system recognizes now 2 displays ?
The most intriguing part for me is the [1]+ Stopped part, does it mean that the Xvfb display is not running ?
Anyway, even after exporting the display and doing
soffice -headless -display localhost:0.0 -accept="socket,host=localhost,port=2002;urp;"
the result is the same, "can't open display"
Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
hagen00
Power User
Power User


Joined: 15 Apr 2005
Posts: 65
Location: South Africa

PostPosted: Tue May 17, 2005 6:02 am    Post subject: Reply with quote

Hi,

i had a similar problem and it turned out it was to to with my permissions.

Have a look at this link:
http://www.oooforum.org/forum/viewtopic.phtml?t=19320&highlight=xvfb

What i forgot to mention in that link is that i also had to do a
Code:
xhost local:
to allow local users to access the X display. (I think. I'm also no expert...yet Smile )

Try do a
Code:
xhost +
on the terminal (if you have the permissions to run this command). Then try launch OO again and see if you still get the same error.

After you do this, be sure to do a
Code:
xhost -
to enbale access control again.

Regards

hagen
Back to top
View user's profile Send private message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Tue May 17, 2005 7:11 am    Post subject: Reply with quote

Thants Hagen, that's it.
So, I set up the display correctlly, I start OO but then.... the scripts tell me they can not connect, so OO seemd inactive.
So I've looked at running processes (ps -fax) and saw .../ooo-1.1/program/setup.bin Exclamation Exclamation
Of course, after it was installed, OO was never started until now, and obviously was never started from the graphical interface. And normally it entered the setup process and I can not go on.
How can I bipass this opperation ?? Confused
Back to top
View user's profile Send private message Send e-mail
hagen00
Power User
Power User


Joined: 15 Apr 2005
Posts: 65
Location: South Africa

PostPosted: Tue May 17, 2005 7:32 am    Post subject: Reply with quote

Ah, ok.

If i understand correctly, it seems OO was never installed fully.

Quote:
How can I bipass this opperation ??


This is beyond me unfortunately, but can't you start X on the server, set OO up properly for each user that needs to use it and then go back and kill X again after that? I'm not sure you want to bypass the OO setup procedure...that might just cause more problems
Back to top
View user's profile Send private message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Tue May 17, 2005 7:53 am    Post subject: Reply with quote

Quote:
This is beyond me unfortunately, but can't you start X on the server, set OO up properly for each user that needs to use it and then go back and kill X again after that?

No, I can not. I only can log through SSH.
I would like to make the proper setup, but also through xvfb, "silentlly".
Also, I know problems might occur at startup, as for various reasons OO is trying to "retreive" broken documents. Again, I need to find a way to get it done silentlly, because I can not actually press Cancel (or Retreive) button Exclamation
Back to top
View user's profile Send private message Send e-mail
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Tue May 17, 2005 8:10 am    Post subject: Reply with quote

hagen00 wrote:
carpatic wrote:
How can I bipass this opperation ??

This is beyond me unfortunately, but can't you start X on the server, set OO up properly for each user that needs to use it and then go back and kill X again after that?

That's the way I do it, too Sad

carpatic wrote:
Also, I know problems might occur at startup, as for various reasons OO is trying to "retreive" broken documents. Again, I need to find a way to get it done silentlly, because I can not actually press Cancel (or Retreive) button Exclamation

Try "-help" or "-h" or "-?" with OOo and you get a list of all parameters. One of them is "-norestore". That is what you are dreaming of Wink

With kind regards
hol.sten
Back to top
View user's profile Send private message
stefan_b
General User
General User


Joined: 11 May 2005
Posts: 5
Location: Manchester UK

PostPosted: Tue May 17, 2005 9:01 am    Post subject: Reply with quote

I have not done this myself, but I believe it is possible to have your server use a remote X instance to render its display. A colleague tried it some time ago with some success, although it wasn't what you might call high performance. It would allow you to use a local workstation to finish the OOo setup, then revert to Xvfb for normal running. Have a look here for more info

http://www.faqs.org/docs/Linux-mini/Remote-X-Apps.html

Regards
Stefan
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Tue May 17, 2005 10:03 am    Post subject: Reply with quote

stefan_b wrote:
I believe it is possible to have your server use a remote X instance to render its display.

Now that you mention it, I have done this myself several times. I had this:
- Server1 with Solaris without X server and OOo 1.1.x fresh installed and never started
- Server2 with Solaris with up and running X server
- PC with Win XP Pro, XDeep32 (http://www.pexus.com/) and PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
Although I don't remember the exact commands, I made connections to both servers through Putty (Server1) and XDeep32 (Server2) and got the registration dialogs of OOo on my PC through XDeep32. After that I only used Xvfb.

stefan_b wrote:
although it wasn't what you might call high performance.

FULL ACK! Smile

stefan_b wrote:
It would allow you to use a local workstation to finish the OOo setup, then revert to Xvfb for normal running.

Yeah, it works.

With kind regards
hol.sten
Back to top
View user's profile Send private message
carpatic
Power User
Power User


Joined: 04 May 2005
Posts: 80

PostPosted: Wed May 18, 2005 2:25 am    Post subject: Reply with quote

Yes, I've checked with someone who obviously know Linux better then me and we solve the problem through X fordwarding
Back to top
View user's profile Send private message Send e-mail
AndrewZ
Moderator
Moderator


Joined: 21 Jun 2004
Posts: 4140
Location: Colorado, USA

PostPosted: Wed Feb 27, 2008 3:09 pm    Post subject: Re: Xvfb howto on fedora 2 Reply with quote

carpatic wrote:
I'm launching "Xvfb :1 &" (also tried with -screen) then launch soffice, but still it tells me that there is not available display.


For the record, OpenOffice.org 2.3.0+ Linux no longer requires an X server (not even Xvfb) if you install the headless RPM package and use the -headless option. IMO, -headless is easier than Xvfb.
_________________
<signature>
* Did you solve your problem? Do others a favor: Post the solution
* OpenOffice.org Ninja
* BleachBit
</signature>
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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