Sunday, January 22, 2012

How to set up Apache Subversion to be accessed via a proxy (With Ubuntu))

I was going to access a subversion repository from my university network proxy for the first time and it was then that i realized that it is not possible with the usual subversion configuration. There are many options can be used in overcoming this  but the following simple solution worked for me very well.

Apache Subversion uses the 'servers' file to keep track of its' server configurations. If we need to use subversion through a proxy server the proxy-host and the port must be first configured in this file as it is not enabled by default. The simple steps to do this is;

1. We have to add the proxy server configuration into the 'servers' file in both locations.
  • /etc/subversion directory in our root directory 
  • .subversion directory in our home directory. 
However it would be sufficient only changing the 'servers' file in  .subversion directory to make this works.
2.However we can't edit the 'servers' file in etc/subversion directory since it demands root permission to edit it. So we have to open file as the root.
Open a terminal window by using ctrl+alt+T keys and enter the following command.

isha@pc:~$ sudo su
[sudo] password for isha: 

This will demand you for the password before providing root privileges.Enter the password and now we have root access in our computer. Go to the directory and open 'servers' file in text editor now.
root@isha-pc:/home/isha# cd /etc/subversion 
root@isha-pc:/etc/subversion# gedit servers
The 'servers' file will be opened now in the text editor. Look for the [global] settings section you will see some lines like this.

# http-proxy-exceptions = *,
# http-proxy-host =
# http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword

Change the 'http-proxy-host' with the address of your proxy server (excluding http:// part) and enter the port number into 'http-proxy-port' line. If you need edit the username and password settings too.

Important: Remove # symbol and all the spaces in front of the line you changed as additional spaces will result errors in the configuration. 

After editing it will look like,

# http-proxy-exceptions = *,
http-proxy-host =
http-proxy-port = 3100

Save the file and close it.

3.We need to add the same configuration into the 'servers' file in .subversion directory. However it doesn't need root access to edit this file. Therefore open the file as a normal user and add the above details. Save and close.

4. Open a new terminal tab and access subversion repository back.

A useful thread to know additional options will be, svn-over-http-proxy

Saturday, January 21, 2012

Install Flash Player in Ubuntu 11.10 (Oneiric Ocelot)

Flash player is one of the first applications you install after installing your operating systems. Most online media applications requires flash player in order to run various animations,clips and programs, therefore this post is purposed on installing flash in Ubuntu 11.10.

There are three ways to install flash player in Ubuntu.
1. Downloading  flash player package from the Adobe website and manually installing it. Before downloading select the .tar.gz package in the selection box.

2. Installing flash player through Ubuntu Software Center.

3. Installing flash player from Synaptic Package Manager.

Here i am describing how to install flash by using synaptic package manager. Open the synaptic package manager and type 'flash' in the search bar. You will see a list of packages is shown as the results.

Select the 'flash-plugin-installer' and mark it for installation. Now click the 'Apply' icon.

Synaptic Manager will now display the list of packages to be installed, description of the sizes of the packages etc. and will ask you whether you would like to install the program. Click 'Apply' now.

Flash player will be installed into your computer now. We can get this confirmed by again opening 'Synaptic' and searching for flash player. This time it will show the green mark on the flash-plugin-installer package which says that you have an existing flash player now.

Friday, January 20, 2012

How to Install Eclipse Indigo 3.7 in Ubutnu 11.10

This is a brief tutorial on how to install Eclipse Indigo IDE 3.7.0 in Ubuntu 10.10. Downloading and installation is straight forward but many users might have difficulties in opening and running eclipse as not setting the JRE/JDK path correctly. Let's see how this can be done.

1. First download the Eclipse IDE (I selected Eclipse IDE for Java EE Developers) from page. Download either 32 bit or 64 bit version from a suitable mirror from the selection.

2.This will download 'eclipse-jee-indigo-SR1-linux-gtk-x86_64.tar.gz' package into your computer. Extract the package to a location in the hard drive.You will see that 'eclipse' directory is being created after the extraction. 

3.Open 'eclipse' directory and there will be following files and directories. Click the 'eclipse' executable icon. 

Fig.1: contents in the eclipse directory
4.If all the configurations are correct, the IDE will be started by clicking this icon and you can just start coding etc. But in most of the cases it will not start at first time and you will see the following error message. 

"A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations:[SOME PATH IN YOUR COMPUTER] java in your current PATH" 

Fig.2: JDK or JRE path missing in eclipse

5. This error occurs mainly because of the IDE can't find the correct path to the JDK or JRE in our computer. Therefore we have to explicitly configure the path to JDK or JRE in the IDE configuration file. 'eclipse.ini' is the initialization file which carries out important configurations to run eclipse. This file can be found in our eclipse_home directory (See the figure 1 to identify eclipse.ini file).

6. Open the file in a text editor and add the following lines to the beginning of file. Replace the '/usr/lib/jvm/jdk1.7.0/bin' path with the PATH to JDK_HOME/bin in your local computer. Then save the file.

7. Now we have configured JAVA path for the Eclipse IDE. Click the 'eclipse' icon back and this time it will start the IDE successfully. Happy coding :)
Fig.3: Eclipse Indigo 3.7.0