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

Joined: 16 Feb 2005 Posts: 2 Location: Oporto
|
Posted: Wed Feb 16, 2005 2:31 am Post subject: Invoke an OO macro from shell |
|
|
Hi,
I'd like to know how can I make use of a OO.org macro from shell, without opening any instance of OO or connecting to a X server.
I've been using
| Code: | | /usr/bin/ooffice -headless -invisible 'macro:///ConversionLibrary.Conversions.ConvertToHTML(%s)' &> %s" % (infile, path_error + "/OOo2html.err" |
But using this approach I need a X server running OR a virtual framebuffer, like xvfb. So, is there a way to call this very same macro without opening OO?
Best Regards |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3533 Location: Hamburg, Germany
|
Posted: Wed Feb 16, 2005 3:22 am Post subject: Re: Invoke an OO macro from shell |
|
|
| mlopes wrote: | | So, is there a way to call this very same macro without opening OO? |
No
With kind regards
hol.sten |
|
| Back to top |
|
 |
mlopes Newbie

Joined: 16 Feb 2005 Posts: 2 Location: Oporto
|
Posted: Wed Feb 16, 2005 3:27 am Post subject: |
|
|
Well, when I say without opening, I mean without opening in visual mode. A script can be called within shell if it does not need access to Xserver.
Reformulating my questions.. is it possible to call OO from shell without establishing a connection to X? |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3533 Location: Hamburg, Germany
|
Posted: Wed Feb 16, 2005 6:19 am Post subject: |
|
|
| mlopes wrote: | | Reformulating my questions.. is it possible to call OO from shell without establishing a connection to X? |
Sorry, but the answer is: No.
You have the possibility to start OOo in the so called "-headless" mode. But even in that mode, and really, that is the most invible mode of OOo, you need an X server, at least an xvfb.
With kind regards
hol.sten |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
|
| Back to top |
|
 |
nensor Newbie

Joined: 24 May 2005 Posts: 1
|
Posted: Tue May 24, 2005 7:26 am Post subject: |
|
|
| hol.sten wrote: | | mlopes wrote: | | Reformulating my questions.. is it possible to call OO from shell without establishing a connection to X? |
Sorry, but the answer is: No.
You have the possibility to start OOo in the so called "-headless" mode. But even in that mode, and really, that is the most invible mode of OOo, you need an X server, at least an xvfb.
With kind regards
hol.sten |
Pardon my ignorance, but what exactly is the use of "-headless" if it does still in fact connect to the X server? Myself, and I'm sure some others, are trying to "batch process" conversions (such as Word to PDF, or SXW to PDF, etc), and having to have an X server running (Solaris or Linux at least, have not tried this under WIndows) is problematic on some servers.
Will there be a future "macro only" or real "headless" option in OOo? At least for me, invoking the conversion macro with -invisible or -headless or combinations thereof still pop up the OOo Writer window, load a doc, then exit. I'd like it to process without all that overhead.
Thanks!
Neal Ensor |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3533 Location: Hamburg, Germany
|
Posted: Tue May 24, 2005 10:26 am Post subject: |
|
|
| nensor wrote: | | what exactly is the use of "-headless" if it does still in fact connect to the X server? |
The use is, that OOo has not to paint anything. So using "-headless" you reduce the overhead as best as possible.
| nensor wrote: | | Myself, and I'm sure some others, are trying to "batch process" conversions (such as Word to PDF, or SXW to PDF, etc), |
Your right. Even I use OOo that way.
| nensor wrote: | | and having to have an X server running (Solaris or Linux at least, have not tried this under WIndows) is problematic on some servers. |
To run Xvfb is not problematic. Give it a try.
| nensor wrote: | | Will there be a future "macro only" or real "headless" option in OOo? |
No idea.
| nensor wrote: | | At least for me, invoking the conversion macro with -invisible or -headless or combinations thereof still pop up the OOo Writer window, load a doc, then exit. I'd like it to process without all that overhead. |
On Windows XP I don't have that problem. There is "-headless" in fact headless. On Solaris I honestly have no idea, because I use there Xvfb.
With kind regards
hol.sten |
|
| Back to top |
|
 |
bajzi Newbie

Joined: 06 Dec 2005 Posts: 2
|
Posted: Tue Dec 06, 2005 7:20 am Post subject: putting command-line macro into OO |
|
|
Hi everyone!
Maybe it's a trivial question for a lot of you but not for me and haven't found the answer to it in the forums:
1. I wrote my macro in a GUI under windoz - tested, works
2. Installed xvfb
But how can I put the macro into OO running on the server? Since I don't have a GUI on the server...
Please help! Thanks,
Andras |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3533 Location: Hamburg, Germany
|
Posted: Tue Dec 06, 2005 1:44 pm Post subject: Re: putting command-line macro into OO |
|
|
| bajzi wrote: | | Since I don't have a GUI on the server... |
Is it possible to use the XServer of another pc like I wrote here http://www.oooforum.org/forum/viewtopic.phtml?t=20195&highlight=xdeep32? Scroll down to the short description of XDeep32.
With kind regards
hol.sten |
|
| Back to top |
|
 |
nashah25 General User

Joined: 05 Oct 2006 Posts: 5
|
Posted: Thu Oct 05, 2006 9:25 pm Post subject: Regarding : Macros in ooffice |
|
|
Hi,
"ooffice -invisible "macro:///Standard.jpegconversion.SplitSlides(/opt/new_server/serverprog/bin/name.ppt)"
the -invisible command is not working, whenever i try this the X window is opening. is there any other it will not open the X window? please help me.... |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
AndrewZ Moderator


Joined: 21 Jun 2004 Posts: 4140 Location: Colorado, USA
|
Posted: Wed Feb 27, 2008 4:09 pm Post subject: Re: Invoke an OO macro from shell |
|
|
This is an old post, so the following is just for the record. People still read this stuff.
| mlopes wrote: | | But using this approach I need a X server running OR a virtual framebuffer, like xvfb. So, is there a way to call this very same macro without opening OO? |
Yes! 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 |
|
 |
|