Posts

Easy tricks for your needs...

01. Remove duplicate entries (line) from the text file in Ubuntu         sort random.txt | uniq -u > rand-shorter.txt 02. Change the folder tree rights to 777 in Ubuntu                    chmod -R 777 my_folder_name 03. MySQL data export to the database from sql file                   mysql -uroot -p -h localhost mydb < mydbbackup.sql 04. Find the running port number for given process in ubuntu            ps -ax|grep process_name          example:  ps -ax|grep java will list out all the process having name java 05. Kill running process         kill -9 12344 (Here 12344 is process number given by "ps -ax|grep myprocess" command) 06. Kill a process for know port         sudo lsof -t -i:<port-number>         Example: sudo lsof -t -i:9000         The result would be the process number. Then use " kill -9 <process-number >" to kill the process. Please see the (05) of the above.         

How to change the splash screen on ubuntu 12.04

Run bellow command on the shell. sudo update-alternatives --config default.plymouth Then it will ask you to select the default one from the available list Selection Path Priority Status ------------------------------------------------------------ 0 /lib/plymouth/themes/edubuntu-logo/edubuntu-logo.plymouth 150 auto mode 1 /lib/plymouth/themes/edubuntu-logo/edubuntu-logo.plymouth 150 manual mode * 2 /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth 100 manual mode Press enter to keep the current choice[*], or type selection number: You can select appropriate number from the list and enter.   If your login screen is not graphical on ubuntu 12.04 you can change it back to the normal operation as bellow. Run command  sudo gedit /etc/default/grub  And edit the grup file as bellow. Bellow line should be active (No # at the beggining) and

Webdav example in Spring Security with password encription

You can find few set of link which will guide you to do the spring configuration for the webdav. But, i have reallized that most of the readers getting trouble when implementing those codes as they are not properly explain how to do it basic level. Here is the clear working guide for the spring webdav integration with encripted password. 01. Setup the spring blank project from your desired developement tool (netbeans, eclipse,intelliJ IDEA). I am using intelliJ on this tutorial. And setup spring security example based on the available sources on the web. Here is the few links you may try. http://blog.solidcraft.eu/2011/03/spring-security-by-example-set-up-and.html http://static.springsource.org/spring-security/site/docs/3.0.x/reference/sample-apps.html After completing the above steps, you could be able to log in to the web application using form based authontification with encripted password on the database. Now lets setup for the webdav folder access for the above web proj

Open JDK to Sun JAVA JDK on Eclipse

This is how to change the ubuntu open jdk to sun jdk Step 1. Open Shell Step 2. indika@indika-lenovo-3000-g550:~$ java -version java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1) OpenJDK Server VM (build 19.0-b09, mixed mode) Step3. ndika@indika-lenovo-3000-g550:~$ sudo update-alternatives --config java [sudo] password for indika:  There are 3 choices for the alternative java (providing /usr/bin/java).   Selection    Path                                      Priority   Status ------------------------------------------------------------ * 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode   1            /usr/bin/gij-4.4                           1044      manual mode   2            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode   3            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode Press enter to keep the current choice[*], or type selection number: 3 update-alter

Installing swftools on ubuntu pc

Here is the nice article for the above topics http://designbye.wordpress.com/2010/02/23/installing-swftools-and-pdf2swf-on-ubuntu-linux/

Java Development with Ubuntu 10.10

This is first step of migration for the software engineers from window platform to linux platform. I am Java Developer and doing my java development in windows platform.   Here is my window development configurations: OS - windows 7 Java version  - JDK 6 IDE -  Netbeans 6.91 Application Server -  Tomcat 7 Database Server -  MySQL Version Control -  tortoisesvn Ok. Lets assume you have successfully installed and setup the Ubuntu 10.10 and can access the internet. Step 1: Install Java It is obvious that most of linux dis have installed Open JDK at the os installation time. If you are new for java development go this Open JDK.(I never tested open Jdk with netbeans). But when you run your existing code, you might get errors and the only solution for that is use sun java jdk.  In this step i am going to show you how to install sun jdk for ubuntu 10.10. Go to Ubuntu Software Center  A pplications –> Ubuntu Software Center. Then click  Edit –> Software Sources.. Next, se

How to copy Copy Protected VCD

Today i bought a nursery rhymes VCD from the market to my daughter. Even though it playing well with the VCD player, I just wanted to have a copy of that VCD in my laptop as it is easy to play it later on without finding the cd in the rack. Also i am pretty sure that those VCDs might not be able to read after 1 to 2 years time as the low quality of them. I am using Ubuntu 10.04 LTS and i can't play the vcd with the default settings. I tried with VLC and movie player. In movie player it is giving the error massage saying.."Could not read from resource". With VLC i am getting " File reading failed: VLC could not read the file." These are the step to play/copy the above type of VCDs, Open linux shell (Application --> Asseseries-->Terminal) Type "sudo apt-get install vcdimager" and press enter (You need to have internet connection) Type "vcdxrip". You will get warn massage and wait until it complete the operation and get the cursor