[Seaside] Help getting started

David T. Lewis lewis at mail.msen.com
Sat Mar 3 22:35:25 UTC 2007


On Thu, Mar 01, 2007 at 04:21:59PM +0100, Thomas F. Burdick wrote:
> After a couple years away from Smalltalk, I thought I'd put
> Squeak/Seaside on a server I have as an excuse to play around with ST
> again.  But I found myself at a bit of a loss as to how to get the
> thing up and running so I can play with it.
> 
> The way I'd setup a Lisp-based system would be to start the Lisp image
> on the server running under screen and detach from it.  When I want to
> hack the system, I'd remotely connect to the running image with an
> Emacs-based ide, or attach to the screen and start up the Lisp's
> built-in ide, connecting to the correct X11 display.  When done
> hacking, I'd disconnect/close the ide, and leave the server running.

Most people use VNC for this as explained in other replies, and
that should be your preferred approach. But I'll note that you can
also use OSProcess to do your X11 reconnect, which would probably
be about the same thing you did with your Lisp system. You would
want to invoke this through Seaside with some reasonable security,
but the basic idea is this:

    "Warning: Make sure the some.host.com is a real address, otherwise
    the VM will block for a long time (e..g six *minutes*) attempting
    to resolve the XOpenDisplay()."

    originalDisplayName := OSProcess thisOSProcess environmentAt: #DISPLAY.
    someOtherHost := 'some.host.com'.
    someOtherDisplayName := someOtherHost, ':0'.
    
    "Make sure that someOtherHost is a real address, otherwise XOpenDisplay()
    will block the Squeak VM for a long time (several minutes)."
    [NetNameResolver addressForName: someOtherHost timeout: 2]
    	on: NameLookupFailure
    	do: [:e | self error: e messageText, ' XOpenDisplay() will block for a long time! '].
    squeak := OSProcess thisOSProcess.
    Transcript cr; show: 'Make image headless for a second'.
    squeak decapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Reconnect to display'.
    squeak recapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Make image headless again for a second'.
    squeak decapitate.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Now reconnect display on ', someOtherDisplayName.
    priorDisplay := squeak displayOnXServer: someOtherDisplayName.
    Transcript cr; show: 'prior display was ', priorDisplay asString.
    (Delay forSeconds: 1) wait.
    Transcript cr; show: 'Display on ', originalDisplayName.
    priorDisplay := squeak displayOnXServer: originalDisplayName.
    Transcript cr; show: 'prior display was ', priorDisplay asString

Dave

> 
> Translating these concepts as best I can to Squeak, my impulse is to
> create an image loaded with Seaside, etc., along with
> RemoteFrameBuffer, on my local machine.  I'd then start the image up
> running in headless mode on the server, and much like with Lisp,
> detach the screen and connect to the running image with a VNC client.
> 
> Is this reasonable/normal?  How do you all setup your environments?
> My ST experience has so far been limited to doing things locally on
> one machine.
> 
> Thanks in advance,
> Thomas
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the Seaside mailing list