Best operating system to run older configuration PC – Lubuntu

Choosing Lubuntu:

LatelyI was pushed to use my 7 year old PC for an emergency which had Windows 7 in it. It was very tough for me to use the old PC as compared to my latest one, even though it had 1.5GB or RAM and Dual Core Processor. I even had thoughts to install Windows XP to achive better performance.

Before starting anything, did some research to if I can find a Linux distro that could consume very less resources. I was always fond of the Ubuntu distros for as long as 10 years.
I was very fond of receiving the Ubuntu distro CDs that was transported freely to my remote village earlier in 2004 or 2005.
With that fondness I searched the latest distro and then came the Lubuntu (Lite-Ubuntu). I installed it in my PC with dual boot configuration. I should say that the performance is very impressive.

About Lubuntu:

Lubuntu is a good operating system for many old computers, but not for all of them.
Some computers have too little horsepower or memory. A rule of thumb is that the computer should not be more than 10 years old.
Lubuntu is recognized as a member the Ubuntu family by the developers of Ubuntu and has the same release nomenclature.

System Requirements, as per Lubuntu site:

We have done many tests and we've found out that Lubuntu can be installed on a Pentium II or Celeron system with 128 MB of RAM, but such a system would not perform well enough for daily use.
With 256MB - 384MB of RAM, the performance will be better and the system will be more usable.
With 512MB of RAM, you don't need to worry much.

If you like to use the system for normal activities like general browsing, viewing mails etc., the above config would be great.
But if you intend to use it for video watching like using Youtube, I must warn you, the browser you use could eat up all all memory.

Differences between Lubuntu and Ubuntu:

1. Different Desktop Environment (DE) – Lubuntu uses LXDE (Lightweight X11 Desktop Environment) while Ubuntu uses Unity as the default DE.

  • Both Lubuntu and Ubuntu share two major important things: same Core System and same Repositories.
  • Lubuntu and Ubuntu belong to the same family and talking about each as totally different two systems is not correct since they have some things in common.
  • They even share the same Forum Area and share many Wiki Pages. Other than that, they are the same.
  • The DE is what makes Lubuntu a lightweight OS, and of course the selected applications too because we make sure to use the lightest applications which are not resource hungry.
  • However, you are still free to use any application available in Ubuntu’s repositories, as long as your computer can run it.

2. Different Default Applications

Lubuntu Application Function
Xpad Stickies
Evince PDF Viewer
Gnumeric Spreadsheet
Abiword Docs
Simple-scan Scanner
Gnome-disk-utility Partition Editor
Light-locker Screensaver
Guvcview Webcam Utility
Gucharmap Character Map
Scrot Screenshot
Hardinfo System info
Mtpaint Image Editing
Xfburn Cd Burning
Pcmanfm File Manager
Gcalculator Calculator
Audacious Audio Player
Gnome-mplayer Video Player
Transmission Torrent
Pidgin Instant Messaging
Sylpheed Email Client
Mozilla Firefox Web browser
Leafpad Editor
File-roller (De)Compress files
Lxterminal Terminal
Gpicview Image Viewer

Download Lubuntu:

http://lubuntu.me/downloads/
https://help.ubuntu.com/community/Lubuntu/GetLubuntu

Official Websites:

http://lubuntu.me/
http://lubuntu.net/
https://wiki.ubuntu.com/Lubuntu

Installing Oracle JDK in Amazon AWS EC2 Ubuntu

Lately I tried to install Oracle JDK in one of my Ubuntu servers on Amazon EC2 instance. Unfortunately the inbuilt installers support the installation of OpenJDK.

For some requirements, I was in need of installing a specific version of JDK and test my application, you could get the older version from Oracle Site. I used the following script from one of the blogs, hope it helps someone.

#!/usr/bin/env bash
wget -O 'jdk-7u80-linux-x64.tar.gz' --no-cookies --no-check-certificate --header 'Cookie:gpw_e24=http://www.oracle.com; oraclelicense=accept-securebackup-cookie' 'http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz'
tar -xvf jdk-7u80-linux-x64.tar.gz
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.7* /usr/lib/jvm/jdk1.7.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws

The Key here is Oracle need you to accept the license terms before using the any version of Oracle JDK. You could do the same from the scripting by just adding --no-cookies --no-check-certificate --header 'Cookie:gpw_e24=http://www.oracle.com; oraclelicense=accept-securebackup-cookie' params to the WGET.

Alternative, you could download the installers/zip files from external CDNs, like REUCON, move it to EC2 instance through SFTP and install it.

Adding Oracle Datasource to JBoss EAP server

To add a Oracle Datasource to the JBOSS server, follow the steps

1. In the standalone.xml or in standalone-full.xml

<subsystem xmlns="urn:jboss:domain:datasources:1.2">
		<datasources>
			<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
				<connection-url>jdbc:h2:tcp://localhost/~/jbpm-db-new;MVCC=TRUE;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
				<driver>h2</driver>
				<security>
					<user-name>sa</user-name>
					<password>sa</password>
				</security>
			</datasource>
			<datasource jndi-name="java:jboss/datasources/JbpmDS" pool-name="JbpmDS" enabled="true" use-java-context="true">
				<connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
				<driver>oracle</driver>
				<security>
					<user-name>username</user-name>
					<password>password</password>
				</security>
			</datasource>
			<drivers>
				<driver name="h2" module="com.h2database.h2">
					<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
				</driver>
				<driver name="oracle" module="com.oracle.jdbc">
					<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
					<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
				</driver>
			</drivers>
		</datasources>
</subsystem>

2. In $JBOSS_HOME/modules/com/oracle/jdbc/main I have copied the ojdbc6.jar and created the module.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle.jdbc">
  <resources>
    <resource-root path="ojdbc6.jar"/>
  </resources>
  <dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
  </dependencies>
</module>

3. Now you could use the JNDI “java:jboss/datasources/JbpmDS” in your application

Must have Android apps for developers (Non Android developers)

The below list of apps are note rated or ordered in any ways.

1. AndroIRC – An IRC client application
2. Chrome – Mobile browser
3. Mozilla Firefox – Mobile browser
4. SSH/SFTP Server – Exposing your mobile as a SSH/SFTP server
5. AndFTP – FTP client
6. JuiceSSH – SSH client
7. aLogcat/aLogrec – Logger apps to view or save Android logs
8. Network Info II – Shows info about the phone and the current network, Bluetooth, IPv6 and Cell connection
9. kWS – Android Web Server
10. Google Analytics – Mobile client for Google Analytics
11. WordPress – Mobile client for WordPress dashboard
12. Control Panel for cPanel – Mobile client for cPanel Dashboard
13. File Expert – All in one File manager supporting Windows Samba, FTP, SFTP, FTPS, Webdev, Bluetooth OBEX client

Note: The above app list is used by me and has nothing to do with the other users.

Famous Short URL services

URL shortening is a technique used to make the URLs substantially shorter in length and still direct to the required page. This is achieved by using an HTTP Redirect on a domain name that is very short in length, which links to the web page that has a long URL.

URL shortening is also used for beautify a link, track the url activity, in some cases to used to disguise the underlying address for legitimate purposes.

Some of the famous URL shortening services are follows:

1. Adf.ly
2. Bit.ly
3. Goo.gl
4. Is.gd
5. Tinyurl.com
6. V.gd

Bhuvan, The Earth browser – A Geoportal of Indian Space Research Organisation

Most of us would have used the mapping services like Google Maps, Nokia Maps, Bing maps, Wiki Mapia etc on the net. But how many of us knew that we in India have a dedicated Mapping system. Yes, all those PSLV family satellites, Remote sensing satellites from ISRO send us a lot of images; details etc daily and these details are available to the public’s view.

Bhuvan is a Geo-portal of Indian Space Research Organization Showcasing Indian Imaging Capabilities in Multi-sensor, Multi-platform and Multi-temporal domain. This Earth browser gives a gateway to explore and discover virtual earth in 3D space with specific emphasis on Indian Region. The other services provided by the Bhuvan are Land services, Ground water prospects, Weather services, Ocean services, Disaster services

The Mapping system provides both the 2D and 3D viewing capability and can see information that is otherwise dry and academic, in ways that are visually fascinating. It helps you capture large databases of satellite data, which can be transformed into 3D presentations that capture the imaginations of the rest of us. Users can experience the comprehensive globe with multi resolution imagery, thematic information, historical multi temporal imagery, and other points of interest. As a User we can explore and visualize the world in a 3D landscape along with all other wide ranging tools to explore Bhutan.

Bhuvan also provides a mobile version of its site and can be accessed from here.

As a feast for developers, Bhuvan also provides the API’s to embed a true 3D digital globe, into the web pages. Using the API you can draw markers and lines, drape images over the terrain, allowing you to build sophisticated 3D map applications.

Bhuvan Quick Tour:

If you are unable view the video, click Here to download.

Create Web Services using Axis Java2WSDL, WSDL2Java and Eclipse for all Servers manually – Part 2

With all the basic configurations done as specified in the last Article we continue to develop the Business logic.

  1. Create a class named Calculator.java, place four public methods add, subtract, multiply and delete and place the appropriate logics in it.
    package com.itechgenie.services.impl;
    public class Calculator {
    	public int add(int a, int b) {
    		return a+b  ;
    	}
    
    	public int subtract(int a, int b) {
    		return a-b ;
    	}
    
    	public int multiply(int a, int b) {
    		return a * b ;
    	}
    
    	public int divide(int a, int b) throws ArithmeticException {
    		return a /b ;
    	}
    }
  2. This is the class that has to be exposed as the Web Service and we write the funky TestRunner.java class to do all out operations like creating WSDL file, creating stub file etc.
  3. Generate WSDL file using Java2WSDL: Axis has a tool called Java2WSDL, which generates a WSDL file for a web service using a Java class. Java2WSDL file takes the following arguments.
    1. o – name for WSDL file -> calculator.wsdl
    2. n – target namespace -> mx:com.itechgenie.services.Calculator
    3. l – url of web service -> http://<host:port>/<Project-Name>/services/calculator

    Summing up the above arguments the following command line arguments is created.

    String java2wsdlArgs[] = {"-ocalculator.wsdl", "-nmx:com.itechgenie.services.Calculator", "-v", "-lhttp://localhost:8080/axis/services/calculator", "com.itechgenie.services.Calculator"} ;

    Read this Article on how to run the command line java tools from Eclipse.
    You can run the Java2WSDL as follows in the TestRunner class. Naah, don’t ask how, just put the following lines the main method and press CTRL + F11.

    try {
    	Java2WSDL.main(java2wsdlArgs) ;
    } catch (Exception e) {
    	e.printStackTrace() ;
    }

    The Java2WSDL class has the System.exit(0); method called from inside. So lines after the Java2WSDL will not be executed. To get the other arguments supported you can just run Java2WSDL.main(new String[0]) ;. This will display all the arguments supported by Java2WSDL Utility and this works for other utilities also.
    After running this Utility you will find the calculator.wsdl file created in the root folder of the Project.

  4. Generate Server side and Client side codes using WSDL2Java: WSDL2Java is another tools provided by the AXIS, which can generate server side and client side Java classes using a WSDL file. These classes are needed for deploying the web service and also for accessing the web service using a Java client. This tool expects the following argument which includes the WSDL file generated in the last step.
    1. o – output folder -> src
    2. p – package for generated classes -> mx:com.itechgenie.services. generated
    3. s – generate server side classes as well
    4. *.wsdl – WSDL file of any web service

    Summing up the above arguments the following command line arguments is created.

    String wsdl2javaArgs[] = {"-osrc", "-pcom.itechgenie.generated.service", "-s", "calculator.wsdl", "-v"} ;

    Read this Article on how to run the command line java tools from Eclipse.
    Now run the WSDL2Java utility as follows.

    try {
    	WSDL2Java.main(wsdl2javaArgs) ;
    } catch (Exception e) {
    	e.printStackTrace() ;
    }

    Once the above command is run, Just refresh the project in eclipse, you will find the following files created inside the “com.itechgenie.generated.service” package.

    1. Calculator.java
    2. CalculatorService.java
    3. CalculatorServiceLocator.java
    4. CalculatorSoapBindingImpl.java
    5. CalculatorSoapBindingStub.java
    6. deploy.wsdd
    7. undeploy.wsdd

    The above files can be used in both Server and Clients side as Skeleton (CalculatorSoapBindingImpl.java) and the Stub (CalculatorSoapBindingStub.java) respectively.

  5. Binding the business logic with the Skeleton: Take the Skeleton file and you will find the exact methods that were available in our Business logic class (Calculator.java.).
    Create a instance of the Business class and invoke the appropriate method from the skeleton as follows (Find the lines highlighted in yellow.).

    package com.itechgenie.generated.service;
    
    import com.itechgenie.services.Calculator;
    
    public class CalculatorSoapBindingImpl implements com.itechgenie.generated.service.Calculator{
    
    	Calculator calculatorImpl = new Calculator() ;
    
        public int add(int in0, int in1) throws java.rmi.RemoteException {
        	return calculatorImpl.add(in0, in1) ;
        }
    
        public int subtract(int in0, int in1) throws java.rmi.RemoteException {
        	return calculatorImpl.subtract(in0, in1) ;
        }
    
        public int divide(int in0, int in1) throws java.rmi.RemoteException {
        	return calculatorImpl.divide(in0, in1) ;
        }
    
        public int multiply(int in0, int in1) throws java.rmi.RemoteException {
        	return calculatorImpl.multiply(in0, in1) ;
        }
    
    }

    That’s it; we are now done with the development part of the Web Service. All we have to do is to configure to make the service up and running.

  6. Last configurations to make our service available: Open the server-config.wsdd file inside the WEB-INF folder. You will find the following lines.
      <!--  Your Service from the deploy.wsdd file - Starts here -->
    
      <!--  Your Service from the deploy.wsdd file - Ends here -->

    Keep the file aside and open the deploy.wsdd from the WSDL2Java generated files. Copy the <service> … </service> tag completely and paste in between the comments said above.

  7. Conclusion: You can follow the steps 6 to 11 and create as many services as you want and paste them in the server-config.wsdd.
    With this the configurations for the Web Service is over. Export the Project as a War and deploy it in Web Server and point to the URL http://<host:port>/<Project-Name>/services
  8. This URL should display all the services generated from steps 6 to 11 with the links the WSDL files for the above.

    Click here to download the sample project.

Create Web Services using Axis Java2WSDL, WSDL2Java and Eclipse for all Servers manually – Part 1

There a lot of Web Service implementations available in market. The most widely used among them is the Axis way of implementation. There are a lot of Examples available in the web to create expose, consume the Web services using the Axis packages. But it is not feasible to work get the Axis complete packages inside corporate offices all of a sudden and yes I faced the same situation.

After some investment of time I found some funky stuff in web to create a Web Service with just a couple of jars in hand and off-course with the help of Eclipse.

Prerequisites:

  1. Eclipse, any version should be ok, but I was using the Eclipse Indigo with Ant installed in it.
  2. The set of jars needed. Jars are included in the Project sample.
    1. axis.jar
    2. commons-discovery-0.2.jar
    3. commons-logging.jar
    4. jaxrpc.jar
    5. log4j-1.2.15.jar
    6. saaj.jar
    7. wsdl4j.jar
    8. The sample web.xml, server-config.wsdd (These will be used later in the development steps).

Steps to develop Web Services:

  1. Create a Dynamic Web Project “SampleWebService” in Eclipse.
  2. Place the above said jars in the WEB-INF/jars folder.
  3. Open the Web.xml file and copy the following contents into it somewhere between tags. These contents are available in the sample attached.
      <servlet>
        <display-name>Apache-Axis Servlet</display-name>
        <servlet-name>AxisServlet</servlet-name>
        <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>AxisServlet</servlet-name>
        <url-pattern>/servlet/AxisServlet</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>AxisServlet</servlet-name>
        <url-pattern>*.jws</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>AxisServlet</servlet-name>
        <url-pattern>/services/*</url-pattern>
      </servlet-mapping>
      <servlet>
        <display-name>Axis Admin Servlet</display-name>
        <servlet-name>AdminServlet</servlet-name>
        <servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class>
        <load-on-startup>100</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>AdminServlet</servlet-name>
        <url-pattern>/servlet/AdminServlet</url-pattern>
      </servlet-mapping>
  4. Copy the server-config.wsdd next to web.xml file. We will reuse this file once again after complete the business logic of the server.
  5. Now the basic configurations are complete, we have to develop the business logic for the Web Service. In my example I have taken the Old school Calculator sample.
    Click here to go to the next Part of this article.

Setup your own Social Networking Websites

There a lot of social networking site available in web which includes the Google Plus, Facebook, Twitter etc. Its public and the open to all. But if you wish to Setup your own Social Networking site that is private and for a closed group you can use one of the following Open source scripts.

1. Elgg: Elgg empowers individuals, groups and institutions to create their own fully-featured social environment. Elgg, started in 2004, is an open source social engine which powers all kinds of social environments – from education and business to martial arts and rugby. If you are looking for a professional social intranet or want to run a site for your organisation, Elgg is a great choice. Click here to download.

2. Dolphin: Dolphin is the world’s most advanced community software. Open-source, independent, downloadable, scalable, customizable, full-featured, free software for building social networks, dating sites and web-communities. Loaded with video chat, recorder, video player, forums, groups, events, video messenger, mailbox, desktop app, video sharing, photo sharing, iPhone app and much more. Build your own business or advance your hobby with Dolphin!. Click here to download Dolphin.

3. Jcow: Jcow makes it easy & interesting to create Social Networks and online communities, Build a member community for your existing website, Build a social networking site like facebook/myspace/twitter. Click here to download JCow.

4. Etano: Etano can be used to start up a dating site, a social networking site, a classifieds site or any other type of site involving groups of people, companies, products. Click here to download.

5. Oxwall: Oxwall is used for a wide range of projects starting from family sites and custom social networks to collaboration tools and enterprise community solutions. Oxwall is unbelievably flexible and easy to use PHP/MySQL community software platform. Click here to download.

6. PeoplePods: PeoplePods is a framework that makes it easier to create community or “social” applications. It provides a flexible infrastructure within which members of a site can create, comment upon, and consume content of arbitrary types. Popular social functionality such as friend lists, personalized content views, bookmarking, and voting are automatically available within any PeoplePods application. PeoplePods can be used to build stand-alone sites, or can be layered onto existing sites such as those run using WordPress or other PHP applications. Click here to download.

7. Beatz: Beatz is a free opensource online social networking community script that allows you to start your own favourite artist band website just like Pure Volume. The script is coded in Php, Mysql and licensed under Creative Commons GPL license. In other words, its an online community script for sharing, discussing and learning about new artists and your favorites. Click here to download.