Turns out there an iTunes Dock setting for the Mac, hidden deep inside the new Lion OS. Once activated, the Dock will produce a pop-up notification of which iTunes track is currently playing. Although you can program Growl, a useful little utility, to show similar notifications, you may prefer having the native one found in Lion.
The feature is only available to those running the latest Lion OS X 10.7. It just need to be activated. After following a few simple steps, a window will appear above the iTunes icon on your Dock each time a new track starts, displaying the artist and song title. The notification window will automatically remove itself after a few seconds.
Here’s how to activate it now:
Step 1: Quit iTunes.
Step 2: Open Terminal (Found in Macintosh HD > Applications > Utilities).
Step 3: Copy and paste the following command:
defaults write com.apple.dock itunes-notifications -bool TRUE;killall Dock
Step 4: (Optional) You can customize it even further by adding the iTunes icon inside the popup along with the song info. Just add the following command:
defaults write com.apple.dock notification-always-show-image -bool TRUE;killall Dock
Step 5: Open iTunes and give it a try!
Reverting – Disable Hidden iTunes Notifications On Mac OS X
I’d like to think that I’m familiar with every song in my iTunes library, but decided to try the feature anyway. At first I thought it would be distracting, but found it unobtrusive and actually pretty cool! I think I may go ahead and keep it for a while. The process is completely reversible, anyway. If for any reason you’d like to deactivate the feature, simply follow these steps:
Step 1: Quit iTunes.
Step 2: Open Terminal.
Step 3: Copy and paste the following two lines:
defaults delete com.apple.dock itunes-notifications
defaults delete com.apple.dock notification-always-show-image;killall Dock
Perfected for Snow Leopard, now on to the king of the jungle.
Now let’s get moving…
The following instructions cater to those who
a) are developing on OS X Lion 10.7.X,
b) need the capabilities provided by mcrypt during their PHP development, and
c) do not want to completely recompile PHP to get there.
You’ll get mcrypt loading dynamically for use in PHP with this method.
First, you are going to need a few things…
1) libmcrypt-2.5.8, which you can pick up here; NOTE: make sure to get libmcrypt and not mcrypt.
2) PHP 5.3.6 source, which you grab here; ADDITIONAL NOTE: You may update your OS X at some point, and PHP may get updated along with it. Use phpinfo() to check your version of PHP, and then download the PHP source for that version.
3) Xcode 4.1 tools, which you can pick up in the App Store.
Next, create a directory at root called ‘SourceCache’ and dump the files from #1 and #2 in there and unwrap.
Move to the libmcrypt-2.5.8 directory, and punch in this…
MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ LDFLAGS=’-O3 -arch i386 -arch x86_64′ CXXFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ ./configure –disable-dependency-tracking
sudo make install
libmcrypt is ready – now for the PHP extension…
Move back to /SourceCache, then down to php-5.3.6/ext/mcrypt – type…
(phpize should be in /usr/bin – if not go find it and change the command as appropriate)
Then configure as follows…
MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ LDFLAGS=’-O3 -arch i386 -arch x86_64′ CXXFLAGS=’-O3 -fno-common -arch i386 -arch x86_64′ ./configure –with-php-config=/Developer/SDKs/MacOSX10.7.sdk/usr/bin/php-config
Again: make -j6 then sudo make install
Make sure you have php.ini in the /etc directory – it will probably be php.ini.default to start, particularly if you’ve just done an OS X upgrade or a clean Lion install, so rename it.
Ensure that enable_dl = On but do not remove the ; from in front of ;extension_dir = “./”.
Add one line to the .ini file in the Dynamic Extensions section… extension=mcrypt.so
Restart Apache – you should be all set (again), according to phpinfo():
At the time of writing this post, MySQL Server on MySQL site doesn’t have installer package for OS X 10.7 (aka Lion) but 10.6 Package works just fine for 10.7 as well. This may change soon and we may see package for OS X 10.7 as well or may be rename current package to 10.6 & above.
Installing MySQL community server:
- Download the latest 64-Bit DMG Archive (Apple Disk Image) from MySQL Site (http://dev.mysql.com/downloads/mysql/). Current latest version is 5.5.14 which I’ll be using to install on my machine.
- Mount the Disk Image (I mean open/double-click the DMG file) and install MySQL server by double-clicking the PKG file (in my case mysql-5.5.14-osx10.6-x86_64.pkg) and follow onscreen instructions. ( It will ask for Master password, as it installs MySQL server in /usr/local )
- Add /usr/local/mysql/bin to your path by editing .profile file. (Optionally you can create alias to mysql and mysqladmin as mentioned in README File)
- You can start MySQL server by running “/usr/local/mysql/bin/mysqld_safe &” from terminal but Disk image you downloaded also consists of Startup Package & Preferences Pane which allows you to start/stop MySQL server from System Preferences and even Automatically Start MySQL Server at Startup.
*Please note /usr/local/mysql is only symlink to /usr/local/mysql-5.5.14-osx10.6-x86_64 which means when you upgrade to new version symlink will be changed to point to new version but won’t be deleting the older version. However you need to copy your data directory to new location to make sure your existing databases are intact post upgrade.
Installing MySQL Startup Scripts & Preferences Pane (OPTIONAL)
- Double Click MySQLStartupItem.pkg and Follow on screen instructions (You will be asked for Master Password)
- Double Click MySQL.prefPane which will add MySQL to OS X System Preferences and it should like something like below
- Check Automatically Start MySQL Server on Startup to start MySQL server at boot time.
I just installed Lion and for some reasons my internal website stopped working due to the mysql lock file not being found. I found out that the new osx installation changed the mysql sock file default path from /var/mysql/mysql.sock to /tmp/mysql.sock.
So, to re-enable everything, do:
- shut down your Web Sharing
- cp /etc/php.ini.default /etc/php.ini (for some reasons my old php.ini got renamed to
- modify /etc/php.ini, change ALL /var/mysql/mysql.sock to /tmp/mysql.sock
- enable Web Sharing
Accessing the Library Folder in Lion — While Apple clearly believes that most users shouldn’t be messing around in the
~/Library folder, the company is aware that many of us do need quick access to it. So the new way of viewing
~/Library is to hold the Option key and choose Go > Library in the Finder. You can even press Option after you drop the Go menu. Of course, you could also choose Go > Go to Folder (Command-Shift-G) and enter
~/Library in the dialog that appears, but that’s unnecessary effort.Once you can see the
~/Library folder, you can drag its icon (or its proxy icon from a Finder window’s title bar) to either the toolbar or sidebar of a Finder window. Once there, accessing it is merely a matter of clicking the icon.
If you’d just like your
~/Library to be visible normally in the Finder, that’s easy too; just enter this command in Terminal:
chflags nohidden ~/Library
And if you wish to reverse that action, just repeat the command without
no, as in:
chflags hidden ~/Library
That’s all there is to it — regardless of whether you agree with Apple’s decision to hide the
~/Libraryfolder, there’s no reason it has to get in your way.