Monday, July 18, 2011

Eclipse installation and configuration on Ubuntu and OS X

Ubuntu Install

Reference: http://askubuntu.com/questions/47864/how-to-update-eclipse-3-5-2-to-3-6-2

Download http://www.eclipse.org/downloads/ » Eclipse Classic » Other Downloads » 3.6.2 » Platform Runtime Binary » eclipse-platform-3.6.2-linux-gtk-x86_64.tar.gz

Make a .deb package

As root

cd ~
mkdir eclipse-platform
apt-get install fakeroot dpkg-dev debhelper unp
unp eclipse-platform-3.6.2-linux-gtk-x86_64.tar.gz
mkdir -p eclipse-platform/usr/lib
mv eclipse eclipse-platform/usr/lib/
mkdir -p eclipse-platform/usr/bin

vi eclipse-platform/usr/bin/eclipse

#!/bin/sh

export UBUNTU_MENUPROXY=0
exec /usr/lib/eclipse/eclipse “$@”

chmod +x eclipse-platform/usr/bin/eclipse
mkdir -p eclipse-platform/usr/share/applications

vi eclipse-platform/usr/share/applications/eclipse.desktop

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Eclipse
Exec=eclipse
Terminal=false
Icon=/usr/lib/eclipse/icon.xpm
Comment=Eclipse Integrated Development Environment
Categories=Development;IDE;

mkdir eclipse-platform/DEBIAN

vi eclipse-platform/DEBIAN/control

Note: Replace maintainer’s name on line 4.

Package: eclipse-platform
Version: 3.6.2-1
Architecture: amd64
Maintainer: YourName
Depends: openjdk-6-jre | sun-java6-jre
Section: devel
Priority: optional
Description: Eclipse IDE, static-linked, minimal plugins.

fakeroot dpkg -b eclipse-platform eclipse-platform_3.6.2-1_amd64.deb
dpkg -i eclipse-platform_3.6.2-1_amd64.deb
rm -rf eclipse-platform*

OS X Install

  • Download http://www.eclipse.org/downloads/ » Eclipse Classic » Other Downloads » 3.6.2 » Platform Runtime Binary » eclipse-platform-3.6.2-macosx-cocoa-x86_64.tar.gz
  • Uncompress it
  • Copy folder “eclipse” to /Developer/Applications

Plug-ins

Launch Eclipse

Help » Install New Software   // Restart after each install

Configuration

OS X

Eclipse » Preferences » PyDev » Interpreter – Python

  • Click on “New…” (top right)
    • Interpreter Name: Python 2.5
    • Interpreter Executable: /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
Thursday, July 14, 2011

OS X: Launch Terminal via a keyboard shortcut

Applications » Automator

  1. Choose “Services”
  2. On top-right: Service receives [no input] in [any application]
  3. Search for “Launch Application” on the left and drag it to the right
  4. On the right, select Terminal (in Other… » Utilities)
  5. File » Save and name it “Launch Terminal”

System Preferences

Keyboard » Keyboard Shortcuts

  1. On the left, select Services
  2. On the right, in General » Launch Terminal
  3. Double click on the right of the name (in the “invisible shortcut column”)
  4. Assign the key combinaison (I use Ctrl+Alt+Cmd+T)

Source in Mac Rumors’ Forum.

Wednesday, July 13, 2011

OS X: Lock the screen via a keyboard shortcut

Update: There’s actually a default shortcut: Ctrl+Shift+Eject.

What I did to undo what I did below:

  1. System Preferences: Keyboard » Keyboard Shortcuts » Uncheck “Start Screen Saver”
  2. Finder: Home » Library » Services » Delete “Start Screen Saver.workflow”

Read More