Register

Oct 2005 04

A better startup item for Mac OS X Tiger

Jeroen van der Ham has been hard at work improving the method for starting Tracks when you login on Mac OS X Tiger, and has produced a .plist file which works on its own, without the need for a separate shell script file. You can download the single .plist file here. Edit the file to put the full path to Tracks on your system under the ‘WorkingDirectory’ item, and also edit the port number if you want to run Tracks on a port other than 3000. Then save the file in ~/Library/LaunchAgents, making the LaunchAgents directory if it doesn’t yet exist. That’s all there is to it! When you next login, Tracks will start automatically. If you want to start Tracks manually, use the following command in Terminal:

launchctl load ~/Library/LaunchAgents/com.rousette.tracks.plist

The same command with ‘unload’ substituted for ‘load’ stops Tracks. Thanks to Jeroen for some very neat work!

8 Comments

I get an error when I try to unzip the compressed plist file. has anyone else had this problem? Could I get an uncompressed file somewhere?

[I am using Mac OS X 10.4.3]

Kime Smith: I’ve just emailed you the unzipped files. I don’t think anyone else has reported it (I can unzip it fine by double clicking with 10.4.3). Hope that helps.

I’m having trouble launching Tracks using this plist. Browser fails to open http://0.0.0.0:3000/login because it cannot connect to server 0.0.0.0. Tracks runs fine when I launch it from the command line. Anyone else have this problem?
——-

Mark Ochocki: Thatâ??s strange. If itâ??s working from the command line, you must have Tracks itself set up. Have you checked that youâ??ve got the right path to ruby and the right path to Tracks in the plist?

Failing that, some people who have had trouble with the plist have found that logging and out and in again seems to cure it.

The link to the plist zip file always resolves back to this page. Doing a “download as” just downloads this HMTL file.

Could this be a side effect of moving to ExpressionEngine?

Is there another link that we can use?

BTW, Tracks looks very cool. Thanks for making it available.

Willis Morse: Sorry about that: it was a formatting problem. I’ve sorted it out now, so try the link again.

The plist works fine for me with 10.5.1.  I have Tracks set up as a Fluid app, and I had to quit and restart after killing my command-line started instance and starting the Launchctl started one, but other than that, it’s OK. 

If you install the plist and are having trouble connecting, a reboot ought to rule out the same issue.

I tried all this and something always went wrong. Here’s what worked for me:

Write a shell-script along these lines (where NAME is your username, and line 2 matches your path!). Save it as tracks.sh.

<kbd>
#!/bin/sh
export PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin
cd /Users/NAME/Sites/tracks-1.7/
nohup script/server -e production > /Users/NAME/Sites/tracks-1.7/mylog.txt
</kbd>

Open a terminal and do the following:
<kbd>
mkdir -p tracks.app/Contents/MacOS
mv tracks.sh tracks.app/Contents/MacOS/tracks
chmod +x tracks.app/Contents/MacOS/tracks
</kbd>

Now you’ve got a neat little thing called tracks which you can put into your Applications folder. You can double click it to start the server, or even put it into your “Login Items”.

http://www.unet.univie.ac.at/~a9903051/php/blog/?p=156

You need to log in before you can post a comment. Please use the form at the top of the page to log in, or to register as a user.