Archive

Archive for the ‘Applications’ Category

M-Commerce Mobile App – My First J2ME Experience

December 27th, 2009

I am trying to create secure mobile application that would be used for m-commerce. From day one of the development i faced several challenges. I made the application more like a web browser, and the connection using http, (ofcourse finally after development it would be https) for the request and response. I created a cool graphical user interface with Kuix Library.  The J2ME application would interact with a PHP server application and all transactions will be in xml. I made the transactions light weight. Making the application look like it is loading the data from the local. I took care of all the security flaws, hiding most of the implementation from the user.

But still I am not satisfied of the security.

I wanted to create a seperate protocol, to ensure high security. Features

  1. The application should be bound to the mobile number, the user should be able to access the m-commerce service only through the mobile number he/she has registered.
  2. The application should be bound to the SIM card and the mobile itself. More to the SIM card.

Methods

  1. Try to push an sms from the server, on each login with a encrypted session key. After that use that key for every transaction you make in that particular session.
  2. Try to push an SMS with a generated permanent private key, on your first login with the application. Take the signature of the SIM card and save this private key and simcard signature in phone memory. From next login check if the saved signature and SIM signature matches. If so procees with the http login sending the username, password, and the private key.

Challenges in implementation,

  1. Its is very hard to know the mobile number from the J2ME application. There are some methods available, but they are not perfect and differs from each model.
  2. Still wondering if i could read the signature of the simcard, so that i could deactivate the Java application on sim card change.
  3. Waiting for the SMS would incur much time.

Any suggestions are most welcomed. Awaiting your comments

Applications, Mobile App , ,

Installing Ruby on Rails in Ubuntu 8.04(Hardy)

January 31st, 2009

Ruby on Rails is a web application programmers based on Ruby. It helps the programmers creat best web applications easily.

Here are the steps to set up Ruby on Rails in your Ubuntu or Debian based systems

Step 1: First step is to install some inportant packages that are recured,

sudo apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev

Step 2: Install ruby

RUBY="ruby-1.8.6-p111" //Current stable version

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/$RUBY.tar.gz

tar xzf $RUBY.tar.gz cd $RUBY

./configure --prefix=/usr/local --with-openssl-dir=/usr --with-readline-dir=/usr –with-zlib-dir=/usr

make clean

make

make install

make install-doc

make clean will clear any make files in that folder, previosly created that was configured without right options Checking whether ruby is installed properly

ruby -ropenssl -rzlib -rreadline -e "puts :success"

Step 3: Install Gem

Gem is a installer similar to apt, for ruby and ruby related packages

RUBYGEMS="rubygems-1.0.1" //Current stable version
wget http://rubyforge.org/frs/download.php/29548/$RUBYGEMS.tgz
tar xzf $RUBYGEMS.tgz
cd $RUBYGEMS
/usr/local/bin/ruby setup.rb
	

Step 4: Install Rails

gem install rails //This will install rails successfully.

Or gem install <paths to rails gem file>

Main Errors during Installation:

Error 1:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — zlib (LoadError)

using the following step for configuring ruby, that is before make, will remove this problem

./configure --prefix=/usr/local --with-openssl-dir=/usr --with-readline-dir=/usr –with-zlib-dir=/usr

Error 2:

no such file to load — mysql

undefined symbol: rb_Digest_MD5_Init – /usr/local/lib/ruby/1.8/i686-linux/digest/md5.so (LoadError)

Installing the mysql dev package and mysql library for ruby will clear this error,

sudo apt-get install libmysqlclient15-dev

sudo gem install mysql

Applications, Ubuntu

Installing XMMS in Ubuntu Hardy

January 6th, 2009

XMMS2 is not a replacement to XMMS in the Ubuntu Hardy (8.04)  repo. There is an offical ubuntu xmms pacakage, unfortunately wich is not available in Ubnuntu repo. We have to manually download and install it. You can download from the link

https://launchpad.net/ubuntu/hardy/i386/xmms/1:1.2.10+20070601-1build2

There are both soruce packages and ubuntu build deb packages in the above link…
But inturn dont mistake that installing XMMS2 from the repo is the XMMS player. After intallation there may be some combatibility problems. But there wont be any probleming in playing songs.

Applications, Ubuntu ,

nVidia Driver Problem with Hardy Solved- EnvyNG

September 30th, 2008

Hi folks, if you are still in a head ache of searching a driver for your nvidia graphics card, your head ache is solved here. Iam using my Dell XPS 1530 Lap, and the problem with the driver installation for nvidia graphics card is solved here.

EnvyNg in a package that searches the packages and required driver and installs it, reducing our head ache of finding a right driver.

Update the repositories list in Synaptic Package Manager, using the command

$sudo apt-get update

Now install the following the packages

  • envyng-gtk
  • envyng-qt
  • envyng-core

using the command

  • $sudo apt-get install envyng-gtk
  • $sudo apt-get install envyng-qt
  • $sudo apt-get install envyng-core

Now go to the Main menu, Applications->SystemTools->EnvyNG, and select whether nVidia or ATI and click Apply. Your driver will be installed and restart your computer.

Other debian derivative distros and other ubuntu versions donwload the envy package clicking below.

Click here to Download

Applications, Ubuntu ,

Booting Windows Xp as Guest inside Ubuntu Hardy both in same harddrive using VirtualBox

September 12th, 2008

You will have a question like can i boot my Windows XP or Vista inside Ubuntu of any Linux when they all reside in the same hard disk. The answer is here. The first step for that is you should create a virtual image of your hard drive.

Step 1: Creating Virtual hard drive.

$sudo VBoxManage internalcommands createrawvmdk -filename ./WinXP.vmdk -rawdisk /dev/sda -relative -register

You will get a “RAW host disk access VMDK file ./WinXP.vmdk created successfully.”

Step 2: Adding the Virtual disk file to the Virtual Box.

Open VirtualBox and choose the menu File->Virtual Disk Manager and in the window that opens click on the Add option and choose the recently created vmdk file (WinXp.vmdk)

Step 3: Creating a New Virtual Machine

Click on the New option and in the Create New Virtual Machine wizard, click Next

Enter the OS Name as WinXP and OS Type as Windows XP, and Click Next

choosingostype

Select the Memory based on the availabilty. In my case i have 2 gb Ram and so i selest 330 mb. And Click Next

choosingmemory

Here comes to select the Virtual Hard drive file. Click on Existing option

choosingvirtualhd

Select the recently created vmdk file. (WinXP.vmdk)

Click Next and then Finish option.

Step 4: Editting the Settings of the Virtual Machine

Select the recently created virtual machine (WinXp) and Click on the Settings page. And enable Audio, Serial Ports, USB ports, CD/DVD drive as host cd/dvd drive, etc

Goto Shared Folders option and select a shared folder created some where previously (here i have selected /tmp/VirtualBox/SharedXP, which i created previously)

Now select you Start option, and for your surprice you will see your grub menu…

afterboot1

afterboot2

afterboot3

afterboot4

afterboot5

Note: Here in grub, the first option is the ubuntu which iam already in, its not adviced to select it again, select the Virtual OS type you have choosed already.

Applications, Ubuntu, Virtualisation ,

How to partition harddrive in your new laptops without removing your Vista?

September 3rd, 2008

Most of the laptop brands you purchase comes with only a single partition(or only with C drive) and few partions like Recovery, which is not for our use. Most people think of Partition Magic softwares or Boot CDs. Your choice are right but you cannot be sure, whether the preinstalled Vista will be safe. Most case, your partitioning ends in total formatting of the harddrive. Is there any way to partition the laptops, without formatting or removing vista or recovery. The answer is here.

Put the Ubuntu Live CD in the CD drive and boot in the Live cd mode. Goto Bios settings, change boot priority to cd drive, and put the cd in drive save and restart. In the live cd mode, use the menu System->Administrator->PartionEditor(Gparted) or in the terminal $sudo gparted to open the GParted software.

In a system there can be only 4 Primary partions and each Primary partions have few good number of Secondary partions. In the Gparted software you will get a good picture of your harddrive. Locate the C Drive in the list, Right Click and select Resize/Move. Now you can find the used portion of the C Drive being yellow shaded. Click and drag your left end pointer as you wish to allocate your C Drive. (Not less than the used portion). Now the C Drive will be reduced leaving a free memory. Now right click and select New option.

If you have already, three primary partions, create the fouth partion as extended to have some partition as you require as extended. Have look at the picture you will get a clear picture. Since for installing Linux, you wil require swap, home partion, etc and so only four primary partions will not be enough.

gparted

Applications, Ubuntu ,

Finding the Errors while using Empathy

August 29th, 2008

While using Empathy if you feel some problem, start empathy using the terminal and find the errors. Goto terminal, use

rosarioarun@ros-lap:~$ sudo empathy

Now you can find the errors displayed, try to fix the errors… If you dont get the call option in the context menu, try to solve the errors. Me getting the Call option in the context menu. or Mail me the errors we will try to find the solution.

Applications, Internet, Ubuntu ,

Booting Other Operating Systems inside Ubuntu using Virtual Box

August 28th, 2008

Here is my encounter with Virtual Box. You may download the iso file the operating system from internet, if you wish to boot them with out burning them to a cd or if you have your iso file in pendrive or external harddrive, and if you want to boot them from the drive directly, the answer is here.

Virtual box is a project developed by SUN. Download VirtualBox software from the link below, for your favourite operating system you are using and boot any operating system from any.

Here in my encounter, i have booted Ubuntu Ultimate Edition, that is as an downloaded ISO file in my home directory. Download the Virtual Box deb package from,

And then install it just by double clicking the deb file. You can start the Virtual Box software from the menu Applications->System Tools->Sun xVM Virtual Box. As Virtual Box requires some write permissions, its better to start in the command using su. So, move to the terminal and give the command

rosarioarun@ros-lap:~$ sudo VirtualBox

In the Virtual Box Window,

  1. Click New Buttom, a Wizard appears
  2. Click Next,
  3. Type a Name you wish to give and select the OS u wish to boot (In my case name is Ultimate and type is Ubuntu) and click Next
  4. Select the Base memory size, based on you the RAM u have, if you select more the Virtual box will boot the OS soon.(My case 900 MB) Click Next
  5. Then click Next and in the confirmation Window Click Continue
  6. Now Click Finish

Now the Virtual Box Main Window will appear back.

The ISO that i wish to boot is in the location

/home/rosarioarun/Desktop/ultimate-edition-1.8-x86/ultimate-edition-1.8-x86.iso

Click on the Name you just created (Ultimate) and click Start. Read the Capture info and click ok.A wizard will appear.

bootlist

Virtual Box Software with Inserted Bootlist

  1. Click Next
  2. In the Media Source below, Select the path of the Image File  (In my case /home/rosarioarun/Desktop/ultimate-edition-1.8-x86/ultimate-edition-1.8-x86.iso)
  3. Click Next and then Finish

The OS will be booted as a separate window, you can capture and uncapture to go inside and come out the new OS booted.

OR, Select the Name and click Settings,->CD/DVD-ROM-> ImageFile and select the Image file u wish to boot. And click Ok.

Now click Start to boot the new OS.

afterboot1

After Booting Ubuntu Ultimate

afterboot2

Inside Ultimate with VirtualBox

Applications, Ubuntu, Virtualisation ,

Virtual Box

August 28th, 2008

Virtual Box is a community delovped project, by SUN for the purpose of OS Virtualisation. That is, any other operating systems can be booted inside other operating systems inside a virtualisation window. The Virtual box software will manage the resources required for the newly booted software and the currently running software. It will allocate the free resources within itself, to boot the new operating system virtually.

Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris and many other guest operating systems. So this includes almost all most frequently used operating systems.

With Virtual box you can boot Guest operating systems in USB, Portable hard drive, or ISO images of operating systems in any host operating system. That is you can boot the downloaded iso images of opertaing systems(linux) in live -cd mode without burning them to a cd.

Applications, Ubuntu, Virtualisation ,

How to Compile and Run Java Program in Linux using JDK

August 28th, 2008

Normally most the linux distros comes with gcj, which is a Java compiler for gnome. Most of the java programmers prefer only jdk. So how to compile and run a java program in linux. Download the latest jdk from the sun website. (jdk-1_5_0_16-linux-i586.bin  for a x86 system)

http://java.sun.com/javase/downloads/index_jdk5.jsp

And then to install jdk use the following

rosarioarun@ros-lap:~$ ./jdk-1_5_0_16-linux-i586.bin

This will extract the jdk and give an folder in current path as, jdk-1_5_0_16, this folder will have all bin, lib directories required by the javac compilation and execution.
All the contents inside this directory will be same as the conents when you install the jdk in the windows. You will have a question that, why not i use the extracted jdk folder in windows, in linux to compile the java program in linux.
Both the extracted jdk folders in windows and linux are not the same, the difference is the extracted contents in windows will have all exe file, where as in linux it will be binary files.
That is javac in windows will be javac.exe and in linux it will be javac.bin
Now to set the path proceed as below

rosarioarun@ros-lap:~$ PATH=$PATH:/home/rosarioarun/jdk1.5.0_16/bin/

this is just a single line script to set the path, you can view the PATH variable using echo

rosarioarun@ros-lap:~$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/rosarioarun/jdk1.5.0_16/bin/

Now you can compile the java programs using javac and run them using java commands.

  1. Compiling: $javac filename.java
  2. Executing: $java filename

Applications, Ubuntu ,