Archive for the 'OSX' Category

Tuning Eclipse IDE on Mac OS X

Friday, 6th February, 2009

Tuning Eclipse is pretty straight forward, passing the commonly documented command line arguments when running Eclipse on Mac OS X is not. At least not as easy as it would be in Windows. Like Windows shortcuts we have OS X ‘aliases’ but these do not allow us to specify additional arguments.

You can create a bash file to launch Eclipse with the extra parmeters but then we can’t place this on the Dock. Fortunately you can place these settings in the eclipse.ini - but where the hell is it?

Show package contents context menu in OS X

Finder will then present a new folder window:

eclipse.ini

Voila! You can enter your VM args into eclipse.ini

iWork ‘09 OS X Trojan Horse

Friday, 23rd January, 2009

For those people who have been infected by the OSX.Trojan.iServices.A Trojan horse (shame on you!) here are some removal instructions (credit to Aaron):

Open Terminal:

$ sudo su [enter password]
$ rm -r /System/Library/StartupItems/iWorkServices
$ rm /private/tmp/.iWorkServices
$ rm /usr/bin/iWorkServices
$ rm -r /Library/Receipts/iWorkServices.pkg
$ killall -9 iWorkServices

Apple offers a 30 day trial of iWork ‘09, it’s only £69 to purchase - a far cry from the £350 price tag for Office 2008 for Mac (unless you opt for the Home & Student Edition).

Mounting shared folders in Mac OS X Leopard

Wednesday, 12th November, 2008

Having recently switched to Mac OS X, I stumbled upon issues when mounting shared folders on my Macbook Pro from our Linux development server. Previously, both Windows Vista and Ubuntu have had no trouble sharing a directory then mounting it from the dev server via smbfs. This enables me (and other developers) to edit files locally which then also appear as a local files to our development server, where we run Apache / MySQL etc.

After sniffing around System Preferences in Leopard, and juggling some account credentials so SMB login details pair up, I could successfully mount my workspace folder. Make sure the appropriate permissions are set on your shared folder, then click options and disable AFP, and enable SMB.

System Preferences > Sharing
Sharing options

Unfortunately, some minutes later it unmounted itself. After some Googling, I found others with the same issue.

I read (unfortunately I’ve since lost the link) that changing from smbfs to cifs helps remedy this problem. I gave it a shot and it sure enough it cured the dropping issue.

However, when using cifs I would get permissions problems if I ran a script that manipulated / generated files in my workspace. My OS X uid and gid do not match those of the development server (Ubuntu); Mac uids start at 501 and Ubuntu creates users starting above 1000.

Fortunately simply telling the mount to ignore permissions seem to solve the problem. This is the mount entry in the development server’s /etc/fstab:

//192.168.0.1/workspace /home/greg/workspace cifs
      noperm,credentials=/home/greg/workspace.smb,rw 0 0

That should be all on one line but is broken over two for formatting purposes. Of course you substitute 192.168.0.1 with your Macbook’s UNC name or IP address. You should substitute ‘workspace’ with the name of your shared folder and change the mount point on the local server accordingly too.

The username and password specified in your credentials file will have to match your OS X user and password you set up when modifying the sharing options earlier.

Removing the MobileMe icon from the menu bar in Leopard

Wednesday, 12th November, 2008

If you choose not to sign up for MobileMe, there is no option in preferences to remove the sync icon (which you will never use) from the menu bar.

MobileMe preferences

Fortunately, holding the Command (Apple) key and dragging the icon to the desktop should detach and remove it.

You are currently browsing Greg’s blog (software development and operating systems) archives in the OSX category.

Categories

My Bookshelf

PHP in Action: Modern software practices for PHP Agile Web Development with Rails
xhtml 1.1 compliant   xhtml 1.1 compliant