Archive

Archive for the ‘Mac OS X’ Category

LibreOffice backup folder on MacOS X – recovering files

/Users/<user name>/Library/Application Support/OpenOffice.org/3/user/backup
Categories: Mac OS X

How to convert Mac Keynote presentations

With the online conversion service at http://www.zamzar.com/ you can convert a Keynote presentation (.key) to .ppt or .pdf.

Categories: Mac OS X

Setting Android and Path environment variables on Mac OS X

December 21, 2011 2 comments

When bash starts it reads the following files every time you login. For the purposes of OS X, this means every time you open a new Terminal window.

  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login (if .bash_profile does not exist)
  • ~/.profile (if .bash_login does not exist)

When you start a new shell by typing bash on the command line, it reads .bashrc

Finally, OS X also uses ~/.MacOSX/environment.plist to set more environment variables, including paths if necessary.

Add Android and PATH variables to ~/.profile, e.g.:

export ANDROID_HOME=/Users/cduu/Development/bin/android-sdk/android-sdk_r15-macosx_x86
export PATH=/Users/cduu/Development/bin/android-sdk/android-sdk_r15-macosx_x86/platform-tools:/Users/cduu/Development/bin/android-sdk/android-sdk_r15-macosx_x86/tools:$PATH

Check environment variables in a new Terminal with:

set
Categories: Android, Development, Mac OS X

Using NTFS Filesystem with Mac OS X

Update:

Since a fresh Mac OS X 10.6.8 (Snow Leopard) installation the ntfs-3g solution didn’t work. I use NTFS Mounter to mount an external ntfs drive. It should also work with Leopard.

 

MacPorts helps a lot to install command-line, X11 or Aqua based open-source software on the Mac OS X operating system.

You can download MacPorts here. After installing MacPorts, download and unarchive NTFS-3G. Open a terminal, switch to the folder and type the following command:

sudo port install ntfs-3g
Categories: Mac OS X

Install pkg-config on Mac OS X

November 26, 2011 2 comments

You can download pkg-config here.

MacPorts helps a lot to install command-line, X11 or Aqua based open-source software on the Mac OS X operating system.

You can download MacPorts here. After installing MacPorts unarchive the pkg-config file, open a terminal, switch to the folder and type the following command:

sudo port install pkgconfig

Java/Eclipse on Mac OS X: where is the source code for java

October 31, 2011 1 comment

The JDK installed by default does not have a src.jar. But if you install the ‘Java Developer package’ from Apple, you will get /Library/Java/JavaVirtualMachines/1.6.0_26-b03-384.jdk, which has src.jar under Contents/Home.

  • After installing the JDK point to it from your IDE.

Categories: Android, Development, Mac OS X

Uninstall Xcode

Use the following command to uninstall Xcode:

sudo <Xcode>/Library/uninstall-devtools --mode=all

<Xcode> is the location you’ve installed Xcode.

If you’ve installed Xcode with the default settings you can use this command:

sudo /Developer/Library/uninstall-devtools --mode=all
Categories: Development, iOS, Mac OS X, Xcode

Mac OS X shortcuts

Key Description
Control-A (Home) and Control-E (End) This is pretty much the substitution for Windows button HOME and END. Pressing Command-← or Command-→ performs the same action.
Control-D (Delete) and Control-H (Backspace) In Windows, we’ve got two buttons for this : DEL and BACKSPACE. You can use Fn-Delete to perform forward deletion while the button Delete acts as Backspace.
Cmd + alt + ctrl + 8 Invert screen
Cmd + alt + ctrl + , or . raise or decrease contrast
Control-Shift-Eject Turn your display off without logging out from the system.

F-Keys

Key Description
F9 show all windows
F10 show all windows of a programm
F11 show Desktop
F12 show Dashboard
Categories: Mac OS X

Show hidden files in Finder

In Terminal type:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

To set it back:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

There is also an AppleScript which shows/hides hidden system files.

Categories: Mac OS X

How to install the Android SDK on Mac OS X

  • Download the latest version of the Android SDK
  • Unzip it and move it where needed, e.g. to your user directory
    unzip ~/Downloads/android-sdk_r11-mac_x86.zip
  • Open Terminal.app (in /Applications/Utilities)
  • Edit ~/.profile and append (if you have the SDK moved to your user directory):
    export PATH=~/android-sdk-mac_x86/platform-tools:~/android-sdk-mac_x86/tools:$PATH
    export ANDROID_HOME=~/android-sdk-mac_x86
  • Load new .profile
    source .profile
  • Run Android SDK Manager
    android
  • Install Components
Categories: Android, Development, Mac OS X