Since Linux distributions started shipping with Firefox 3 Aptana has become harder and harder to get running error free. After getting a nice fresh Ubuntu 8.10 install running my first task was to get Aptana running so that in a pinch I could belt out some code and get myself paid.
There are only a couple of steps required to get Aptana running on Ubuntu 8.10. Install Java and install Firefox 2. Don’t panic I have never had trouble doing this despite the warning bells you are probably hearing. Firefox 2 and 3 can happily be installed on the same machine without argument.
Step 1: Install Java on Ubuntu
Simple, hardly requires a step.
- Go to Applications -> Add/Remove
- Change the Show drop down to read “All Available Applications”
- Search for Java
- Tick and Install Sun Java 6 Runtime – feel free to use one of the others, your choice but I can’t vouch for them working – Aptana says they prefer Sun and that is good enough for me.
Step 2: Install Firefox 2 on Ubuntu 8.10
The theory here is simple. Change your package sources to Ubuntu 7.10 (Gusty Gibbon) ones, which make Firefox 2 available, install Firefox 2, and then revert your package sources.
Back up our existing source list to make it easy to revert later.
sudo mv /etc/apt/sources.list /etc/apt/sources.list.original
Create a new package source list
gksudo gedit /etc/apt/sources.list
Paste the following list of package sources into this new file and save and close it.
deb http://archive.canonical.com/ubuntu hardy partner deb http://br.archive.ubuntu.com/ubuntu/ hardy main universe restricted multiverse deb http://security.ubuntu.com/ubuntu/ hardy-security universe main multiverse restricted deb http://br.archive.ubuntu.com/ubuntu/ hardy-updates universe main multiverse restricted deb http://packages.medibuntu.org/ hardy free non-free
Update using the new (well technically old) package source and install Firefox Two.
sudo apt-get update sudo apt-get install firefox-2
Step 3: Cleaning up the mess and getting the system back to usable
Copy back our original package source list
sudo mv /etc/apt/sources.list.original /etc/apt/sources.list
Update your package sources for next time.
sudo apt-get update
Step 4: Downloading and Running Aptana on Ubuntu 8.10
- Download Aptana from http://aptana.com/studio/download
- Create a script to launch it with the correct settings
- Create a new text file called startAptana in your home directory
- Add the following
#!/bin/bash export MOZILLA_FIVE_HOME=/usr/lib/firefox /usr/local/aptana/AptanaStudio
- Make the file executable by running
sudo chmod a+x startAptana
- from the Terminal
All things being equal you should now be able to ./startAptana and away you go.
If you get Java errors and can not find JRE messages change
/usr/local/aptana/AptanaStudio -vm /usr/lib/jvm/java-6-sun-188.8.131.52/jre/bin/java
(or whatever the path to your Java runtime is) in your startAptana file