Running headless on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Running headless on Windows

Andrei Stebakov
When I run Pharo 6.1 with -- headless option on Windows, it executes the eval command as expected but during the execution (which lasts 4 sec) it opens the Pharo GUI. 
Is it expected? I thought headless means that the whole execution would happen in the background
Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Denis Kudriashov
Hi.

I think there is separate PharoConsole.exe for headless on Windows

2017-12-27 16:39 GMT+01:00 Andrei Stebakov <[hidden email]>:
When I run Pharo 6.1 with -- headless option on Windows, it executes the eval command as expected but during the execution (which lasts 4 sec) it opens the Pharo GUI. 
Is it expected? I thought headless means that the whole execution would happen in the background

Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Andrei Stebakov
Denis, I tried both. Running pharoconsole makes no difference. Same result as running Pharo.exe

On Dec 27, 2017 10:47, "Denis Kudriashov" <[hidden email]> wrote:
Hi.

I think there is separate PharoConsole.exe for headless on Windows

2017-12-27 16:39 GMT+01:00 Andrei Stebakov <[hidden email]>:
When I run Pharo 6.1 with -- headless option on Windows, it executes the eval command as expected but during the execution (which lasts 4 sec) it opens the Pharo GUI. 
Is it expected? I thought headless means that the whole execution would happen in the background


Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

CyrilFerlicot
In reply to this post by Andrei Stebakov
On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> When I run Pharo 6.1 with -- headless option on Windows, it executes the
> eval command as expected but during the execution (which lasts 4 sec) it
> opens the Pharo GUI. 
> Is it expected? I thought headless means that the whole execution would
> happen in the background

I think that currently Pharo does not have a "real" headless. But I
heard there was work on that part for Pharo 7.

--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Pierce Ng-3
On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce


Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Andrei Stebakov
Pierce, I tried all of those "no display" options, the result is the same

On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email]> wrote:
On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce


Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Nicolai Hess-3-2


2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email]>:
Pierce, I tried all of those "no display" options, the result is the same

On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email]> wrote:
On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce




Hi Andrei,

can you try this:

Open Pharo normal (no headless option).
Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
Save and quit the image.

After that, a call like

pharo --headless pharo.image eval "DateAndTime now"

will write the output to the stdout file, without opening a window.


 




Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

philippeback
If you want to run Pharo as a service, I have found nssm to be working well.

https://nssm.cc

Phil

On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email]> wrote:


2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email]>:
Pierce, I tried all of those "no display" options, the result is the same

On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email]> wrote:
On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce




Hi Andrei,

can you try this:

Open Pharo normal (no headless option).
Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
Save and quit the image.

After that, a call like

pharo --headless pharo.image eval "DateAndTime now"

will write the output to the stdout file, without opening a window.


 




Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Torsten Bergmann
Hi, (cross posting vm-dev)

nssm is nice - but requires additional tools.

Since the days of Squeak the windows VM had the

 -service "ServiceName"

option and one was able to run Squeak as a windows service out of the box.

See http://wiki.squeak.org/squeak/105 for details.

This option allows to register/deregister with the windows service manager and run
a headless image.

I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very nice and stable.

Unfortunately this is broken in recent Pharo VMs and so far Esteban or others did not
have the time to look into this issue. Would be really nice if this option could
be recovered in 2018. So one could easily deploy and run Seaside or Teapot/Tealight
or Zinc/WebClient based web services on Windows.

If we want to deploy Smalltalk based web applications or services on Windows we
should support that. It will keep Windows administrators happy and we would integrate with
the whole ecosystem (for instance you can start/stop a service using Windows scripting for
doing backups, etc.) right out of the box.

Bye
T.
 
 

Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
Von: "[hidden email]" <[hidden email]>
An: "Any question about pharo is welcome" <[hidden email]>
Betreff: Re: [Pharo-users] Running headless on Windows

If you want to run Pharo as a service, I have found nssm to be working well.
 https://nssm.cc
 
Phil
 
On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email][mailto:[hidden email]]> wrote:
 
 
2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email][mailto:[hidden email]]>:
Pierce, I tried all of those "no display" options, the result is the same

 
On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce

 
 
Hi Andrei,
 
can you try this:
 
Open Pharo normal (no headless option).
Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
Save and quit the image.
 
After that, a call like
 
pharo --headless pharo.image eval "DateAndTime now"
will write the output to the stdout file, without opening a window.


 
 
 

Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Running headless on Windows

Andrei Stebakov
Nicolai, the maximize/non-maximize trick worked! Thanks! I wonder if it's an easy fix to put in Pharo.

On Fri, Dec 29, 2017 at 6:22 AM, [hidden email] <[hidden email]> wrote:
I am using nssm because the service option is broken.

The code seems to still be in the image but disabled (there are quite a few things like that actually).

Phil


On Fri, Dec 29, 2017 at 11:59 AM, Torsten Bergmann <[hidden email]> wrote:

Hi, (cross posting vm-dev)

nssm is nice - but requires additional tools.

Since the days of Squeak the windows VM had the

 -service "ServiceName"

option and one was able to run Squeak as a windows service out of the box.

See http://wiki.squeak.org/squeak/105 for details.

This option allows to register/deregister with the windows service manager and run
a headless image.

I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very nice and stable.

Unfortunately this is broken in recent Pharo VMs and so far Esteban or others did not
have the time to look into this issue. Would be really nice if this option could
be recovered in 2018. So one could easily deploy and run Seaside or Teapot/Tealight
or Zinc/WebClient based web services on Windows.

If we want to deploy Smalltalk based web applications or services on Windows we
should support that. It will keep Windows administrators happy and we would integrate with
the whole ecosystem (for instance you can start/stop a service using Windows scripting for
doing backups, etc.) right out of the box.

Bye
T.
 
 

Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
Von: "[hidden email]" <[hidden email]>
An: "Any question about pharo is welcome" <[hidden email]>
Betreff: Re: [Pharo-users] Running headless on Windows

If you want to run Pharo as a service, I have found nssm to be working well.
 https://nssm.cc
 
Phil
 
On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email][mailto:[hidden email]]> wrote:
 
 
2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email][mailto:[hidden email]]>:
Pierce, I tried all of those "no display" options, the result is the same

 
On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce

 
 
Hi Andrei,
 
can you try this:
 
Open Pharo normal (no headless option).
Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
Save and quit the image.
 
After that, a call like
 
pharo --headless pharo.image eval "DateAndTime now"
will write the output to the stdout file, without opening a window.


 
 
 


Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Running headless on Windows

Denis Kudriashov
2017-12-29 16:13 GMT+01:00 Andrei Stebakov <[hidden email]>:
Nicolai, the maximize/non-maximize trick worked! Thanks! I wonder if it's an easy fix to put in Pharo.

So it means that something in image is not initialised. It can be another bug of wrong startup order
 

On Fri, Dec 29, 2017 at 6:22 AM, [hidden email] <[hidden email]> wrote:
I am using nssm because the service option is broken.

The code seems to still be in the image but disabled (there are quite a few things like that actually).

Phil


On Fri, Dec 29, 2017 at 11:59 AM, Torsten Bergmann <[hidden email]> wrote:

Hi, (cross posting vm-dev)

nssm is nice - but requires additional tools.

Since the days of Squeak the windows VM had the

 -service "ServiceName"

option and one was able to run Squeak as a windows service out of the box.

See http://wiki.squeak.org/squeak/105 for details.

This option allows to register/deregister with the windows service manager and run
a headless image.

I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very nice and stable.

Unfortunately this is broken in recent Pharo VMs and so far Esteban or others did not
have the time to look into this issue. Would be really nice if this option could
be recovered in 2018. So one could easily deploy and run Seaside or Teapot/Tealight
or Zinc/WebClient based web services on Windows.

If we want to deploy Smalltalk based web applications or services on Windows we
should support that. It will keep Windows administrators happy and we would integrate with
the whole ecosystem (for instance you can start/stop a service using Windows scripting for
doing backups, etc.) right out of the box.

Bye
T.
 
 

Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
Von: "[hidden email]" <[hidden email]>
An: "Any question about pharo is welcome" <[hidden email]>
Betreff: Re: [Pharo-users] Running headless on Windows

If you want to run Pharo as a service, I have found nssm to be working well.
 https://nssm.cc
 
Phil
 
On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email][mailto:[hidden email]]> wrote:
 
 
2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email][mailto:[hidden email]]>:
Pierce, I tried all of those "no display" options, the result is the same

 
On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> > eval command as expected but during the execution (which lasts 4 sec) it
> > opens the Pharo GUI. 
> > Is it expected? I thought headless means that the whole execution would
> > happen in the background
>
> I think that currently Pharo does not have a "real" headless. But I
> heard there was work on that part for Pharo 7.

I know OP is talking about Windows...  I've been running server applications on
Linux without X11 with -vm-display-null and in-image RFBServer for access to
Pharo over VNC. This works very well for me.

I believe "real" headless means GUI is not run at all and therefore does not
consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
works on Windows for scripting purposes?

Pierce

 
 
Hi Andrei,
 
can you try this:
 
Open Pharo normal (no headless option).
Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
Save and quit the image.
 
After that, a call like
 
pharo --headless pharo.image eval "DateAndTime now"
will write the output to the stdout file, without opening a window.


 
 
 



Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] Running headless on Windows

Stephane Ducasse-3
In reply to this post by Andrei Stebakov
I hope that we can fix it. Can you add a bug entry?

On Fri, Dec 29, 2017 at 4:13 PM, Andrei Stebakov <[hidden email]> wrote:

> Nicolai, the maximize/non-maximize trick worked! Thanks! I wonder if it's an
> easy fix to put in Pharo.
>
> On Fri, Dec 29, 2017 at 6:22 AM, [hidden email] <[hidden email]>
> wrote:
>>
>> I am using nssm because the service option is broken.
>>
>> The code seems to still be in the image but disabled (there are quite a
>> few things like that actually).
>>
>> Phil
>>
>>
>> On Fri, Dec 29, 2017 at 11:59 AM, Torsten Bergmann <[hidden email]> wrote:
>>>
>>>
>>> Hi, (cross posting vm-dev)
>>>
>>> nssm is nice - but requires additional tools.
>>>
>>> Since the days of Squeak the windows VM had the
>>>
>>>  -service "ServiceName"
>>>
>>> option and one was able to run Squeak as a windows service out of the
>>> box.
>>>
>>> See http://wiki.squeak.org/squeak/105 for details.
>>>
>>> This option allows to register/deregister with the windows service
>>> manager and run
>>> a headless image.
>>>
>>> I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very
>>> nice and stable.
>>>
>>> Unfortunately this is broken in recent Pharo VMs and so far Esteban or
>>> others did not
>>> have the time to look into this issue. Would be really nice if this
>>> option could
>>> be recovered in 2018. So one could easily deploy and run Seaside or
>>> Teapot/Tealight
>>> or Zinc/WebClient based web services on Windows.
>>>
>>> If we want to deploy Smalltalk based web applications or services on
>>> Windows we
>>> should support that. It will keep Windows administrators happy and we
>>> would integrate with
>>> the whole ecosystem (for instance you can start/stop a service using
>>> Windows scripting for
>>> doing backups, etc.) right out of the box.
>>>
>>> Bye
>>> T.
>>>
>>>
>>>
>>> Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
>>> Von: "[hidden email]" <[hidden email]>
>>> An: "Any question about pharo is welcome" <[hidden email]>
>>> Betreff: Re: [Pharo-users] Running headless on Windows
>>>
>>> If you want to run Pharo as a service, I have found nssm to be working
>>> well.
>>>  https://nssm.cc
>>>
>>> Phil
>>>
>>> On Dec 29, 2017 09:25, "Nicolai Hess"
>>> <[hidden email][mailto:[hidden email]]> wrote:
>>>
>>>
>>> 2017-12-29 3:07 GMT+01:00 Andrei Stebakov
>>> <[hidden email][mailto:[hidden email]]>:
>>> Pierce, I tried all of those "no display" options, the result is the same
>>>
>>>
>>> On Dec 28, 2017 8:37 PM, "Pierce Ng"
>>> <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27,
>>> 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
>>> > On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
>>> > > When I run Pharo 6.1 with -- headless option on Windows, it executes
>>> > > the
>>> > > eval command as expected but during the execution (which lasts 4 sec)
>>> > > it
>>> > > opens the Pharo GUI.
>>> > > Is it expected? I thought headless means that the whole execution
>>> > > would
>>> > > happen in the background
>>> >
>>> > I think that currently Pharo does not have a "real" headless. But I
>>> > heard there was work on that part for Pharo 7.
>>>
>>> I know OP is talking about Windows...  I've been running server
>>> applications on
>>> Linux without X11 with -vm-display-null and in-image RFBServer for access
>>> to
>>> Pharo over VNC. This works very well for me.
>>>
>>> I believe "real" headless means GUI is not run at all and therefore does
>>> not
>>> consume CPU cycles, which is very welcome. Meanwhile, maybe
>>> -vm-display-null
>>> works on Windows for scripting purposes?
>>>
>>> Pierce
>>>
>>>
>>>
>>> Hi Andrei,
>>>
>>> can you try this:
>>>
>>> Open Pharo normal (no headless option).
>>> Change the window size to "not-maximized" (eve if it is actually not
>>> maximized, maximize it ones and change it back to "not-maximized")
>>> Save and quit the image.
>>>
>>> After that, a call like
>>>
>>> pharo --headless pharo.image eval "DateAndTime now"
>>> will write the output to the stdout file, without opening a window.
>>>
>>>
>>>
>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Stephane Ducasse-3
In reply to this post by Torsten Bergmann
Hi torsten

do you know if there is bug entry for this problem?

Stef

On Fri, Dec 29, 2017 at 11:59 AM, Torsten Bergmann <[hidden email]> wrote:

> Hi, (cross posting vm-dev)
>
> nssm is nice - but requires additional tools.
>
> Since the days of Squeak the windows VM had the
>
>  -service "ServiceName"
>
> option and one was able to run Squeak as a windows service out of the box.
>
> See http://wiki.squeak.org/squeak/105 for details.
>
> This option allows to register/deregister with the windows service manager and run
> a headless image.
>
> I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very nice and stable.
>
> Unfortunately this is broken in recent Pharo VMs and so far Esteban or others did not
> have the time to look into this issue. Would be really nice if this option could
> be recovered in 2018. So one could easily deploy and run Seaside or Teapot/Tealight
> or Zinc/WebClient based web services on Windows.
>
> If we want to deploy Smalltalk based web applications or services on Windows we
> should support that. It will keep Windows administrators happy and we would integrate with
> the whole ecosystem (for instance you can start/stop a service using Windows scripting for
> doing backups, etc.) right out of the box.
>
> Bye
> T.
>
>
>
> Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
> Von: "[hidden email]" <[hidden email]>
> An: "Any question about pharo is welcome" <[hidden email]>
> Betreff: Re: [Pharo-users] Running headless on Windows
>
> If you want to run Pharo as a service, I have found nssm to be working well.
>  https://nssm.cc
>
> Phil
>
> On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email][mailto:[hidden email]]> wrote:
>
>
> 2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email][mailto:[hidden email]]>:
> Pierce, I tried all of those "no display" options, the result is the same
>
>
> On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
>> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
>> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
>> > eval command as expected but during the execution (which lasts 4 sec) it
>> > opens the Pharo GUI.
>> > Is it expected? I thought headless means that the whole execution would
>> > happen in the background
>>
>> I think that currently Pharo does not have a "real" headless. But I
>> heard there was work on that part for Pharo 7.
>
> I know OP is talking about Windows...  I've been running server applications on
> Linux without X11 with -vm-display-null and in-image RFBServer for access to
> Pharo over VNC. This works very well for me.
>
> I believe "real" headless means GUI is not run at all and therefore does not
> consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
> works on Windows for scripting purposes?
>
> Pierce
>
>
>
> Hi Andrei,
>
> can you try this:
>
> Open Pharo normal (no headless option).
> Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
> Save and quit the image.
>
> After that, a call like
>
> pharo --headless pharo.image eval "DateAndTime now"
> will write the output to the stdout file, without opening a window.
>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Running headless on Windows

Torsten Bergmann
Yes:  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/184

Seems fixed for openSmalltalk VM source code.

But I can not try as unfortunately the "pharo-win-latest.zip" (32 bit) is still back from
November 2017 (see http://files.pharo.org/get-files/70/)

So I guess some Esteban magic is required first to receive a new windows VM build
for Pharo.

Bye
T.

> Gesendet: Freitag, 19. Januar 2018 um 13:03 Uhr
> Von: "Stephane Ducasse" <[hidden email]>
> An: "Any question about pharo is welcome" <[hidden email]>
> Betreff: Re: [Pharo-users] Running headless on Windows
>
> Hi torsten
>
> do you know if there is bug entry for this problem?
>
> Stef
>
> On Fri, Dec 29, 2017 at 11:59 AM, Torsten Bergmann <[hidden email]> wrote:
> > Hi, (cross posting vm-dev)
> >
> > nssm is nice - but requires additional tools.
> >
> > Since the days of Squeak the windows VM had the
> >
> >  -service "ServiceName"
> >
> > option and one was able to run Squeak as a windows service out of the box.
> >
> > See http://wiki.squeak.org/squeak/105 for details.
> >
> > This option allows to register/deregister with the windows service manager and run
> > a headless image.
> >
> > I run a Squeak Wiki (Swiki/Comanche) since years with this and it is very nice and stable.
> >
> > Unfortunately this is broken in recent Pharo VMs and so far Esteban or others did not
> > have the time to look into this issue. Would be really nice if this option could
> > be recovered in 2018. So one could easily deploy and run Seaside or Teapot/Tealight
> > or Zinc/WebClient based web services on Windows.
> >
> > If we want to deploy Smalltalk based web applications or services on Windows we
> > should support that. It will keep Windows administrators happy and we would integrate with
> > the whole ecosystem (for instance you can start/stop a service using Windows scripting for
> > doing backups, etc.) right out of the box.
> >
> > Bye
> > T.
> >
> >
> >
> > Gesendet: Freitag, 29. Dezember 2017 um 11:36 Uhr
> > Von: "[hidden email]" <[hidden email]>
> > An: "Any question about pharo is welcome" <[hidden email]>
> > Betreff: Re: [Pharo-users] Running headless on Windows
> >
> > If you want to run Pharo as a service, I have found nssm to be working well.
> >  https://nssm.cc
> >
> > Phil
> >
> > On Dec 29, 2017 09:25, "Nicolai Hess" <[hidden email][mailto:[hidden email]]> wrote:
> >
> >
> > 2017-12-29 3:07 GMT+01:00 Andrei Stebakov <[hidden email][mailto:[hidden email]]>:
> > Pierce, I tried all of those "no display" options, the result is the same
> >
> >
> > On Dec 28, 2017 8:37 PM, "Pierce Ng" <[hidden email][mailto:[hidden email]]> wrote:On Wed, Dec 27, 2017 at 04:58:39PM +0100, Cyril Ferlicot D. wrote:
> >> On 12/27/2017 04:39 PM, Andrei Stebakov wrote:
> >> > When I run Pharo 6.1 with -- headless option on Windows, it executes the
> >> > eval command as expected but during the execution (which lasts 4 sec) it
> >> > opens the Pharo GUI.
> >> > Is it expected? I thought headless means that the whole execution would
> >> > happen in the background
> >>
> >> I think that currently Pharo does not have a "real" headless. But I
> >> heard there was work on that part for Pharo 7.
> >
> > I know OP is talking about Windows...  I've been running server applications on
> > Linux without X11 with -vm-display-null and in-image RFBServer for access to
> > Pharo over VNC. This works very well for me.
> >
> > I believe "real" headless means GUI is not run at all and therefore does not
> > consume CPU cycles, which is very welcome. Meanwhile, maybe -vm-display-null
> > works on Windows for scripting purposes?
> >
> > Pierce
> >
> >
> >
> > Hi Andrei,
> >
> > can you try this:
> >
> > Open Pharo normal (no headless option).
> > Change the window size to "not-maximized" (eve if it is actually not maximized, maximize it ones and change it back to "not-maximized")
> > Save and quit the image.
> >
> > After that, a call like
> >
> > pharo --headless pharo.image eval "DateAndTime now"
> > will write the output to the stdout file, without opening a window.
> >
> >
> >
> >
> >
> >
>
>