Running different types of executable files on Ubuntu Gutsy

  1. .deb files, just double click and the package manager will automatically run
  2. .sh files, just type “sh filename” in the terminal
  3. .bin files, type “chmod +x filename” to allow the file to execute and then type “./filename
Tagged , | Leave a comment

Setting up Java Development Environment on Ubuntu Gutsy, Part 2: Configuring Java Environment Variables on Ubuntu Gutsy

The default command line interface for Ubuntu Linux is called bash (Bourne Again Shell), and in order to add Java environment variables, we will edit a file named “.bashrc” and add our commands inside, here we go:

  1. Edit the “.bashrc” file by typing “sudo gedit .bashrc” which will open gedit; the famous Linux text editor in Read/Write mode (Note: If you don’t use the keyword sudo to get administrative privileges, then the file will be opened in Read Only mode)
  2. Scroll to the end of the file and add your env. variables as in the following example which I used to define the JAVA_HOME env. variable:
    1. Append this line to the end of the .bashrc file: “export JAVA_HOME=/usr/lib/jvm/java-6-sun” where I point this variable to the location of my default JDK
    2. Save the file and exit and close the terminal
    3. Reopen the terminal and to check that everything went fine, type the following command: “echo $JAVA_HOME” which should result in displaying “/usr/lib/jvm/java-6-sun”, otherwise, repeat the process again, you must have done something wrong.
Tagged | Leave a comment

Subversion Client on Ubuntu Gutsy

Subversion is one of the most famous VCS (Version Control System) that supports both version control models; the copy-modify-merge and the lock-modify-unlock ones, and my favorite Subversion clients is called Work Bench; very user friendly and fast, the best one I’ve met till now and it’s available in the official Ubuntu repositories, here is how you can get it:

  1. Open the terminal and type: “sudo apt-get install svn-workbench”
  2. If you don’t find its launcher in Applications>Programming (in older versions of Ubuntu), you can run it directly from the terminal by typing “svn-workbench” or create a launcher in the menu by yourself by right clicking “Applications”>Edit Menus, select Programming and click “New Item”, customize the launcher as you wish, but you must fill in the field “Name” and “Command” at least, type “svn-workbench” in the “Command” field.
Tagged | Leave a comment

Setting up MySQL Server and GUI Client tools on Ubuntu Gutsy

  1. Type the following in the terminal: “sudo apt-get install mysql-server mysql-query-browser mysql-admin” (Note: You can read the manual of any command by invoking the “man” command and providing the command’s name as its parameter, e.g. “man apt-get”
  2. I don’t like services to be running in my RAM without need, and that’s unfortunately the default after you setup your environment. Go to System>Administration>Services and scroll down till you find three Database Server entries, unselect them (Reselect them of course when you need to work with it again)
Tagged | Leave a comment

Setting up Java Development Environment on Ubuntu Gutsy, Part 1

Setting the Java Development Environment on Ubuntu Linux is quite a straightforward process, you just need a little knowledge with working with the Terminal (as I prefer it, much faster), here we go:

  1. Open the terminal, update your local software list by typing “sudo apt-get update”, I use the keyword sudo here to have administrative privileges of the “root” user which is needed to run many commands among which is “apt-get” (Note: pressing tab once in the terminal will auto-complete your command and double tabbing lists all available names starting with the letters you already typed)
  2. Type “sudo apt-get install sun-java6-jdk”, and by the way, if you need the Java plugin for firefox as well, you can type “sudo apt-get install sun-java6-jdk sun-java6-plugin” which is unfortunately not yet available for the 64-bit Linux platforms 😦
  3. Dependencies between packages will be automatically resolved by the apt-get command and installation will start after your confirmation (Note: you can accept the license agreement in the terminal by simply pressing the right arrow button and then pressing Enter, took me a lot of time to figure that out :D)
  4. After installation is complete, check you have the correct Java version by typing “java -version” in case you have multiple JDKs.
  5. If you still haven’t got the right JDK as your default, simply use the “update-java-alternatives -l” command to list the available JDKs on your system and then choose the one you need by typing “update-java-alternatives -s JDKname“, we’re done! Simple, isn’t it?
Tagged | Leave a comment