[Seaside] How to start an image with PORT parameter

Miguel Enrique Cobá Martinez miguel.coba at gmail.com
Thu Jul 16 23:43:26 UTC 2009

El jue, 16-07-2009 a las 14:03 -0300, Germán Arduino escribió:
> Hola Miguel!
> Thanks by your response.
> El 15 de julio de 2009 21:03, Miguel Enrique Cobá
> Martinez<miguel.coba at gmail.com> escribió:
> > El mié, 15-07-2009 a las 17:57 -0300, Germán Arduino escribió:
> >> Tried, but don't works.
> >>
> >> I got the same error.
> >>
> >
> > I use this script to start a magma image an serveral seaside images:
> >
> > #!/bin/sh
> >
> > NOHUP="/usr/bin/nohup"
> > SQUEAK_VM="/usr/bin/squeakvm"
> > SQUEAK_OPTS="-mmap 100m -vm-sound-null -vm-display-X11 -headless"
> > IMAGES_HOME="/home/miguel/squeak/images/azteca"
> > SCRIPTS_HOME="/home/miguel/squeak/scripts/azteca"
> > LOGS_HOME="/home/miguel/squeak/logs/azteca"
> > START_PORT=8080
> > END_PORT=8093
> >
> >
> > # Start the Magma image
> > echo "Starting Magma image"
> > $NOHUP $SQUEAK $IMAGES_HOME/magma.image $SCRIPTS_HOME/magma.st >>
> > $LOGS_HOME/magma.nohup &
> >
> > # Start the Seaside images
> > for PORT in `seq $START_PORT $END_PORT`; do
> >  echo "Starting Seaside image on port: $port"
> >  $NOHUP $SQUEAK $IMAGES_HOME/seaside.image $SCRIPTS_HOME/seaside.st
> > port $PORT >> $LOGS_HOME/seaside.nohup &
> > done
> Can you explain me a bit how works the PORT variable?
> I can't make that the image read the port parameter :(

Maybe your are using a wrapper around the real squeakvm executable and
the wrapper doesn't respect the parameter order.
Try using the squeak vm direct from the command line.
On Linux use which to get the real path of the command and then file it
to see the type:

$ which squeak
$ file /path/to/squeak

In my Debian GNU/Linux 5.0 (Lenny) I get:

miguel at laptop:~$ which squeak
miguel at laptop:~$ file /usr/bin/squeak
/usr/bin/squeak: Bourne-Again shell script text executable
miguel at laptop:~$ cat /usr/bin/squeak
#! /bin/bash

# File:        squeak
# Author:      José L. Redrejo Rodríguez
<jredrejo at edu.juntaextremadura.net>

<follows a very long script>

but with squeakvm

miguel at laptop:~$ which squeakvm
miguel at laptop:~$ file /usr/bin/squeakvm 
/usr/bin/squeakvm: symbolic link to `../lib/squeak/3.10-3/squeak'

Also, by executing each command from command line:
miguel at laptop:~$ squeak --help
found gettext in path
Could not open the Squeak image file `--help'.

There are three ways to open a Squeak image file.  You can:
  1. Put copies of the default image and changes files in this
  2. Put the name of the image file on the command line when you
     run squeak (use the `-help' option for more information).
  3. Set the environment variable SQUEAK_IMAGE to the name of the image
     that you want to use by default.

For more information, type: `man squeak' (without the quote characters).
miguel at laptop:~$ squeakvm --help
unknown option: --help
Usage: squeakvm [<option>...] [<imageName> [<argument>...]]
       squeakvm [<option>...] -- [<argument>...]

ALSA <option>s:
  -nomixer              disable mixer (volume) adjustment
  -soundcard <name>     open the named sound card (default: default)
  -playback <name>      play to the named sound device (default: Master)
  -capture <name>       record from the named sound device (default:

OSS <option>s:
  -nomixer              disable mixer (volume) adjustment

FBDev <option>s:
  -fbdev <dev>          use framebuffer device <dev> (default: /dev/fb)
  -kbmap <file>         load keymap from <file> (default: use kernel
  -msdev <dev>          use mouse device <dev> (default: /dev/psaux)
  -msproto <protocol>   use the given <protocol> for the mouse (default:
  -vtlock               disallow all vt switching (for any reason)
  -vtswitch             enable keyboard vt switching (Alt+FNx)

X11 <option>s:
  -browserWindow <wid>  run in window <wid>
  -browserPipes <r> <w> run as Browser plugin using descriptors <r> <w>
  -cmdmod <n>           map Mod<n> to the Command key
  -compositioninput     enable overlay window for composed characters
  -display <dpy>        display on <dpy> (default: $DISPLAY)
  -fullscreen           occupy the entire screen
  -glxdebug <n>         set GLX debug verbosity level to <n>
  -headless             run in headless (no window) mode
  -iconic               start up iconified
  -lazy                 go to sleep when main window unmapped
  -mapdelbs             map Delete key onto Backspace
  -nointl               disable international keyboard support
  -notitle              disable the Squeak window title bar
  -noxdnd               disable X drag-and-drop protocol support
  -optmod <n>           map Mod<n> to the Option key
  -swapbtn              swap yellow (middle) and blue (right) buttons
  -xasync               don't serialize display updates
  -xicfont <f>          use font set <f> for the input context overlay
  -xshm                 use X shared memory extension

Common <option>s:
  -encoding <enc>       set the internal character encoding (default:
  -help                 print this help message, then exit
  -memory <size>[mk]    use fixed heap size (added to image size)
  -mmap <size>[mk]      limit dynamic heap size (default: 1024m)
  -noevents             disable event-driven input support
  -notimer              disable interval timer for low-res clock 
  -pathenc <enc>        set encoding for pathnames (default: UTF-8)
  -plugins <path>       specify alternative plugin location (see
  -textenc <enc>        set encoding for external text (default: UTF-8)
  -version              print version information, then exit
  -vm-<sys>-<dev>       use the <dev> driver for <sys> (see below)
  -display <dpy>        quivalent to '-vm-display-X11 -display <dpy>'
  -headless             quivalent to '-vm-display-X11 -headless'
  -nodisplay            quivalent to '-vm-display-null'
  -nosound              quivalent to '-vm-sound-null'
  -quartz               quivalent to '-vm-display-Quartz'

  <imageName> defaults to `squeak.image'.
  -vtlock disables keyboard vt switching even when -vtswitch is enabled
  Using `unix:0' for <dpy> may improve local display performance.
  -xshm only works when Squeak is running on the X server host.
  If `-memory' is not specified then the heap will grow dynamically.
  <argument>s are ignored, but are processed by the Squeak image.
  The first <argument> normally names a Squeak `script' to execute.
  Precede <arguments> by `--' to use default image.

Available drivers:
miguel at laptop:~$ 

So maybe you're trying to use the wrong command to start your image.

Miguel Cobá

> Thanks in advance.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list