User contributions

Opening a webbrowser automatically

Suggest also to open web browser with url of desktop wiki. Edit moin.py, line 11:

import os, sys, webbrowser

Then at end of script:

# Run browser
iface = Config.interface or 'localhost'
url = "http://" + iface + ":" + str(Config.port)
webbrowser.open(url)
# Run moin moin server:
run(Config)

Running on Mac OS X

manually

  1. After downloading and decompressing Moin Desktop, place it somewhere on your hard drive (these steps are written assuming you will place it at the root level of your home folder).
  2. Open Terminal (/Applications/Utilities) and type in the command "~/moin-desktop/moin.py" (again, this path assums you placed Moin Desktop at the root level of you home folder). You will see a terminal window open with a message that Moin is active of port 8080.
  3. Open your browser and point it to http://localhost:8080.

Some other things to know:

Creating a double-clickable launch file (easier)

While you can continue to launch the wiki by dragging the moin.py file onto an open Terminal.app window and hitting return to run it; you may want something a little more double-clickable.

  1. Using your favorite text editor (hint: Textwrangler.app, TextEdit.app (set in "plain text" mode)), create a new file and paste in the following:

{{{#!/bin/bash python ./moin.py & }}}

  1. Save it with a name like Launcher.command into the same directory as the moin.py file (the .command extension is important as it will associate that file with Terminal.app.

  2. You will need to change the file so that it's executable, otherwise you'll get an error saying that it cannot launch it. Using Terminal.app, navigate to your file and type: chmod +x launcher.command and hit enter. (for the commandline-timid, check out BatChmod: http://macchampion.com/arbysoft/).

  3. You need to ensure that your Launcher.command file will properly open in Terminal.app (and not the text editor you used to create the file). Simply "Get Info" on Launcher.command and from the "Open with" pop-up menu, select Terminal.app (I generally click "Change All..." to associate all .command files for good measure).

  4. That's it! For now on, launcher.command is a quick and easy to get going!

Creating an Application (harder)

The below steps are optional. It is not required to run MoinMoin wiki on a Mac (see instructions above), but these steps will make a Mac-like "app".

  1. If you don't already, you will need to install DeveloperTools. DeveloperTools comes with every Mac, but it isn't installed by default. On new Macs, the installer is on the root of your hard drive. Otherwise, it's on a separate CD that came with your MacOS X purchase. Once installed, it should be in: /Developer/Applications/Utilities/MacPython-2.X/BuildApplet.app.

  2. Extract moin-desktop-1.5.X-X.tbz anywhere you like.

  3. Drag moin.py onto the BuildApplet.app icon. A file moin.app will be created in the same folder as moin.py.

  4. Ctrl-click on the newly created moin.app and choose Show package contents. Navigate to ./Content/Resources/.

  5. Copy the files and folders moin.py, MoinMoin, wiki and wikiconfig.py into the Resources-folder. You may or may not choose to replace moin.py (as they should be identical).

  6. You're done! Double-click moin.app.

Running as Service on windows

(If you're considering running Moin as an internal wiki for your organization, you should consider installing the full Moin wiki using the straightforward instructions at HelpOnInstalling/ApacheOnWin32. You can easily then authenticate against a Windows Domain Controller and also gain the killer feature "email notifications".)

Using two simple Microsoft tools from the Windows 2003 Server Resource Kit (which also works for XP), the Registry Editor and the Services applet you can set up MoinMoin DesktopEdition to run as a service. This means that it will always start up and shut down with your machine; there is no need anymore to explicitly start moin.exe.

See this article to download the programs srvany.exe and instsrv.exe (30KB download) (there you can read further but everything is explained in this page). You can also get these tools from Microsoft, but they are 'hidden' in the Windows 2003 Server Resource Kit which is a 12MB download. Your choice.

Now do it. Follow any of the following alternatives

Doing all by hand (works but hardly)

(see later what CarlosBandar did, only for Windows XP, quite easy to have it running as a service!!)

Here is what I (who?) did:

  1. Download srvany.zip from the above site (or here: http://www.tacktech.com/download.cfm?file=microsoft/service/srvany.zip ).

  2. Install the srvany.exe and instsrv.exe whereever you find convenient. I put them in my c:\WINDOWS directory, if you are uncomfortable with that you can put them in some other path.

  3. In a command window (Start --> Run... --> cmd) type:

    • c:\WINDOWS\instsrv.exe "MoinMoin desktop edition" c:\WINDOWS\srvany.exe

Where you should replace c:\WINDOWS with the path where you installed your srvany and instsrv executables. You should now see a message saying that the service was installed.

  1. Now start up the Registry Editor (Start --> Run... --> regedit and find the following key:

    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MoinMoin desktop edition.

  2. From the Edit menu click New --> Key and give it the name Parameters.

  3. Select the Parameters key.
  4. From the Edit menu click New --> String Value and give it the name Application.

  5. Double-click on the Application value and enter into the Value field the command to be used to start the application, depending on the particular desktop version you are running.

    1. If you are using the Windows self-contained version, then enter the command to run moin.exe, including the absolute path to the file moin.exe.

      • Example: C:\wiki\MMDE\moin.exe

    2. If you are using the Python version, with Python installed externally, then enter the command to have the Python interpreter run the moin.py file, including absolute paths to both files.

      • Example: C:\Python24\python.exe c:\wiki\moin-desktop\moin.py

        • Do not put quotation marks around this command, even though it contains an embedded blank.

          • But you can put quotation marks around the file spec, such as in C:\Python24\python.exe "c:\Documents and Settings\...\moin.py" --AnonymousCoward

  6. Close the Registry Editor.
  7. Open the Service Applet from the Control Panel (Start --> Control Panel --> Performance and Maintenance --> Administrative Tools --> Services), select the service named "MoinMoin desktop edition" and press "Start the service".

  8. Close the Service Applet.
  9. Now if you open up your browser you should be able to access your MoinMoin desktop edition server in the usual way. Shutting down and restarting your machine will stop and restart this service and allow you to use MoinMoin anytime.

(re: running as a service -- see also XYNTService, which is an easy little util that can run anything as a service.)

CarlosBandar did this way (only Windows XP) quite easy!

No registry editing, just copy from here and paste!

Let´s suppose you have moin.exe in C:\ProgramFiles\MyWiki\moin.exe

Extract srvany to a folder, for the given example C:\ProgramFiles\SrvAnyMyWiki

In the above srvany folder, create a .reg file, for example named configuremywikiservice.reg

Contents, copy from here (change moin.exe path as per your installation):

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyWiki\Parameters]
"Application"="C:\\ProgramFiles\\MyWiki\\moin.exe"

In the above srvany folder, create a .bat file, for example named installserviceandgo.bat

Contents copy from here (change instsrv.exe and srvany.exe path as per your installation)

"C:\ProgramFiles\SrvAnyMyWiki\instsrv.exe" "MyWiki" "C:\ProgramFiles\SrvAnyMyWiki\srvany.exe"
configuremywikiservice.reg
sc start MyWiki
pause

Now, click twice on installserviceandgo.bat, when asked reply yes (to install values to registry) and ... MyWiki is ready!!

Somebody could improve the .bat to accept as external parameters the srvany folder location (SrvAnyMyWiki in the example given) as well as the moin.exe location (MyWiki in the example given).

Comments

self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.error: (99, 'Cannot assign requested address')

To enable it:

#editor /etc/network/interfaces

add

auto lo
iface lo inet loopback

Then,

#ifup -a
py

Now run moin.py, everything is fine.

MoinMoin: DesktopEdition/UserContributions (last edited 2011-04-05 01:56:14 by 3-225)