OSX

OSX Lion Hates Developer

Two weeks ago I installed OSX Lion. I thought it would be great to try it out. Oddly I knew better. I thought about it the moment i clicked “install”…If only i could have gone back.

Preface

I code on a macbook pro.

The Hate Begins:

  • Missing spaces – I use spaces all the time it means i can move quickly from one space to the other. I use the grid 3×3 9 desktops nicely organized. But with Lion they replaced it with Mission Control. Which sucks, its slower, has less features(Moving apps from desktop to desktop is pain). I immediately disable auto arrangement of desktops. SLOW.
  • Desktops Auto Arrange – Mission Control thinks that its a good idea to to move apps around and desktops around based upon how often you use them. But thats not what I want because then i never know where the thing that I want to use it. SLOW. DISABLE. I simply unchecked the rearrranging based on recent use’ option in the Mission Control preferences.
  • Apache .local TLD delay BROKEN
  • Photoshop CS3 doesn’t work. BROKEN
  • Inverted mouse – are they completely oblivious? Why would i want to scroll my mouse wheel down to move the window up on my macbook… iPad=yes. computer=no. I realize there is an invert setting.. but it never should have been default. SLOW
  • Hidden Scroll bars: So i want to quickly scroll down or to the right.. i have to first scroll my wheel then grab the scroll bar indicator and drag it down. SLOW.

Enable mail() PHP, on OSX Leopard

I found this here: http://jspr.tndy.me/2008/05/php-mail-and-osx-leopard/ Credit goes to him:

There are 4 files I used for the following:

  • /etc/hostconfig
  • /etc/postfix/main.cf
  • php.ini (this could be anywhere depending on your installation, mine’s in /usr/local/php5/lib/)
  • /var/log/mail.log
firstly, sudo nano -w /etc/hostconfig and add the following line:
MAILSERVER=-YES-
then sudo nano -w /etc/postfix/main.cf, find the myhostname variable (by default it’s host.domain.tld), uncomment it and change it to your domain (if you’re on a machine that doesn’t have a DNS, you can make it a domain that you’re responsible for so that it doesn’t get shut down at the receiving end, but please don’t make it google.com or something like that!)

now, open php.ini and look for the sendmail_path variable, uncomment it, make its value sendmail -t -i, save then restart apache. I’m not really sure if this is 100% necessary as there’s a comment above that says this is the default value anyway, but it can’t hurt!

now open a terminal window and execute the next couple of commands:

% sudo postfix start
% tail -f /var/log/mail.log
finally, create a file called mail.php (or whatever!) and add the following to it:
<?php
mail(
  'you@yourdomain.com', // your email address
  'Test', // email subject
  'This is an email', // email body
  "From: Me <me@mydomain.com>rn" // additional headers
);
?>
obviously replace you@yourdomain.com with your email address and me@mydomain.com with a valid email address (domain at least, as some mail servers will bounce your email if the sender’s domain isn’t real). Now navigate to your mail.php file (likely http://localhost/mail.php) and watch your terminal window to see that it’s been sent successfully. If it hasn’t, let me know if you fixed it and I’ll update this – it’s annoying to me that there isn’t really an answer to this question that I can find so the more comprehensive this is, the more helpful!.