Sunday, May 11, 2008

i-Installer for netpbm

i-Installer is unsupported software as of Jan 1, 2007. For the foreseeable future I will be using i-Installer myself for several of my installs for personal use (mainly TeX) and as such I will maintain the program and some of my i-Packages.

What ends is e-mail support for people using i-Installer or any of my i-Packages. If you are looking for help, please join the Mac OS X TeX mailing list, which is the most active user community at the time I am writing this.

Bug reports can still be sent to me, but you will not get a reaction and it is uncertain if and when I will be paying attention to them. If it is something that does work for me (and thus something with your particular setup, I will most likely not pay any attention to them).


I will be announcing the actual end of support on ii2-announce@mail.rna.nl. Until then, I am still actively working to get to the situation that I can drop supporting the community.
i-Installer is open source under a BSD License. i-Installer is hosted on
SourceForge.net Logo
You can get to the i-Installer project home page by following this link.

i-Installer code is not particularly good. This is the result of the fact that it has been written as a pilot-project-gone-awry in combination with the fact that certain aspects of the environment (Mac OS X) played foul with my original architecture ideas (it just did not work at that time). Mac OS X has improved since, but i-Installer would have to be rewritten to benefit. That is only going to happen if I win the lottery and do not have to work for al living anymore...

You won't believe it, but this program actually has attracted fan mail (and some hate mail). An edited selection of fan mail can be found here

Introduction

Welcome to the i-Installer Home page. i-Installer is a network-aware installer application for Mac OS X 10.2 or higher. It installs i-Packages which are directories with a name ending on .ii2 and which contain a set of files. An in-depth introduction (in fact: the i-Installer Help Book) can be found here.

i-Installer is a generic software install and configuration application. It can install socalled i-Packages, which are wrappers (directories containing files) with names ending on .ii2 and which will look like files in most applications (like the Finder). i-Packages can be updated and downloaded from remote locations. Most of this will happen automcatically.

i-Packages may have the following functionality:

  • Installation (and subsequent Configuration)
  • (re-)Configuration
  • Uninstallation (removal)

i-Packages may be interactive in a limited way. i-installer provides the package with access to several predefined sheets that can be displayed on the package window. That way, especially configuration can involve the user. (In other words: install TeX and select formats, languages in a GUI, install ghostscript and be offered a choice to add TeX's type1 fonts to an installed ghostscript).

i-Packages exist just like other wrappers: on your hard disk. You can create packages from remote URL locations by entering an URL (like http://www.ntg.nl/macosx-tex/i-packages/texmf.ii2 in a panel.

However, the easiest way to create packages on disk from remote locations is using a "Known Packages" menu. This will list a series of packages and their location for you to choose from, called an i-Directory. The i-Directories may be local files or web based. As of Jan 1, 2007, the current set is (this may change without notice):

  • http://tug.org/i-packages/iid/gwrelative.iid (default)
  • http://www.ntg.nl/macosx-tex/i-packages/iid/gwrelative.iid
  • http://www.math.utah.edu/ftp/pub/i-packages/iid/gwrelative.iid
  • http://bloch.ling.yale.edu/i-packages/iid/gwrelative.iid
These refer to each other in a circular manner . You can influence both the default i-Directory to use and the amount of descend into te web of i-Directories in i-Installers preferences. You can travel the i-Directory web in the Known Packages window. There exists a separate repository for experimental versions of my i-Packages:
  • http://bloch.ling.yale.edu/i-packages/experimental/iid/gwrelative.iid

The following packages are available from me (unsupported):

  • TeX-related:
    • TeX (based on a subset of TeX Live). This include installs of TeX4ht, Latin Modern fonts (scalable fonts for PostScript/PDF) and XeTeX
    • CM Super (PostScript/PDF vector versions of TeX fonts). This provides support for vector versions of TeX fonts so you can make scalable PDF documents that look good at any resolution, including screen resolution. This package is not required. It is roughly 60MB in size. These are deprecated, you should use the Latin Modern fonts instead.
    • CB Greek (Greek fonts and support)
    • MusixTeX (Support for typesetting music)
    • ConTeXt updater. ConTeXt is a powerful alternative to LaTeX. It is very actively maintained and regularly updated versions or betas are released by its author Hans Hagen of Pragma ADE. My server checks for updates every night and if there has been a change, automatically rebuilds the i-Package from the new materials. Combined with i-Installer's check for updates this provides with a completely automatic way to check for ConTeXt updates.
    • Gerd Neugebauer's BibTool. Command line bibliography file (.bib) manipulation.
    • LaTeX to RTF Converter
    • RTF 2 LaTeX2e converter
  • Support for various graphic formats and conversions.
    • Ghostscript 8 the free PostScript interpreter. You need this for TeX if you want to use PS-dependent TeX tricks, old projects, etc
    • Autotrace
    • Eddie Kohler's LCDF Typetools (these are also part of the TeX i-Package)
    • ImageMagick (image conversion and manipulation)
    • JPEG Tools and Library
    • PNG Library
    • TIFF Library
    • Netpbm Tools and Library
    • libwmf conversion support
    • libiconv conversion support (only required on Mac OS X versions before 10.3)
    • wvWare (MS Word conversion)
  • Support for font conversions.
    • Freetype2
    • Fondu (tool for unpacking Mac Fonts)
    • FontForge (formerly PfaEdit)
    • ttf2pt1 TrueType to PostScript Type1 font conversion
  • System utilities and libraries
    • MacBinary and binhex cli utils
    • i-Installer itself (naturally)
    • Xaw3d Library for X11R6 (3D widgets)
  • Applications
    • Ghostview PostScript viewer (requires an X11-installation)
    • XFig drawing program (requires an X11-installation)

Some others provide i-Packages as well. There is a package for the JOVE emacs-like command line editor, provided by Tom Hageman.

Warning: as i-Installer depends on the web, you may encounter long time outs when servers are busy. See the performance section in i-Installer Help for more info.

i-Installer offers the possibility for regular backgound (no need to start i-Installer, no need to be logged in) checking for new releases of packages you have available.

The i-Installer application download can be found here: II2.dmg. This will download a disk image. A disk image is a file that contains an image of a disk. Such a file can be used just like a disk can. You need to mount that disk image. Mounting a disk image can be done by double clicking it in the Finder.

When the disk image has been mounted, you will have an extra `disk' listed in your Finder window. On it you will find two files, a README file and an APple Installer.app .pkg. To install i-Installer, install the .pkg. Once installed, i-Installer can be used to update itself.

Run i-Installer and (if you are connected to the internet) select the Known Packages submenu. You will be presented with a list of known packages. See my TeX page for more information on the TeX i-Packages and volumes and possible mirror locations.

The i-Installer volume is also mirrored. The following mirrors are available:

You are hereby granted permission to mirror the i-Installer volume, under the following conditions:

  • The mirror image should not be older than a day (you need to synchronize at least once a day)
  • You make clear on your distribution site that you are offering a copy of my distribution and you link to this web page

There is a mailing list for announcements about i-Installer.

i-Installer was designed and written by Gerben Wierda. The beautiful icons were designed by Jérôme Laurens.

i-Installer Know How

How and where do I report problems?

E-mail about i-Installer can be sent to ii2 at rna dot nl. Note that this address may be protected by an anti SPAM system, in which case you'll get a robot-reply to tell you how to reach me.

Please read the top of this page carefully. Bugs may be reported but I do not support this software anymore except for my personal use, hence, fixes may or may not come and may take a long time to come. If you report a bug, make sure to include.

  • What you did.
  • Your OS version and what you can tell me about what is installed.
  • For i-Installer and i-Packages
    • In case of an i-Installer crash: the crash log.
    • In all cases: the log output in Console.app. If the problem is reproducible, set i-Installer to a higher log level (e.g. 6) and recreate the problem. Send me that Console.app output.
    • The contents of a report (see below) *after* the error has occurred. In case of a crash, from before the crash occurs.

i-Installer has a menu option Create & Display Report in the i-Package menu, which you should use preferably and if possible. This creates a report on settings, properties, output, etc. of you i-Package. If you select the menu item, a special tab view opens in the i-Package window. There you find a mail button to send it to me.

i-Installer or i-Package Foo does not work on 10.2 and older!

Correct. Mac OS X 10.2 and older versions are not supported. Mac OS X 10.1 and older are not supported at all and no i-Installer version will run on them. For Mac OS X 10.2 you can download a volume of 357MB which contains a snapshot of i-Installer.app and all my i-Packages from Jan 24, 2006. All of these should install and work on Mac OS X 10.2. However, there have been so few users actually running 10.2 lately that this is not guaranteed.

Does i-Installer support authenticating proxies?

Sadly, No. The problem is mainly that the stuff in Cocoa I have used did not support this in the past. Only later versions of Cocoa have support for this and enabling this would require a complete rewrite of the download object (and dropping support for Mac OS X 10.2). This might happen, but not soon, and the main problem for me would be that I would be unable to test it (as I am not behind such a proxy myself).

What you can do instead is to download the package entirely through other means (like wget) and then use it from disk with network access for i-installer turned off.

The check of the remote package md5 checksum failed

A possible reason is that there is a cache between you and where your are downloading from and this cache is misbehaving. It is offering you an old version of the checksum or the table of contents even if there is a new version available *and* it is instructed by i-Installer to ignore caching (check your preferene setting on this).

An other possible reason is that you have been trying to update while the package was being updated. There is a protection against this in i-Installer, but this is not 100% proof as it would lead to unacceptable response times. If this is reproducable (i.e. it happens when you hit update again say one hour later) this update problem is not the cause.

It is as far as I know impossible for there to be another cause. i-Installer downloads the new table of contents and saves this (reporting download or write errors along the way). Then it checks the new table of contents (which has been downloaded) against the remote md5 checksum.

How do I check the up-to-dateness of i-Packages without running i-Installer?

i-Installer has a preference for this. You can tell it to check all i-Packages in the default save directory on a regular basis. You will get mail when one of them have been updated. See i-Installer help for details.

If you want to create a background check for packages in other locations, or just a few of the packages in your default save location, you need some unix knowledge. i-Installer writes its setting for this feature in the cron system. If you know how to edit this, you can easily copy and adapt the example that i-Installer writes there itself.

How do I minimize web traffic?

i-Installer itself minimizes web traffic by only downloading what is necessary for the action you want to perform (i.e. for removal, only the removal script is downloaded, not the archive itself). Read the help on inspection of archives to find out how inspection web traffic is minimized.

However, there is one thing you can do yourself. Suppose you have a package installed and an update has become available. You want to know if it is necessary to update and what will be downloaded, before actually doing the download, which you may want to do at another time. Here is how you go about it:

  • Update the package (in the properties tab, click the update button). Note: this will remove any parts of the local package that have changed. So if your package is complete (fattened), back it up first en restore it if you decide you want to go back to the old situation. The message view will tell you which files have changed and have therefore been removed locally.
  • Now, in the inspect tab, you can see which files are available. Suppose the archive (normally the biggest part) has been removed because it has changed. Inspect the README (which should have been changed as well). The README should tell you (if the package maintainer is doing his work properly) what has changed and you can decide if you want the update or not. If you do not, you may restore the backup to get your old situation back.

I do not have a (fast) internet connection. What should I do?

Note: This procedure is very wasteful. You will be downloading everything in an i-Package, far more than you need. Also, this only works for my repository which is available via ftp.

Go to a machine that has a fast internet connection. Any machine will do, but the following instructions are based on a unix machine using the ncftp command. If you go to a Windows machine, do the equivalent, but then in Windows (and I do not know how).
  1. Change directory to where you want the i-Packages. E.g. cd ~/Desktop
  2. Get the i-Packages (approximately 300MB!):
ncftpget -R ftp://ftp.nluug.nl/pub/comp/macosx/i-packages
  1. Get i-Installer:
ncftpget ftp://ftp.nluug.nl/pub/comp/macosx/volumes/ii2/II2.dmg
  1. Copy the i-packages directory and II2.dmg to an USB stick or a CD and bring it to your Mac.
  2. On your Mac, open II2.dmg and install the Installer.app .pkg on that volume.
  3. Log out and log in (to get .ii2 and .iid recognized by the system, this might not be needed on recent versions of the OS)
  4. Double click /i-packages/iid/gwrelative.iid
  5. Open and install the i-Packages you require
Ignore all i-Installer warnings you get about not being able to find stuff on the internet. Best is to start i-Installer, and set network preferences to no network traffic at all.

Why is button X disabled?

When i-Installer is performing a set of activities, most buttons are disabled. This is because the implementation of a combination of parallel activities is incomplete. When you download the archive because you want to install, hitting Inspect for that archive would start the same download and check set. These two sets would currently interfere.

Secondly, a package may be 'locked' (you see the small lock button on the package window). This is a protection against accidentally modifying a package hat is in 'useful' state. i-Installer will not modify the locked package (e.g. updating, fattening, etc). For instance, I ship a TeX volume with on it the latest i-Installer program and two i-Packages (TeX and ghostscript). Ghostscript is complete (fat). TeX is complete for a standard installation. Both are locked. They cannot be changed because they are on a read-only volume. But locking them also prevents i-Installer from actually trying. If you want to change such a package (e.g. update it), the best thing to do is first copy it to the default save directory of i-Installer, open it and unlock it.

Thirdly, i-Packages may be retired and these only support uninstalling.

After installing package Foo, the ownerhip of files and directories has changed!

This means that the package provider has included existing directories in the gnutar archive and gnutar creates these with the ownership in the archive, even if they already exist with another owner. The package provider can solve this problem by not providing directories, only the files in the directories. In that case directories are created when unavailable but not recreated or changed ownership when already available.

Tuesday, April 29, 2008

Enable NFS Server - AwkwardTV

Enable NFS Server - AwkwardTV

Enable NFS Server

From AwkwardTV

Jump to: navigation, search

[edit] AppleTV 1.0 software (Or Safe Update 1.1)

  • First we have to setup up the export: To do this we use the nicl command. (the netinfo command line utility) Since netinfo uses the / to separate path components, and we have / characters in the entry we want to create, those / have to be escaped. This is done with the backslash, \, and since we are running in a shell, we need to double them up. After the shell is done examining the command, the string \\/ becomes \/ which is what we need to pass to nicl.
sudo nicl . -create /exports/\\/mnt\\/Scratch\\/Users\\/frontrow

This will create an export for the frontrow users directory. We need to use the /mnt/Scratch/Users/frontrow path instead of /Users/frontrow because /Users/frontrow is actually a link which NFS doesn't like.

  • We can list all of the current exports on your appletv with:
sudo niutil -list . /exports

In our example that should result in something like:

89       /mnt/Scratch/Users/frontrow
  • If we wanted to delete this export we would do this (example):
sudo nicl . -delete /exports/\\/mnt\\/Scratch\\/Users\\/frontrow
  • Once we have our exports set up to our liking we need to start the mountd daemon and the NFS daemon. We would also have to start portmap, but it is already running on the appletv.
sudo /usr/sbin/mountd
sudo /sbin/nfsd -t -u -n 6

These commands start the mount daemon as well as the nfs daemon. The command arguments to nfsd just mean, enable TCP, enable UDP, and start with 6 threads. If you want the nfsd to start automatically, you can add the two commands above to your /etc/rc.local file.


  • If you make changes to your exports you don't need to restart the nfs server. You simply need to notify the mountd daemon to check for changes. You can do this by sending the "1" signal to the running mountd with this command:
sudo kill -1 `cat /var/run/mountd.pid`
  • If you want to check what exports are available on your appletv you can use the showmount command (from your Mac OS X box or Linux)
showmount -e appletv

Where appletv is the name of your Apple TV on your network.

To connect to the Apple TV NFS share from Linux you would type (from Linux):

mkdir /mnt/frontrow
mount -t nfs appletv:/mnt/Scratch/Users/frontrow/ /mnt/frontrow

[edit] AppleTV 1.1 software

  • I have not tested this.

Monday, April 28, 2008

LarsBlog - Archives for: September 2007

LarsBlog - Archives for: September 2007

Installing Fink to access open-source apps on an AppleTV

Filed under: AppleTV — lars @ 04:23:11

I was recently able to enable ssh on my new AppleTV. One of the first things I wanted to do was to be able to play with it as a unix box and set up some standard open-source software on it. It seems there are a couple of package managers for opensource software on OS-X: Fink and MacPorts. However, as a non-Mac person, it took me some time to figure out how to install these on the cut-down unix environment provided by the AppleTV, and I had better luck setting up Fink. Below are the steps I used.

Note, this does not cover the installation of dev-tools so will only allow the install of fink's binary packages (Will hopefully write that process up later).

Pre-requisites:

  • Darwin x86 8.01 ISO (I used darwinx86-801.iso)
  • Fink intel installer (I used Fink-0.8.1-Intel-Installer.dmg)
  • An ssh-enabled AppleTv
  • OS-X /usr/bin/manpath command (optional)

The process:

  1. Mount the Darwin ISO so you can access it's files (on windows, use something like DaemonTools). We're going to need some files from it later (commands that are missing on the AppleTV).

  2. Use a program like WinSCP or FileZilla to connect to your AppleTV (username/password is frontrow/frontrow). First of all, it will help to have some basic unix-commands available that are missing on the AppleTV by default, such as 'vi' (text-editor), 'curl' (downloader, like wget) and while you're at it, 'top' (system monitor - not needed by fink but very handy all the same). These can be copied from the /usr/bin directory of the Darwin ISO, and for now just drop them in the your default/home directory (should be /Users/frontrow).

  3. Create a directory called "Install_Fink" in your default/home directory on your AppleTV. Transfer the file Fink-0.8.1-Intel-Installer.dmg to this directory (You can use scp or FileZilla to do this)

  4. Connect to your AppleTV using SSH (again, as frontrow/frontrow). You should start out in the frontrow user's home directory (and you can always get back there using the command: cd ~). Then change into the Install_Fink directory:
    cd Install_Fink/
  5. Now we're going to mount the .dmg file we copied in here earlier so that we can access the files inside:
    hdiutil mount Fink-0.8.1-Intel-Installer.dmg
  6. Now we're going to copy the files out of this .dmg and into a new directory under Install_Fink (as I had trouble running the installer directly from the mounted .dmg)
    mkdir Fink-0.8.1-Intel-Installer
    cd Fink-0.8.1-Intel-Installer
    sudo cp -R /Volumes/Fink-0.8.1-Intel-Installer/ .
  7. Now we're finished with the .dmg file's contents, we can detach it from the filesystem:
    hdiutil detach /Volumes/Fink-0.8.1-Intel-Installer/
  8. Now we're ready to install Fink. We first have to remount the root file-system as writable (as this is read-only by default on the AppleTV):
    sudo mount -o remount,rw /dev/disk0s3 /
  9. Before we kick-off the fink install, let's take this opportunity to drop the extra unix commands (vi, curl and top) into the correct place to be executed. We need to set their permissions to be executable too:

    sudo cp vi /usr/bin
    sudo chmod +x /usr/bin/vi
    sudo cp curl /usr/bin
    sudo chmod +x /usr/bin/curl
    sudo cp top /usr/bin
    sudo chmod +x /usr/bin/top
  10. Now, finally, we run the installer we copied from inside the .dmg file, using a command called 'installer'

    sudo installer -dumplog -pkg Fink\ 0.8.1-Intel\ Installer.pkg -target "/"

    You should have about 20-30 lines of output, with a line near the end saying the install was successful.

  11. Now there's one last step we need to perform before Fink is ready to use. Fink requires some environment variables to be set up before it will work properly. To do this, it provides a path-setup script that adds a line (that calls an init script) to your .profile file in your home directory. Unfortunately, Fink's automatic setup script seems to rely on a bunch of OS-X commands (printenv, basename, osascript, manpath in /usr/bin, possibly more) that appear to be missing from the OS on the AppleTV. So I took a look at the instructions on setting up this path manually: http://www.finkproject.org/doc/users-guide/install.php#setup

  12. First we need to ensure that we have everything on our Apple-TV required to run Fink's init.sh script. We can do this by attempting to run it from the command-line:
    . /sw/bin/init.sh

    If you get no errors, then things are looking good. (Note: You may get an error about the 'manpath' command being missing. This doesn't *appear* to cause major issues. I had trouble using the manpath command from Darwin, but apparently the OS-X one will work).

  13. Next, use the following commands to edit your .profile file.

    cd ~
    vi .profile

    And add this line to the file:

    . /sw/bin/init.sh

    (In vi, you use i to go into 'insert' mode (so you can type), and wq to save and exit.)

    This will ensure that the required environment variables are created whenever you login with ssh.

  14. Now we can follow Fink's setup instructions here: http://www.finkproject.org/download/index.php?phpLang=en - by running:
    fink scanpackages; fink index
    sudo apt-get update
    sudo apt-get install fink
    This will ensure that Fink and it's list of packages is up-to-date.

  15. To test that it's working ok, you might want to try installing a couple of simple packages. First, I installed links - a lynx-like text based web browser:
    fink install links
    And then I installed wget, a command for downloading files from http or ftp servers (a bit like OS-X's curl):
    fink install wget
    And all seemed to work well! I can't guarantee that every Fink package is going to install properly using the above steps, but it seems like a good start.

You might want to check out the following links to continue from here:

Using Fink: http://www.finkproject.org/doc/bundled/usage.php
Fink Usage FAQ's: http://finkproject.org/faq/usage-fink.php

In a later post, I'll hopefully manage to install Apple's DevTools so that we can try some unstable packages and also building from source.

Good luck!

Thursday, April 10, 2008

gcc - High Performance Computing for Mac OS X

High Performance Computing for Mac OS X

Computation Tools :: Fortran

GCC 4.3 (auto-vectorizing gcc with openmp) :

Compiled using source code from the GNU CVS servers. This contains current versions of gfortran (GNU F95, this is a version of the much awaited, free, open source, F95 compiler), gcc (GNU C) and g++ (GNU C++) compilers that can perform auto-vectorization (i.e. modify code to take advantage of AltiVec/SSE, automatically). Use flag -O3 -ftree-vectorize to enable that option. For more information, see this webpage. Download my binaries, and cd to the download folder. Then gunzip gcc-bin.tar.gz (if your browser didn't do so already) and sudo tar -xvf gcc-bin.tar -C /. It installs everything in /usr/local. You invoke F95 by typing gfortran. You will also need to have Apple's Developer Tools installed. They are included on a separate CD in the retail version of OS X and also available as a free download from Apple's Developer Site. Please install the most current version of Developer Tools, version 2.4.1. Finally, note that there is an alternate g95 project, that is not part of GCC. They seem to have recently released their own official version of g95 for OS X which you may wish to try. Again, note that that g95 is not the same as this version here. Some reports suggest that this alternate g95 is ahead in the implementation of F95 features, but there are mixed reports regarding its optimization capabilities.

Binaries:

gcc-ppc-leopard-bin.tar.gz (PowerPC), gfortran-ppc-leopard-bin.tar.gz (PowerPC gfortran only), gcc-intel-leopard-bin.tar.gz (Intel Mac), gfortran-intel-leopard-bin.tar.gz (Intel Mac gfortran only), updated January 2008 (Leopard only).

gcc-bin.tar.gz (PowerPC), gfortran-bin.tar.gz (PowerPC gfortran only), gcc-intel-bin.tar.gz (Intel Mac only), gfortran-intel-bin.tar.gz (Intel Mac gfortran only), updated January 2008 (Tiger).


Documentation: click here!

ImageMagick: Install from Binary Distribution

ImageMagick: Install from Binary Distribution

Mac OS X Binary Release

We provide a Mac OS X binary distribution, however, if you already have MacPorts installed on your system, simply type:

  sudo port install ImageMagick

The port command downloads ImageMagick and many of its delegate libraries (e.g. JPEG, PNG, Freetype, etc.) and configures, builds, and installs ImageMagick automagically. Alternatively, download the ImageMagick Mac OS X distribution we provide:

Version HTTP FTP Description
ImageMagick-universal-apple-darwin8.11.0.tar.gz download download Mac OS X Tiger 10.4
ImageMagick-universal-apple-darwin9.2.2.tar.gz download download Mac OS X Leopard 10.5

Create (or choose) a directory to install the package into and change to that directory, for example:

  cd $HOME

Next, extract the contents of the package. For example:

  tar xvfz ImageMagick-universal-apple-darwin9.2.2.tar.gz

Set the MAGICK_HOME environment variable to the path where you extracted the ImageMagick files. For example:

  export MAGICK_HOME="$HOME/ImageMagick-6.4.0"

If the bin subdirectory of the extracted package is not already in your executable search path, add it to your PATH environment variable. For example:

  export PATH="$MAGICK_HOME/bin:$PATH"

Set the DYLD_LIBRARY_PATH environment variable:

  export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

Finally, to verify ImageMagick is working properly, type the following on the command line:

  convert logo: logo.gif
identify logo.gif
display logo.gif

Note, the display program requires the X11 server available on your Mac OS X installation DVD.

Congratulations, you have a working ImageMagick distribution under Mac OS X and you are ready to use ImageMagick to convert, compose, or edit your images or perhaps you'll want to use one of the Application Program Interfaces for C, C++, Perl, and others.

Saturday, April 5, 2008

Netpbm home page

Netpbm home page
The Gallery project distributes a few Netpbm programs pre-built for various platforms. The purpose of this package is use with Gallery, but it is just ordinary Netpbm (usually rather old). It contains:
  • jpegtopnm
  • pngtopnm
  • pnmfile
  • pnmrotate
  • pnmscale
  • ppmtojpeg
  • ppmquant
  • ppmtogif
  • pnmtopng
  • giftopnm
  • pnmcut
  • pnmflip

This is the Gallery binary micro distribution of the NetPBM graphics package.
Both of these products are released under the Gnu Public License and source
code for each can be found at:

Gallery home page: http://gallery.sourceforge.net
NetPBM home page: http://netpbm.sourceforge.net

INSTALLING
----------

1. Unpack the tar/zip package into any directory.

2. Make sure the binaries are executable:
% cd netpbm
% chmod 755 *

XAMMP - Apache/MySQL/PHP5/Perl - AwkwardTV

XAMMP - Apache/MySQL/PHP5/Perl - AwkwardTV

XAMMP - Apache/MySQL/PHP5/Perl

From AwkwardTV

Jump to: navigation, search

XAMPP is a simple, most practical and most complete webserver solution. The XAMPP for OS X distribution provides an Apache 2 web server, integrated with the latest builds of MySQL, PHP (both 4 and 5) and Perl. It requires no dependencies.

If you are an experienced web developer or a Mac enthusiast who needs to run a webserver, create dynamic webpages or use databases, this is your lucky day!

Contents

[hide]

[edit] Note

The XAMPP package gets installed in /Applications which is in the partition /dev/disk3 (named OSBoot) and requires it to be mounted with write permissions.

In contrast, the /Users folder is linked to /mnt/Scratch/Users and as such is in the partition /dev/disk4 (named Media) which is mounted on /mnt/. This allows the system to be located on a read-only partition and as such to be more immune to unproper power off.

Anyway: once you've installed SSH on the AppleTV, you've decided to make a server out of it and you're going to treat it the right way.

[edit] Prerequisites

[edit] XAMPP package

The XAMPP package can be downloaded from their website. Choose the tar version.

[edit] Unzip binaries

Unzip binaries will be used on your AppleTV to extract the XAMPP package, but aren't found on the AppleTV base installation.

  • Download the binary Darwin for Intel distribution from the Opensource pages.
    This contains many useful files.
  • Untar the file (Double click in Mac OS X)
  • Mount the disk image (Double click in Mac OS X)
  • In the Terminal:
scp /Volumes/Darwin8_i386/usr/bin/zip frontrow@AppleTV.local:/Users/frontrow/Documents
scp /Volumes/Darwin8_i386/usr/bin/unzip frontrow@AppleTV.local:/Users/frontrow/Documents
scp /Volumes/Darwin8_i386/usr/bin/gzip frontrow@AppleTV.local:/Users/frontrow/Documents
scp /Volumes/Darwin8_i386/usr/bin/gunzip frontrow@AppleTV.local:/Users/frontrow/Documents
scp /Volumes/Darwin8_i386/usr/bin/bzip2 frontrow@AppleTV.local:/Users/frontrow/Documents
scp /Volumes/Darwin8_i386/usr/bin/bunzip2 frontrow@AppleTV.local:/Users/frontrow/Documents
ssh frontrow@AppleTV.local
sudo -s
mount -uw /
mv /Users/frontrow/Documents/* /usr/bin/
chown root:wheel /usr/bin/*

You might want do install further binaries...

[edit] Installing XAMPP on the Apple TV

To Install the XAMPP package on the Apple TV follow this steps :

[edit] On your Mac

  • Copy the .tar.gz file to your Apple TV (the way you prefer, AFP, SCP, etc...).
    Fugu provides a graphical interface for this purpose.
  • Open a SSH connection to your Apple TV.

[edit] On the AppleTV

  • Navigate to the download folder.
  • Get the required privileges:
sudo -s
mount -uw /
  • Extract the downloaded file:
tar -xvzpf xampp-macosx-0.7.2.tar.gz -C /
  • Start your XAMPP:
/Applications/xampp/xamppfiles/mampp start

You should see the following:

Starting XAMPP for MacOS X 0.7.2...
XAMPP: File permissions are being checked... this may take a while.
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for MacOS X started.
  • Try your installation by surfing to http://AppleTV.local and choose a language.
    Tip - If you get PHP errors, it's because you didn't extract it with the 'p' parameters. Re-extract it with the exact command.
  • Assuming it's working, it's time to secure your XAMPP installation.
/Applications/xampp/xamppfiles/mampp security

Tip - If you give an SQL root password, the demos won't work any more.

[edit] Configuring Apache

Find the Apache configuration file:

find /Applications/xampp/ -iname httpd.conf

Mine is /Applications/xampp/etc/httpd.conf

Find the location of the web pages:

cat /Applications/xampp/etc/httpd.conf | grep ^ServerRoot

Mine is /Applications/xampp/xamppfiles/htdocs/

You can modify the location of the web pages in httpd.conf and put your files at the proper location.

[edit] Enabling at boot time

[edit] Enabling the Apple way

Apple provides a page on how to create a Startup Item.

[edit] Enabling using the AppleTV base installation

The AppleTV already ships with an Apache startup file: /System/Library/StartupItems/Apache/Apache which will need some modifications.

If not done already, get the required privileges:

sudo -s
mount -uw /

Optional: set new host name

scutil --set ComputerName NewName
scutil --set LocalHostName NewName

Make your root partition to be mounted read/write at startup:

touch /.readwrite

Edit the file /System/Library/StartupItems/Apache/Apache and replace apachectl with /Applications/xampp/xamppfiles/mampp

Edit the file /etc/hostconfig and replace WEBSERVER=-NO- with WEBSERVER=-YES-

Test it:

reboot

and surf to http://AppleTV.local

[edit] Enabling with the help of AFP

Assuming you have enabled AFP (AppleShare) to start at boot, you can add the line:

/Applications/xampp/xamppfiles/mampp start

to the file /System/Library/StartupItems/AppleShare/AppleShare after the If statement in the StartService function, and then XAMPP will startup at boot time.

Adding XAMPP to the AppleShare startup item is not recommended.