Pharo 2.0 with RFBServer with -headless

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

Pharo 2.0 with RFBServer with -headless

Kumar
Hi,

Since this is my first post, I'd first like to say Pharo rocks!
After quite a bit of search for a server-side programming environment
that I can live with, I landed on Pharo/Zinc+family and went
"this is it!" for my project which is like a wiki for music
notation.

I'm trying to setup a pharo+zinc server with RFB installed on a VPS
so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
I'm only get a static image of the pharo environment when I connect
and I don't get any interactivity at all. One other poster [1] who
mentioned this also posted that the problem was solved with a
later version of squeak, which I didn't have any luck with since I don't
have X configured on my server.

Much appreciate any tips.

I got pharo from get.pharo.org and cloned the image using "save".
I run the following script on the cloned image with
the "-headless" flag (I tried with and without the flag.)

"----begin code---"
Gofer it
 squeaksource: 'MetacelloRepository';
 package: 'ConfigurationOfRFB';
 load.
(Smalltalk at: #ConfigurationOfRFB) load.

(RFBServer current)
  allowEmptyPasswords: false;
  allowRemoteConnections: false;
  allowInteractiveConnections: true;
  allowZRLE: true;
  setFullPassword: 'my password';
  start: 0.

[1 hour asDelay wait] repeat.
"----end code----"

One other point - if I save an image after loading the RFB package
(using "Smalltalk snapshot: true andQuit: true.") and then
launch with a script that only starts the server, I get a static black screen
instead and not even the static image. So I don't understand why
there should be a behaviour difference between the two as well.

Regards to all,
-Kumar

[1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662

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

Re: Pharo 2.0 with RFBServer with -headless

Kumar
Following up ..

Almost as soon as I'd written this up, I realized I hadn't tried one
thing ... and that worked :)

1. I took the base image from get.pharo.org that I was using on the server,
2. Launched pharo using Pharo2.0.app on that image (with GUI),
3. Installed RFB using the "Gofer" part of the command in my previous mail,
4. Started the RFB server by running the RFB server part of the script,
5. Did "save and quit",
6. Uploaded the new image to my server,
7. Ran in it headless mode.

Now it works! ... but I'm still at a loss to explain why this
worked but the following steps done entirely on the server via scripts
didn't -

1. Save and quit after just installing RFB (the "Gofer" part).
2. Save and quit after starting the RFB server.
3. Run the resultant image in -headless mode.

It looks like I had to get the image to be modified by Pharo2.0.app
in order for this to work.

Hope this helps someone else struggling with the same thing.

Best,
-Kumar

On 25 Oct, 2013, at 8:54 AM, Srikumar Karaikudi Subramanian <[hidden email]> wrote:

> Hi,
>
> Since this is my first post, I'd first like to say Pharo rocks!
> After quite a bit of search for a server-side programming environment
> that I can live with, I landed on Pharo/Zinc+family and went
> "this is it!" for my project which is like a wiki for music
> notation.
>
> I'm trying to setup a pharo+zinc server with RFB installed on a VPS
> so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
> I'm only get a static image of the pharo environment when I connect
> and I don't get any interactivity at all. One other poster [1] who
> mentioned this also posted that the problem was solved with a
> later version of squeak, which I didn't have any luck with since I don't
> have X configured on my server.
>
> Much appreciate any tips.
>
> I got pharo from get.pharo.org and cloned the image using "save".
> I run the following script on the cloned image with
> the "-headless" flag (I tried with and without the flag.)
>
> "----begin code---"
> Gofer it
> squeaksource: 'MetacelloRepository';
> package: 'ConfigurationOfRFB';
> load.
> (Smalltalk at: #ConfigurationOfRFB) load.
>
> (RFBServer current)
>  allowEmptyPasswords: false;
>  allowRemoteConnections: false;
>  allowInteractiveConnections: true;
>  allowZRLE: true;
>  setFullPassword: 'my password';
>  start: 0.
>
> [1 hour asDelay wait] repeat.
> "----end code----"
>
> One other point - if I save an image after loading the RFB package
> (using "Smalltalk snapshot: true andQuit: true.") and then
> launch with a script that only starts the server, I get a static black screen
> instead and not even the static image. So I don't understand why
> there should be a behaviour difference between the two as well.
>
> Regards to all,
> -Kumar
>
> [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662


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

Re: Pharo 2.0 with RFBServer with -headless

Ben Coman
In reply to this post by Kumar
Hi Srikumar,
Welcome to the community.  Really great to hear you are enjoying Pharo,
and got your problem solved yourself.  Hope to see more of you here.

I don't have a direct answer for your queries.  I haven't used RFB like
that before.  I remember a thread about RFB and semaphores that might
have related information.  Google "RFB on 2.0 + linux - semaphore
primitive failed"

cheers -ben

Srikumar Karaikudi Subramanian wrote:

> Hi,
>
> Since this is my first post, I'd first like to say Pharo rocks!
> After quite a bit of search for a server-side programming environment
> that I can live with, I landed on Pharo/Zinc+family and went
> "this is it!" for my project which is like a wiki for music
> notation.
>
> I'm trying to setup a pharo+zinc server with RFB installed on a VPS
> so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
> I'm only get a static image of the pharo environment when I connect
> and I don't get any interactivity at all. One other poster [1] who
> mentioned this also posted that the problem was solved with a
> later version of squeak, which I didn't have any luck with since I don't
> have X configured on my server.
>
> Much appreciate any tips.
>
> I got pharo from get.pharo.org and cloned the image using "save".
> I run the following script on the cloned image with
> the "-headless" flag (I tried with and without the flag.)
>
> "----begin code---"
> Gofer it
>  squeaksource: 'MetacelloRepository';
>  package: 'ConfigurationOfRFB';
>  load.
> (Smalltalk at: #ConfigurationOfRFB) load.
>
> (RFBServer current)
>   allowEmptyPasswords: false;
>   allowRemoteConnections: false;
>   allowInteractiveConnections: true;
>   allowZRLE: true;
>   setFullPassword: 'my password';
>   start: 0.
>
> [1 hour asDelay wait] repeat.
> "----end code----"
>
> One other point - if I save an image after loading the RFB package
> (using "Smalltalk snapshot: true andQuit: true.") and then
> launch with a script that only starts the server, I get a static black screen
> instead and not even the static image. So I don't understand why
> there should be a behaviour difference between the two as well.
>
> Regards to all,
> -Kumar
>
> [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662
>  


Reply | Threaded
Open this post in threaded view
|

Re: Pharo 2.0 with RFBServer with -headless

NorbertHartl
In reply to this post by Kumar
Hi Srikumar,

can you tell what other software you have installed in your image. I know the effect but I’m still not fully convinced it is RFBs fault.

Norbert

Am 25.10.2013 um 05:24 schrieb Srikumar Karaikudi Subramanian <[hidden email]>:

> Hi,
>
> Since this is my first post, I'd first like to say Pharo rocks!
> After quite a bit of search for a server-side programming environment
> that I can live with, I landed on Pharo/Zinc+family and went
> "this is it!" for my project which is like a wiki for music
> notation.
>
> I'm trying to setup a pharo+zinc server with RFB installed on a VPS
> so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
> I'm only get a static image of the pharo environment when I connect
> and I don't get any interactivity at all. One other poster [1] who
> mentioned this also posted that the problem was solved with a
> later version of squeak, which I didn't have any luck with since I don't
> have X configured on my server.
>
> Much appreciate any tips.
>
> I got pharo from get.pharo.org and cloned the image using "save".
> I run the following script on the cloned image with
> the "-headless" flag (I tried with and without the flag.)
>
> "----begin code---"
> Gofer it
> squeaksource: 'MetacelloRepository';
> package: 'ConfigurationOfRFB';
> load.
> (Smalltalk at: #ConfigurationOfRFB) load.
>
> (RFBServer current)
> allowEmptyPasswords: false;
> allowRemoteConnections: false;
> allowInteractiveConnections: true;
> allowZRLE: true;
> setFullPassword: 'my password';
> start: 0.
>
> [1 hour asDelay wait] repeat.
> "----end code----"
>
> One other point - if I save an image after loading the RFB package
> (using "Smalltalk snapshot: true andQuit: true.") and then
> launch with a script that only starts the server, I get a static black screen
> instead and not even the static image. So I don't understand why
> there should be a behaviour difference between the two as well.
>
> Regards to all,
> -Kumar
>
> [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662


Reply | Threaded
Open this post in threaded view
|

Re: Pharo 2.0 with RFBServer with -headless

Kumar
In reply to this post by Kumar
Hi Ben,

Thanks for the welcome :)

My problem doesn't seem to be related to the semaphore issue and more
likely reflects my noob status. I'm up and running now though. I was
afraid of having to run xpra or something since it would eat server
memory, but thankfully RFBServer seems to work fine now.

Best,
-Kumar

On 25 Oct, 2013, at 7:51 PM, [hidden email] wrote:

> Date: Fri, 25 Oct 2013 22:11:33 +0800
> From: [hidden email]
> To: Any question about pharo is welcome <[hidden email]>
> Subject: Re: [Pharo-users] Pharo 2.0 with RFBServer with -headless
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Srikumar,
> Welcome to the community.  Really great to hear you are enjoying Pharo,
> and got your problem solved yourself.  Hope to see more of you here.
>
> I don't have a direct answer for your queries.  I haven't used RFB like
> that before.  I remember a thread about RFB and semaphores that might
> have related information.  Google "RFB on 2.0 + linux - semaphore
> primitive failed"
>
> cheers -ben
>
> Srikumar Karaikudi Subramanian wrote:
>> Hi,
>>
>> Since this is my first post, I'd first like to say Pharo rocks!
>> After quite a bit of search for a server-side programming environment
>> that I can live with, I landed on Pharo/Zinc+family and went
>> "this is it!" for my project which is like a wiki for music
>> notation.
>>
>> I'm trying to setup a pharo+zinc server with RFB installed on a VPS
>> so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
>> I'm only get a static image of the pharo environment when I connect
>> and I don't get any interactivity at all. One other poster [1] who
>> mentioned this also posted that the problem was solved with a
>> later version of squeak, which I didn't have any luck with since I don't
>> have X configured on my server.
>>
>> Much appreciate any tips.
>>
>> I got pharo from get.pharo.org and cloned the image using "save".
>> I run the following script on the cloned image with
>> the "-headless" flag (I tried with and without the flag.)
>>
>> "----begin code---"
>> Gofer it
>> squeaksource: 'MetacelloRepository';
>> package: 'ConfigurationOfRFB';
>> load.
>> (Smalltalk at: #ConfigurationOfRFB) load.
>>
>> (RFBServer current)
>>  allowEmptyPasswords: false;
>>  allowRemoteConnections: false;
>>  allowInteractiveConnections: true;
>>  allowZRLE: true;
>>  setFullPassword: 'my password';
>>  start: 0.
>>
>> [1 hour asDelay wait] repeat.
>> "----end code----"
>>
>> One other point - if I save an image after loading the RFB package
>> (using "Smalltalk snapshot: true andQuit: true.") and then
>> launch with a script that only starts the server, I get a static black screen
>> instead and not even the static image. So I don't understand why
>> there should be a behaviour difference between the two as well.
>>
>> Regards to all,
>> -Kumar
>>
>> [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662


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

Re: Pharo 2.0 with RFBServer with -headless

Kumar
In reply to this post by Kumar
Hi Norbert,

I don't think it is RFB's fault either. I did give the complete steps I did. Perhaps just a wait loop after each of the steps is all it takes, 'cos since I did those steps using the local vm by hand before the "save and quit". I know how to wait for RFBServer to start (1), but I'm not sure how to wait for the load to finish or whether I need to.

Anyway, I'm happy now since RFB is running fine with the manually created image.

Thanks! ... and all this is pretty cool!
-Kumar

(1) [RFBServer current isRunning] whileFalse: [1 second asDelay wait]

On 25 Oct, 2013, at 7:51 PM, [hidden email] wrote:

> Date: Fri, 25 Oct 2013 16:21:49 +0200
> From: Norbert Hartl <[hidden email]>
> To: Pharo users users <[hidden email]>
> Subject: Re: [Pharo-users] Pharo 2.0 with RFBServer with -headless
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=windows-1252
>
> Hi Srikumar,
>
> can you tell what other software you have installed in your image. I know the effect but I?m still not fully convinced it is RFBs fault.
>
> Norbert
>
> Am 25.10.2013 um 05:24 schrieb Srikumar Karaikudi Subramanian <[hidden email]>:
>
>> Hi,
>>
>> Since this is my first post, I'd first like to say Pharo rocks!
>> After quite a bit of search for a server-side programming environment
>> that I can live with, I landed on Pharo/Zinc+family and went
>> "this is it!" for my project which is like a wiki for music
>> notation.
>>
>> I'm trying to setup a pharo+zinc server with RFB installed on a VPS
>> so I can access it through VNC ("Chicken of the VNC" on MacOS 10.8.5).
>> I'm only get a static image of the pharo environment when I connect
>> and I don't get any interactivity at all. One other poster [1] who
>> mentioned this also posted that the problem was solved with a
>> later version of squeak, which I didn't have any luck with since I don't
>> have X configured on my server.
>>
>> Much appreciate any tips.
>>
>> I got pharo from get.pharo.org and cloned the image using "save".
>> I run the following script on the cloned image with
>> the "-headless" flag (I tried with and without the flag.)
>>
>> "----begin code---"
>> Gofer it
>> squeaksource: 'MetacelloRepository';
>> package: 'ConfigurationOfRFB';
>> load.
>> (Smalltalk at: #ConfigurationOfRFB) load.
>>
>> (RFBServer current)
>> allowEmptyPasswords: false;
>> allowRemoteConnections: false;
>> allowInteractiveConnections: true;
>> allowZRLE: true;
>> setFullPassword: 'my password';
>> start: 0.
>>
>> [1 hour asDelay wait] repeat.
>> "----end code----"
>>
>> One other point - if I save an image after loading the RFB package
>> (using "Smalltalk snapshot: true andQuit: true.") and then
>> launch with a script that only starts the server, I get a static black screen
>> instead and not even the static image. So I don't understand why
>> there should be a behaviour difference between the two as well.
>>
>> Regards to all,
>> -Kumar
>>
>> [1] http://groups.yahoo.com/neo/groups/squeak/conversations/topics/141662


signature.asc (506 bytes) Download Attachment