launch an application in "batch" mode 
Author Message
 launch an application in "batch" mode

Hi,
I wrote an application, which should run on AIX  in interactive mode
(with user interface) and in batch mode (without user interface). My
problem is, that when I try to launch the application in batch mode
without XWindows (no DISPLAY is set), the application do not want to
start up. Is there any possibility to start an application written in
VAST without XWindows ?
My second question is, how to return an error code when exiting the
image ?

Thank you very much,
Ladislav Medveczky

---
GfAI AG
Glutz-Blotzheimstrasse 1
CH-4503 Solothurn (Switzerland)

Phone: +41 (0)32 624 3346
Fax:   +41 (0)32 623 6534



Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode
Ladislav -

Support for true headless images (no X) is available in VisualAge Smalltalk
Server 4.5.  All other VisualAge Smalltalk environments on Unix require X to
be present.

You can return an error code by exiting using the following:

    System exit: your-error-code-integer-here object: nil

John O'Keefe
IBM VisualAge Smalltalk Enterprise Team

Quote:

>Hi,
>I wrote an application, which should run on AIX  in interactive mode
>(with user interface) and in batch mode (without user interface). My
>problem is, that when I try to launch the application in batch mode
>without XWindows (no DISPLAY is set), the application do not want to
>start up. Is there any possibility to start an application written in
>VAST without XWindows ?
>My second question is, how to return an error code when exiting the
>image ?

>Thank you very much,
>Ladislav Medveczky

>---
>GfAI AG
>Glutz-Blotzheimstrasse 1
>CH-4503 Solothurn (Switzerland)

>Phone: +41 (0)32 624 3346
>Fax:   +41 (0)32 623 6534




Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode

Quote:
> Support for true headless images (no X) is available in VisualAge Smalltalk
> Server 4.5.  All other VisualAge Smalltalk environments on Unix require X to
> be present.
...

> John O'Keefe
> IBM VisualAge Smalltalk Enterprise Team

I believe that John is not entirely correct wrt needing X on Unix.  If
you package your image as a headless image then you don't need X.  Of
course, you had better not be opening any windows or using anything that
depends (even indirectly) on X windows.  We have a batch server written
in VA4.02 that makes no use of X and works fine.  We have other images
that print and therefore need access to X for font information.  These
images open no windows yet require X nonetheless.

        Shaun

--

Shaun M. Smith                     ClearStream Consulting Inc.
Main Phone   403.264.5840          1200-250 6th Avenue SW
Direct Phone 403.261.8234          Calgary, Alberta
Home Phone   403.270.8953          Canada T2P 3H7



Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode

Quote:
> If you package your image as a headless image then you don't need X.

Dear Shaun,
Thanks for your advice. The problem is, that I do not have too much experiences
with packaging ...   So, what does it mean in real-life "package image as a
headless image" ? How can I tell it to the packager ?
My second problem is, that I want to have the same runtime image to be able to run
in both batch and interactive mode. Is it possible ?

E.g. to launch the application this way:

    $ myapp                       ... interactive mode with user interface
    $ myapp -batch            ... batch mode

Or I have to create two different executables ?
Thank you very much,
Laci



Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode
I replied to Laci directly but forgot to post my reply so, for
completeness, here's the followup...

Quote:
>So, what does it mean in real-life
>"package image as a
>headless image" ? How can I tell it to the packager ?

If you go to the transcript tools menu and choose 'Browse Packaged
Images' you will get a window titled 'Packager Control Panel'.  This is
where you can package an image and select the kind of image it is.  I
believe one of the manuals has an explaination of this window under the
heading "Advanced Packaging".  If your application involves no GUI then
you can go to the 'Instructions in Database' tab, double click
'EpPackaging' and you will be presented with a list of packaging
instructions.  Choose 'EpHeadlessRuntimeImagePackagingInstructions' and
then click 'Modify Instructions' from the bottom of the window to move
to the next step.  Here you choose the envy application you want to
package and the method you want invoked on the class that starts your
application.  You'll have to check the manual for the rest of the story.

Quote:
>My second problem is, that I want to have the same runtime
>image to be able to run
>in both batch and interactive mode. Is it possible ?

>E.g. to launch the application this way:

>    $ myapp                       ... interactive mode with
>user interface
>    $ myapp -batch            ... batch mode

It is possible.  You can choose to either open a gui window or not in
the method that starts your application, but be warned that such an
image will always need X windows on unix because it will contain gui
code.

Quote:
>Or I have to create two different executables ?

You could create two different images and have the nodialog script
(which you usually rename to the name of your application) check for the
switch and run the appropriate image.

                Shaun

Shaun M. Smith                     ClearStream Consulting Inc.
Main Phone   403.264.5840          1200-250 6th Avenue SW
Direct Phone 403.261.8234          Calgary, Alberta
Home Phone   403.270.8953          Canada T2P 3H7



Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode
Shaun -

When I say "true headless", I mean "able to run on a machine with no X
installed".  This requires VA ST 4.5 because the VMs in all earlier versions
make X calls internally and won't startup without X being installed on the
machine.

John O'Keefe
IBM VisualAge Smalltalk Enterprise Team

Quote:


>> Support for true headless images (no X) is available in VisualAge
Smalltalk
>> Server 4.5.  All other VisualAge Smalltalk environments on Unix require X
to
>> be present.
>...

>> John O'Keefe
>> IBM VisualAge Smalltalk Enterprise Team

>I believe that John is not entirely correct wrt needing X on Unix.  If
>you package your image as a headless image then you don't need X.  Of
>course, you had better not be opening any windows or using anything that
>depends (even indirectly) on X windows.  We have a batch server written
>in VA4.02 that makes no use of X and works fine.  We have other images
>that print and therefore need access to X for font information.  These
>images open no windows yet require X nonetheless.

> Shaun

>--

>Shaun M. Smith                     ClearStream Consulting Inc.
>Main Phone   403.264.5840          1200-250 6th Avenue SW
>Direct Phone 403.261.8234          Calgary, Alberta
>Home Phone   403.270.8953          Canada T2P 3H7




Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode

Quote:

> Shaun -

> When I say "true headless", I mean "able to run on a machine with no X
> installed".  This requires VA ST 4.5 because the VMs in all earlier versions
> make X calls internally and won't startup without X being installed on the
> machine.

I see.  So when I run an 4.02 application on AIX that does not
communicate with the X server, Xlib (or the like) calls are made by the
VM anyway.  I guess it is fortunate that the calls made by the VM do not
seem to require a running X server.

In summary: to run VA4.02 on AIX you have to have X installed, but you
don't have to have an X server running and you don't have to have your
DISPLAY variable set if you are running images that do not make use of
X.

        Shaun

--

Shaun M. Smith                     ClearStream Consulting Inc.
Main Phone   403.264.5840          1200-250 6th Avenue SW
Direct Phone 403.261.8234          Calgary, Alberta
Home Phone   403.270.8953          Canada T2P 3H7



Wed, 18 Jun 1902 08:00:00 GMT  
 launch an application in "batch" mode
Shaun -

That is correct.  The pre-4.5 VM makes some XLib initialialization calls.
These calls do not involve any interaction with the XServer, so DISPLAY does
not need to be set.

John O'Keefe
IBM VisualAge Smalltalk Enterprise Team

Quote:


>> Shaun -

>> When I say "true headless", I mean "able to run on a machine with no X
>> installed".  This requires VA ST 4.5 because the VMs in all earlier
versions
>> make X calls internally and won't startup without X being installed on
the
>> machine.

>I see.  So when I run an 4.02 application on AIX that does not
>communicate with the X server, Xlib (or the like) calls are made by the
>VM anyway.  I guess it is fortunate that the calls made by the VM do not
>seem to require a running X server.

>In summary: to run VA4.02 on AIX you have to have X installed, but you
>don't have to have an X server running and you don't have to have your
>DISPLAY variable set if you are running images that do not make use of
>X.

> Shaun

>--

>Shaun M. Smith                     ClearStream Consulting Inc.
>Main Phone   403.264.5840          1200-250 6th Avenue SW
>Direct Phone 403.261.8234          Calgary, Alberta
>Home Phone   403.270.8953          Canada T2P 3H7




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. "Batch" CW2003 Reports

2. "Local" Batch Files

3. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

4. BEGIN{want[]={"s1o", "s2o", "s2q", "s3q"}

5. Changing App into "Extended Mode"

6. Test for "Extended Mode Compatability"

7. How can i call application in batch mode?

8. HELP - Need "vertical mode" BROWSE

9. smalleiffel "ACE mode"

10. AMD Opteron 64 bit "unreal" mode

11. "Real big" mode under DOS 7.0

12. blaxxun Contact mode "SLIDE"

 

 
Powered by phpBB® Forum Software