Tuesday, December 7, 2010

MS-Paint Alternative on Ubuntu 10.04


KolourPaint is clone to MS-Paint.

How to Install KolourPaint
  1. Open Synaptic Package Manager(System -> Administration -> Synaptic Package Manager).
  2. Type KolourPaint in Quick Search box.
  3. Right click and mark KolourPaint for installation.
  4. Click on Apply to install.

Installing Apache Ant | JAVA with Brain

Installing Apache Ant | JAVA with Brain

How Class.forName() method works ? | JAVA with Brain

How Class.forName() method works ? | JAVA with Brain

Hello World using Apache ANT | JAVA with Brain

Hello World using Apache ANT | JAVA with Brain

Struts2 with login interceptor | JAVA with Brain

Struts2 with login interceptor | JAVA with Brain

How to change Launcher Image on Ubuntu 10.04


  1. Right click on Launcher (shortcut for application) and select Properties.
  2. On the Basic tab, default image is showing, click on that image.
  3. It will open a window to select desired icon image file.
  4. Select the image and press Open button.

Monday, December 6, 2010

Creating shortcut of application on Desktop

Creating shortcut for applications on Ubuntu is as easy as it is on Windows.


Creating shortcut of applications that comes under Applications Menu
  1. To create shortcut for any application on desktop-
  2. Goto Applications Menu.
  3. Select desired application,
  4. Right click and choose 'add this launcher at desktop'.
Creating shortcut for Other Applications
  1. At Desktop, right click and select 'create launcher' option.
  2. At the opened window fill the values for -
    1. Name – This can be any valid name.
    2. Command – Use browse button to select executable file.
  3. Click OK button to complete the creation process.

Alfresco Installation on Ubuntu 10.04


Alfresco Installation on Ubuntu 10.04

Steps that you need to follow to install Alfresco on Ubuntu 10.04-
  1. Install Java 1.6.0.xx
  2. Install Apache-Tomcat 6.0.xx
  3. Install Mysq 5.1.xx
  4. Create alfresco database.
  5. Alfresco Installation

Note : xx – your application version.

  1. Java Installation
    1. To install Sun- Java you need to activate Lucid partner repository.
    2. Follow path
      • System->Administration->Software Sources.
      • Select Other Software tab and check below mention two entries.

    3. Open Terminal and type the following command to update system packages.
      sudo apt-get update
    4. Open Synaptic Package Manager type sun-java in Quick Search textbox.
      Select sun-java6-jre for installation, it will automatically select all the related packages.
    5. Finally click on 'Apply' button to begin installation process.
      To check the successful installation, open Terminal and type the following command , it will give the information of installed java version.
      java -version
  2. Tomcat Installation
    1. Pre-installed java is neccessary for installing Tomcat.
    2. To check java installation on your system type the command-
        dpkg --get-selections | grep sun-java
        if java is installed on your machine then it will give following output,otherwise you need to install Java as I have explained in previous section.
        sun-java6-bin install
        sun-java6-jdk install
        sun-java6-jre install
        sun-java6-plugin install
    3. Now download Apache-Tomcat6.0.xx.tar from http://tomcat.apache.org/download-60.cgi.
    4. Now Extract it using Archive Manager or type following command at Terminal-
      tar xvzf apache-tomcat-6.0.xx.tar.gz
    5. Now move tomcat to permanent location. As example I have moved tomcat to /usr/local/tomcat you can choose some other location.
      sudo mv apache-tomcat-6.0.xx/ /usr/local/tomcat
      Note: Move command syntax is -- mv from_location to_location So either be on that location or use full path.
    6. Tomcat requires setting the JAVA_HOME variable. The best way to edit .bashrc file.
      gedit ~/.bashrc
      Add the following line:
      export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.xx
    7. Start tomcat by double clicking on startup.sh file or first cd into /usr/local/tomcat/bin and run the startup.sh as-
      ./startup.sh
      Note : To run .sh file you must have execute permission on files to execute.
          To see permission on files -
          ls -l
          To change permission use chmod command.
  3. MySql Installation
    1. Open Synaptic package manager type mysql-server in Quick search and select
      mysql-server-5.1
    2. For Mysql-query-browser find and select mysql-query-browser, click on Apply to install.
  4. Create alfresco database
    1. Open Terminal and type following commands-
      mysql -u root -p
      it will ask for root password, type root user password.
    2. Run following commands-
      create database alfresco default character set utf8 collate utf8_bin;
      grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
      grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;
    3. Check that database with name alfresco is created by using show commands-
      show databases;
      This will show the list of all the databases that are already created.
  5. Alfresco Installation
    1. Download alfresco-community-war-3.3g.tar.gz from alfresco site.
    2. Extact it some location.
    3. Copy following jars into tomcat/lib folder-
      • serializer.jar and xalan.jar from endorsed folder.
      • commons-el.jar
      • mysql-connector-java-5.1.13-bin.jar.
    4. Copy war files at tomcat/webapps-
      • alfresco.war
      • share.war
    5. Create following folder structue inside tomcat-
      tomcat/shared/classes/alfresco
    6. Copy following folders form extracted alfresco-community-war-3.3g / extensions and paste them at tomcat/shared/classes/alfresco/
      • extension
      • messages
      • web-extension
    7. Create folder alf_home at your home folder and copy and paste following files
      • alfresco.sh
      • alf_start.sh
      • alf_stop.sh
      • apply_amps.sh
      • virtual_alf.sh
      • virtual_start.sh
      • virtual_stop.sh
    8. Copy bin folder from extracted folder's commands folder to alf_home.
    9. alfresco.sh
      • Open alfresco.sh with gedit find 'ALF_HOME=' and put created alf_home folder path.
        ALF_HOME=/home/meenakshi/alfresco_data/alf_home
      • For 'APPSERVER=' put the path of tomcat. For my case this would be-APPSERVER="/usr/local/tomcat"
      • For JAVA_HOME put path for java. For example-
        export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.22"
      • save changes and close the file.
    10. alf_start.sh
      • Open alf_start.sh and correct the path of alfresco.sh. For example-
        #!/bin/sh
        sh /home/meenakshi/alfresco_data/alf_home/alfresco.sh start
    11. alf_stop.sh
      • Open alf_stop.sh and correct the path of alfresco.sh. For example-
        #!/bin/sh
        sh /home/meenakshi/alfresco_data/alf_home/alfresco.sh stop
    12. Paste alfresco-global.properties at /usr/local/tomcat/shared/classes and modify some entries, I am giving sample entries; replace them with your original values.
      • dir.root=/home/meenakshi/alfresco_data/alf_data
      • db.name=alfresco
        db.username=alfresco
        db.password=alfresco
        db.host=localhost
        db.port=3306
      • db.driver=org.gjt.mm.mysql.Driver
        db.url=jdbc:mysql://localhost:3306/alfresco
      • Lastly increase the memory block size in /etc/default/tomcat6. Open tomact6 file using gedit and search for
        JAVA_OPTS="${JAVA_OPTS} -XX:+UseConcMarkSweepGC" and change it into
        JAVA_OPTS="${JAVA_OPTS} -Xms512m -Xmx512m"
    13. Now run script alf_start.sh.
    14. Check log files that are craeted at tomcat/logs folder for any errors and starting process for alfresco.
    15. Alfresco.log is created at your alf_home.
    16. If everything goes fine and tomcat start and deployed alfresco without any error then type- 
      http://localhost:8080/alfresco