Archive for the ‘OS X’ Category

SVN on OS X - /usr/bin or /usr/local/bin

December 24th, 2008 by Sjan Evardsson

I recently installed the openCollabNet OS X Universal binary for SVN 1.5.4 from Tigris and found something odd. I had installed the openCollabNet binary for 1.4.4 a while back, and don’t recall changing any install paths, but apparently something changed. After installing I ran svn –version and saw something that I shouldn’t have seen:

svn, version 1.4.4 (r25188)
compiled Sep 23 2007, 22:32:34

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

Strange, I should have seen the new 1.5.4 there. So I did a bit of digging. Everything I saw about the openCollabNet binary said it installed in /usr/local/bin, but when I ran which svn I saw /usr/bin/svn. So I looked in /usr/bin and /usr/local/bin. Sure enough, two installs in two different places. Not being one to do anything rash (like deleting svn from /usr/bin and then changing the path on all my tools that rely on it) I decided the best thing to do was fix it in a way that was reversible. So, I fired off a sudo ls (to get my password in scope in the shell) and then a simple

for i in `ls /usr/bin/svn*`; do mv /usr/bin/$i /usr/bin/$i.old && ln -sf /usr/local/bin/$i /usr/bin/$i; done

Once I had fired off that command another call to svn –version revealed the fix:

svn, version 1.5.4 (r33841)
compiled Oct 27 2008, 11:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

I am still a little confused as to how 1.4.4 ended up in /usr/bin while 1.5.4 went to /usr/local/bin (where it is expected to go from the openCollabNet binary installer). I wondered, did I change the install path at some point in the install? Somehow I doubt it, as that is not a change I would be likely to make. Just another little mystery for the unsolved cases file.

Minefield: I came, I saw, I couldn’t use it

November 1st, 2008 by Sjan Evardsson

I decided I would be brave and download Minefield (the latest “trunk build” from Firefox) and try it out. I have been reading several reviews about how fast it is, and wanted to see for myself.

I was not, however, able to use it at all. First, my current setup. I am running OS X 10.5 on a 17″ MBP with 4GB RAM. (I have the older mobo however, and the system only actually uses 3GB.) I also have Parallels 3.0 installed with a Windows XP VM (this is important) and two Linux VMs (a Gentoo server and an Ubuntu desktop).

When attempting to start Minefield on OS X (Parallels not running), as Minefield starts Parallels attempts to start an installer on Win XP. The VM cannot be shut down until Minefield is shut down and the only way to do that is via Force Quit. Otherwise the installer continues to attempt to run on Win XP in Parallels. I did not download the Windows installer, nor did I wish to, however, there is something that is triggering a “Firefox Installer” on Win XP whenever Minefield attempts to open on OS X.

Needless to say, while Minefield will not start until it has finished “installing” on XP, and since it is trying (I guess) to install the OS X version on XP, I end up with a hung Minefield and an endless loop of Windows error messages (”The application Firefox Installer has performed and illegal operation etc etc”) followed by the “Firefox Installer” on Windows dying and respawning. Maybe I’ll try again in a week or two, since these are trunk builds and fixes and updates are coming in pretty regularly at this point.

Mail.app - Making the switch

February 10th, 2008 by Sjan Evardsson

It has been 10 days now that I have been using Mail.app rather than Thunderbird and I am ready to uninstall Thunderbird entirely. While I am still waiting for GPGMail for 10.5 to advance beyond the beta stage I can use it as is. I didn’t really notice any difference in startup times between Mail.app and Thunderbird, but I did notice that it was faster at sorting incoming mail by rules and especially at putting the junk mail where it belongs. Thunderbird first loads all the incoming into the inbox and then sorts out junk mail and applies the other sorting rules. With Mail.app I don’t end up waiting for the rules to run before I can start weeding through my mail. I think the biggest thing, though, is that using Mail.app gets me into a position where I can more easily use other tools like the address book and it will, no doubt, facilitate syncing with the iPhone (if I ever get around to taking it out of the box and activating it - but that’s another story for another time.)

Solved: Mail.app folder headaches

February 1st, 2008 by Sjan Evardsson

Well, I finally worked through the issues with Mail.app and mapping the Junk folder. I found the fix for it entirely accidentally - I was going through all the settings and found that changing the setting under Mail > Preferences > Junk Mail > When junk mail arrives from “Mark as junk mail, but leave it in the Inbox” to “Move to the Junk mail folder” was enough to restore the mapping for the Junk mail folder.

I also found that the Drafts folder didn’t exactly disappear, it just doesn’t show up when there are no drafts saved.

While GPGMail for 10.5 still incorrectly reports signatures as not being valid, it is still in beta and sure to improve. So, I guess the week of trying it on has begun.

Technorati Tags: ,

Trying Mail.app again (it’s so very trying)

January 29th, 2008 by Sjan Evardsson

I am trying out Mail.app again - to see if some the issues I had in the past have been corrected in Leopard. Somehow, it just doesn’t seem to work right. I installed GPGMail (which is still beta for Leopard) and mostly got that working, except that for every key in my GPGKeyring it says that the key is invalid and there is no signing date (they all work fine in Enigmail…). Also, I set Mail.app to use the Trash folder for trash and the Sent folder for sent items, the Drafts folder for drafts and the Junk folder for junk mail. Seemed straightforward. Until I shut down Mail.app and reopened it. The trash and sent mail were still correctly mapped, but the Drafts folder was gone and no matter what I tried the Junk folder would not map to junk mail. Thankfully I didn’t have anything in the Drafts folder at the time! What a pain! So any junk mail I get is marked as junk (but I mostly have to do it myself - I am used to Thunderbird catching the majority of the stuff that spamassassin didn’t mark) but it stays in the inbox. That’s because Mail.app doesn’t know that the Junk folder is the junk folder. Even after I tried again (and again, and again) with the Mailbox > Use Folder As > Junk.

If I can get Mail.app to properly map the Drafts and Junk folders again I will likely try it on for a full week or two and see how I feel about it. If I can’t get it over that hurdle, however, forget it.

Technorati Tags: , ,

Leopard - First Run

November 2nd, 2007 by Sjan Evardsson

After waiting all this time for a multi-desktop environment I was excited to get and install my copy of 10.5 today. Even though it isn’t ready for some because of program incompatibilities (sorry, Ted) I hadn’t run across anything to make me think it wasn’t ready for my use. And in truth, there isn’t anything ‘wrong’ with Leopard. It just turns out that I hadn’t gotten the word that I would have to upgrade Parallels to build 5160 in order to use it on Leopard. And since I primarily want the multiple desktops (”Spaces”) to make it easier to run VMs that is in an issue. So, I am downloading the update now. Since it isn’t going to cost me anything to upgrade Parallels, that’s ok. For me, running a VM in full-screen mode while still having access to my Mac desktop is important. While I am at the desk I can do that by hooking up another monitor. When I’m not at the desk, though, that isn’t possible. What I sincerely hope is that I can run my guest OS fullscreen on one desktop while coding on another and browsing on another and wasting time (chatting and playing mindless puzzle games) on the fourth. This was my MO when I was working with VMWare on a Linux machine with XFCE. So, now I plan on doing the same on my Mac. After all, when was the last time a window manager for BSD didn’t have multiple desktops? (Ok, I know, OS X is more than a WM, but you get the drift.)

Technorati Tags: , ,

Apache 2.2.6, PHP 5.2.4 and MySQL 5.0.45 on OS X

September 17th, 2007 by Sjan Evardsson

I got tired of looking for a way to replace the Apache/PHP that Apple packages with OS X (without breaking anything else in the process) so I decided to install Apache 2.2 and PHP5 in their own location to avoid stepping on the Apple package toes.

Since I do a great deal of development again MySQL I needed to install that as well, and figured that I would probably need the GD functionality as well so I grabbed libjpeg and libpng to make those work as well. This is the step-by-step.

(Props to James Pelow and his article from last year, from which I borrowed the configure command lines and configuration modifications, as well as the idea of installing the whole mess in /apache2.)

Download the latest MySQL (I used the package version) from MySQL.

Installation is straightforward following the same methods as any other Mac installer.

Download and install libjpeg and libpng - from Ethan Tira-Thompson (this is also in a Mac installer which contains both libraries in one installer).

Download the latest Apache httpd server (Unix source) from Apache

in the terminal:

tar -xzvf httpd-2.2.6.tar.gz && cd httpd-2.2.6

./configure

--prefix=/apache2

--enable-module=most

--enable-shared=max

make

sudo make install

sudo mkdir /apache2/php

Download the latest PHP from PHP

tar -xzvf php-5.2.4.tar.gz && cd php-5.2.4

./configure

--prefix=/apache2/php

--with-zlib

--with-xml

--with-ldap=/usr

--enable-cli

--with-zlib-dir=/usr

--enable-exif

--enable-ftp

--enable-mbstring

--enable-mbregex

--enable-dbx

--enable-sockets

--with-iodbc=/usr

--with-curl=/usr

--with-mysql=/usr/local/mysql

--with-gd

--with-jpeg-dir=/usr/local

--with-png-dir=/usr/local
--with-apxs2=/apache2/bin/apxsmake

sudo make install

sudo cp php.ini-dist /apache2/php/lib/php.ini

Now to make your Apache2.2 a little more ‘Mac’ - you can point it at the Mac web shared files folder, change the user and group and change the location for user files to match the Mac folder system.

Edit httpd.conf (I use nano, you can use any flat text editor like nano, pico, vi, emacs or even BBedit)

sudo nano -w /apache2/conf/httpd.conf

The changes to httpd.conf I made:
I changed

User daemon
Group daemon

to

User www
Group www

and

DocumentRoot "/apache2/htdocs"

to

DocumentRoot "/Library/WebServer/Documents"

and

<Directory "/apache2/htdocs">

to

<Directory "/Library/WebServer/Documents">

and added

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

DirectoryIndex index.html index.php

Edit httpd-userdir.conf

sudo nano -w /apache2/conf/extra/httpd-userdir.conf

The changes to httpd-userdir.conf I made:
I changed

UserDir public_html

to

UserDir Sites

To start and stop the server:
MySQL comes with a Preference Pane that allows you to start and stop it there. To start and stop Apache you need to first make sure that the default Apache shipped with OS X is stopped.

sudo /apache2/bin/apachectl start
sudo /apache2/bin/apachectl stop

I only ran into one issue, when trying to start the server I ran against the following error message (and no running server, of course):

httpd: Syntax error on line 53 of /apache2/conf/httpd.conf:
Cannot load /apache2/modules/libphp5.so into server:
Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /apache2/modules/libphp5.son  Reason: image not found

To fix this I did the following:

cd /usr/local/mysql/lib
sudo mkdir /usr/local/mysql/lib/mysql

for i in `ls ./l*`; do sudo ln -sf /usr/local/mysql/lib/$i /usr/local/mysql/lib/mysql/$i; done

This creates soft links in the directory that libphp5.so is looking for the MySQL libraries.

Then it started right up! Wheee! (I did a quick test by dropping PhpMyAdmin into the /Library/WebServer/Documents folder and browsed to it - the whole Apache/PHP/MySQL is working correctly)

Technorati Tags: , , ,

Aqua port of OpenOffice.org in alpha release

June 5th, 2007 by Sjan Evardsson

It has been a long time coming, but OpenOffice.org have moved a step closer to a native OS X port. The first development snapshot was released this morning. This is an alpha release, and they warn:

THESE BUILDS SHOULD BE USED AT YOUR OWN RISK FOR TESTING PURPOSES ONLY. THEY MAY CRASH OR CAUSE DATA LOSS.

As with any early development release there are lots of things that don’t work yet, such as printing, exporting to PDF, copy/paste, drang and drop, multiple monitors, etc. That’s to be expected. While I am a little tempted to run the alpha release and provide feedback to the development team, I don’t know that I actually have the time to devote to that sort of endeavor right now. Instead, I think I will jump on the first beta, and install it alongside the X11 version, so that I can chime in on testing at that stage.

For those who are interested, the Mac Porting team have blogs and a news section where you can keep up with development if you wish.

Technorati Tags: ,

Boot Camp + Parallels + XP = Validation Nightmare

April 11th, 2007 by Sjan Evardsson

I have been running XP (WinXP Pro, SP2, retail version) under Parallels for a bit, and decided I wanted to give the Boot Camp with Parallels option a try. After finding some rather lengthy and questionable instructions on moving a Parallels image to a Boot Camp partition I decided to go the clean install route.

I deleted my Parallels XP image (and subsequently ended up wishing I hadn’t) and used the Boot Camp assistant to set up my hard drive and install XP. I got XP set up and running, but had to call Microsoft to get it ‘activated’ since it saw it as a new install. Once that was taken care of I installed Office, and got the same kind of headache there - where the key wouldn’t work, because it said it had been installed on too many machines. I decided to leave that be for the time until I felt like waiting on the MS phone queue again.

I rebooted into OS X and loaded my now ‘active’ and ‘valid’ Windows XP under Parallels. As soon as it booted it gave me the message that I had 3 days to activate it as the hardware had changed significantly and it was no longer valid. I ddn’t feel like fighting it so I closed down Parallels and rebooted into XP where, surprise, I got the 3 day warning again!

So not only does loading the same image in a VM result in XP thinking it isn’t a valid copy, but it changes something in the registry somewhere, so that booting back into natively results in the same thing. I thought the concept of hardware profiles would help with this sort of thing, but apparently not. This is something that MS needs to address sooner rather than later as multicore machines make virtualization more common and loading a native image in a VM becomes a more common way of doing that.

An interesting side note: I got fed up with the whole validation issue and removed the XP partition and re-installed XP under Parallels the same way I did originally. I expected the phone calls for the XP key and the Office key etc, etc - but, it just accepted the keys and validated no questions asked.

Technorati Tags: , , ,

Getting the latest and greatest

April 8th, 2007 by Sjan Evardsson

I love (almost) everything about my new Mac. From a hardware standpoint I am ecstatic. The operating system is very nice (although I wish I could have waited until 10.5 so I could have multiple desktops like every other *nix variant.) The bundled tools are, for the most part, useful and usable - with one exception: the versions of Apache and PHP included.

Sure, there are plenty of people out there hosting on Apache 1.3.x and still plenty more using PHP 4.x - but I’m not one of them. At the very least I need to have a working Apache 2.0.x and PHP 5.x so I can test before deploying on my production server. There are plenty of guides online to add Apache 2.x and/or PHP5, but nothing on replacing the defaults. While I am all ok with testing on multiple versions, the multiple versions I would rather test on would be 2.0.x as default and 2.2.x as the upgradeability testbed.

I’m sure there is a way to do this, I just have to find it …

Technorati Tags: , ,