View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

How do I change the ports used by a Swiki?

I'd asked this question the PWS mailing list, and decided that others might benefit from a less cryptic response. I'd needed to set up two swiki servers on ports other than the defaults provided by the pre-complied download. This is how I did it on Mac OS 10.2.3 with Squeak 3.2 and the HarvestMoon Swiki (with notes on other architecures):

There are two parts: changing ValidPorts in the ComSwikiLauncher class and changing
the ports displayed in the "ComSwiki Launcher" window on the squeak start-up screen.

1) Change the ValidPorts collection:
Click on the Squeak background to bring up the World (or main) menu.
Select "open...", then "browser". On the System Browser, scroll down the left
selection list to "Swiki-Comanche", then move right and open "ComSwikiLauncher".
Select "Class" instead of "Instance". Move right and select "initialize-release",
then move right and select "initialize". In the bottom pane you'll now see the
definition for the ValidPort collection. Here's how I amended it:
        ValidPorts _ OrderedCollection new.
        ValidPorts add: 80.
        ValidPorts add: 3080.
        ValidPorts add: 3082.
        ValidPorts add: 3084

Now, press Command-S (Alt-S on Linux) to save your changes. You'll be prompted for your initials. You
can now close the System Browser by selecting the 'X' in the upper lefthand corner.

2) Initialize and open the revised ComSwiki Launcher:
In a Workspace (you can use the window titled, "Comanche 5.0 / Swiki 1.3 Getting Started), type the following text:
    ComSwikiLauncher initialize.
    ComSwikiLauncher openAsMorph.

Select that text using your mouse, then press Command-D (Alt-D on Linux, etc). That will execute the code and open a new ComSwikiLauncher window. Close (click the 'X') the original ComSwikiLauncher window and place your revised one it's place. Click "save & exit" and you're done.

Peter Burkholder

Link to this Page

  • Swiki FAQ last edited on 7 May 2011 at 6:22 pm by