vendredi 7 mars 2014

Keeping "Open With" menu clean on OS X Maverick (10.9)

As previously posted for OS X Lion and Mountain Lion, the "Open With" might from time to time integrate some duplicate applications... This "feature" is still present in the latest version of OS X: Maverick (aka 10.9).

The following posts for OS X 10.7 and 10.8 are still working for the new OS X 10.9 (aka Maverick) and will help you get a clean "Open With" menu:
  1. Open Terminal (Applications / Utilities /
  2. Type in the following command :  /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
  3. Wait for that command to complete and if no error then proceed to the last step: restarting Finder
  4. Restarting Finder does not require you to reboot your Mac. Simply press Control + Option while clicking on the Finder icon in the Dock, select Relaunch and you are set!
OS X Maverick (10.9) Finder Relaunch
For those who are not familiar with Terminal I made a small AppleScript to automatically perform all the above actions in one click.

You can download it for free from GitHub (and also fork it to improve it)

OS X Maverick Open With menu with duplicate applications OS X Maverick with a cleanOpen With menu
OS X Maverick with duplicates in "Open With" menu Clean "Open With" menu

dimanche 3 mars 2013

Homebrew and the changing libraries

Hombrew is quite a fantastic tool to have lot of this setup on your Mac, but from time to time upgrade process turns out to be messy

Some libraries are updated and depending software is not always recompiled to take the changes into account, leading to errors such as:
dyld: Library not loaded: /usr/local/Cellar/gettext/
The above error is due to a GetText update (now 0.18.2.x) and by the fact that I have removed the old library.

So, How-To troubleshoot this kind of error ?

Well, at first you need to know which programs and libraries are depending on the changed one:

1. Open a Terminal window
2. Type in the following command: brew uses --installed gettext
3. Wait, and you'll be returned the programs/libraries that depend on gettext, in my case only 2: dos2unix and php53.
4. Perform a full reinstall of these programs/libraries using the following commands:
brew remove dos2unix
brew install --build-from-source dos2unix
And things should be fixed.

samedi 12 janvier 2013

Disabling Java Web plugin

A recurring bad news for all Java user, a new vulnerability has been discovered and is affecting all Java Web Plugin (Applets and web application) [read this article for more information]

The only way to prevent from being hack, is to disable Java support for Web Browser, and, here follows a quick how to for Mac OS X.

This works for all current versions of OS X, inclugin OS X Mountain Lion, Lion, Snow Leopard, etc.

Step 1: open System Preferences and locate the Java icon as illustrated. And click on it to launch the Java Control panel as depicted in Steps 2 and 3.

Step 2: Java Control panel being opened

Step 3: Usually the Java Control Panel opens on the "General" tab and you have to move to the XXX one to access the 

Step 4: Disabling Java in Web browsers by unmarking the check box next to "Enable Java content in the browser". The click on the "Apply" button (bottom right of the Java Control Panel).

Step 5: Restart all opened browsers to make sure Java content is disabled in all your browsers.

By disabling Java content in your web browser (Safari, Firefox, Chrome, etc.) you might not be able to access some web sites, which are using Java Technology to deliver information. But, this is the only way to prevent your computer from being hack at the time of writing.

The next steps will be to upgrade to the next versions of Java once released by Oracle and make wishes that they will no only patch this exploit but also not create a new one...

vendredi 27 juillet 2012

How to remove XCode 4.3 and above from your Mac

Starting Xcode 4.3 Apple has changed few things, and the most important one is the location of Xcode. It used to be in /Developer but, now, Apple wants it IDE to be an Application and for that reason it lies in the Applications folder of your Mac.

So, the best way to remove Xcode 4.3 and above from your mac is now to drop it to the Trash and you would do for any other application.

But one question remains: What about command line?
Well, the previous uninstall script is no more and if some have suggested to install Xcode 4.2 to get it, this is totally impossible when running OS X Mountain Lion.
So I suggest this article which also offers a script to remove all unneeded command line tools.

For all of you willing to uninstall earlier version of Xcode the following article remains "How to remove Xcode from your Mac"

How to remove duplicate applications in LaunchPad

Early versions of OS X Lion suffered from Dock / LaunchPad duplicate applications. This was due to a database issue, improper refresh of application list.

So, here is a quick "how-to" that helps removing duplicate applications in LauchPad:

  1. Open a Terminal (Applications > Utilities >
  2. Issue the following commands:

sudo rm ~/Library/Application\ Support/Dock/*.db
sudo killall Dock 
After what there should not be any duplicate in LaunchPad.

If you were looking for a "How to removed duplicate applications from Open With menu" here is the article (originally written for OS X Lion, but it also works for OS X Mountain Lion)

mercredi 25 juillet 2012

Debugging Apache on OS X Mountain Lion

There are cases when Apache does not log any activity. It just does not start at all.

When logs are empty pinpointing to the error is more difficult, but I suggest first using a script embedded with Apache to check the config file format and content.

1. Open Terminal (Applications > Utilities >
2. Issue the following command: apachectl configtest

If there is an error or more in your config files then this script will return them. Correct it and try apachectl start to have Apache server starting on OS X Mountain Lion.

Duplicate applications in "Open With" on OS X Mountain Lion

After upgrading to Lion, or simply adding / removing some application you may find out that there are duplicates in the Finder "Open With" menu.

Well, things have not changed and you can still use the How-To for OS X Lion while using OS X Mountain Lion to set things back to normal.

jeudi 5 juillet 2012

Disabling IPv6 on OS X Lion

There are cases where IPv6 is messing things, especially with some Wifi base station, which, are not supporting IPv6 properly or at all.

So, when a device is not supporting IPv6, there is nothing worse than connecting to it and trying first to get all the IPv6 stuff from it. Initial handshake is then a mess, takes time and sometimes leads to an error.

But, Internet is pushing IPv6 more and more and new OSes are no more offering an easy way to get it OFF.

If you a are running latest version of OS X Lion, you have noticed that you can not, by default, select to turn IPv6 off...

So, here is a quick "How-to" that will show you how to disable IPv6 from your Mac running OS X Lion:

First, open a Terminal (Applications > Utilities > and run the following command:
networksetup -listallnetworkservices
This will display all network services configured / accessible on your Mac.

Select from the above list the interface / network on which you want to disable IPv6 and the issue the following command (still in Terminal):
networksetup -setv6off Ethernet
Now, if you open System Preferences > Network you can see that IPv6 is turned off for the Ethernet interface. You can do the same for Wifi and even VPN.

Should you need to switch on IPv6 on the same interface, then issue the opposite command:
networksetup -setv6on Ethernet

dimanche 17 juin 2012

Simple project with Symfony 2 in Netbeans 7.2 (beta)

Symfony is a PHP framework under the spotlight (used on forthcoming Drupal 8) and offers quite a cool approach while being light and fast, what is not always the case for other PHP frameworks.
I will illustrate how to use this framework with Netbeans 7.2 (beta at the time of writing).
But fist you may need to upgrade you PHP version on your mac (see upgrading PHP to 5.3 or 5.4 latest)

First: download and install Netbeans 7.2


Select the bundle with PHP or All as we need PHP tools to be setup. Once downloaded follow instruction to install Netbeans 7.2 (beta) on your Mac.

Second: download Symfony 2 framework


Select the Standard Edition and copy the link that just appears below the dropdown. I suggest using this method as downloading directly throught your browser might lead to an uncompressed file on your drive.
IMPORTANT: you need to download the .zip file.

Wget to the rescue


In a terminal (Applications > Utilities > Terminal or else) launch wget and make sure you know where you put this file... The location is going to be important for the next steps, as you'll have to provide it to Netbeans.
You can also perform some cleanup of the downloaded file and name it ""

Launching Netbeans 7.2


Now just launch Netbeans 7.2 (beta). If needed go to plugin and install all Symfony related plugins.

Symfony 2 in Netbeans 7.2 (beta)


Now go to Preferences, select PHP and check the Symfony2 tab.

Configuring Netbeans to use Symfony 2


Browse to your archive of Symfony 2 Standard Edition and click on OK. Now it's time to rock and roll and start creating our first Symfony 2 projet in Netbeans 7.2 (beta)

Let's create a New Project...


Now we are going to create a new project using Netbeans, PHP and the framework Symfony


Select PHP and PHP Application as shown on the above picture and move on by clicking on "Next >"


Name your project and put it in your "Sites" folder so that you can test it with OS X Apache. Make also sure to use proper PHP version (in my case 5.3) and move on by clicking on "Next >".


Tune your URL to match your local Apache configuration and move to the "Next >" step.


Select the Symfony 2 framework and move to the next and final step: creating the project, by clicking on the "Finish" button.



And now you can enjoy your Simple PHP project using Symfony 2 framework from within Netbeans 7.2

Make sure your config is OK


You are likely to have to perform some configuration tweaks in order to have your project fully running (in the above case: directory access has to be changed), but the framework in now installed and the project can be managed using Netbeans 7.2 (beta)

vendredi 4 mai 2012

How to uninstall CS5.5

Uninstalling Photoshop and/or an installed Creative Suite on your mac to pave the way for a new one or just having a clean install of the current one is a two steps process.

First Step: the Adobe Uninstaller


There are several Adobe tools in Applications > Utilities folder, but for now, the one of interest lies in the Adobe Installers folder.


Just launch the uninstaller by clicking twice on it

Time to select component(s)


Depending on what you plan to do next you can only select one component or more component to be removed from your system and or decide to left your "Preferences" installed.

Adobe takes care of every thing...


Should you have left Safari or any otther Adobe related product a warning will beprompted at you. And Yes, browsers like Safari are Adobe related product because of the Flash player
Then click on Continue and wait till the end of this first step (this might take some time depending on your system configuration and performances)


Once finished the uninstalled will provide you with a list of component that have been revomved from your system. At this point it is recommended to restart your system (close all opened applications before)



In the end you still need to launch a script to delete some files that are left alone by the previous tool. This script, availalbe on Adobe web site, is used to remove all files and making your Mac Adobe virgin again.


In the end

In then end, a reboot of your Mac could turn out to be helpful to make sure nothing has been left