Sep 11, 2012

PUREOS 6.0 released with GNOME 3

Marc Poirette has announced the release of PureOS 6.0, a desktop Linux distribution with GNOME 3 based on Debian's "testing" branch: "PureOS 6.0 is a multilingual live CD/USB based on Debian 'testing' with GNOME. Supported locales: FR (France, Belgium, Canada, Switzerland), EN (USA, United Kingdom, Australia, Canada, Denmark, Ireland, India), others (Brazil, Czech Republic, Finland, Germany, Hungary, Italy, Netherlands, Norway, Poland, Portugal, Romania, Russia, Spain, Sweden, Turkey). Main features: Linux kernel 3.5.3 and GNOME 3.4.2 (GNOME Shell + GNOME Classic). Internet: Chromium 21.0 with Flash player. Multimedia: GNOME MPlayer. Graphics: Evince and Eye of GNOME. System: GParted, smxi/sgfxi scripts, scripts for modules management: activate, debs2lzm, debs2lzm-file, dir2lzm, lzm2dir and find2lzm." The release announcement includes the full package list and a list of download mirrors. Get the live CD image from here: PureOS_60.iso (683MB, MD5).

Source :

Jul 9, 2012

Validate an E-Mail Address with PHP, complete script

This tutorial will teach you how to validate a e-mail id using regular expression to control email Spam. In this tutorial I used ternary operator to filter the values coming from the input box and avoid errors.

Complete Coding is here

function verify($email){
        return false;
    } else {
        return $email;
            echo $email." is a valid E-mail ID";
        } else {
            echo $email." is an invalid E-mail ID";
<form action="" method="post">
<input type="text" name="email" value="<?php echo $email;?>"/><br/>
<input type="submit" name="submit" value="validate" />


Jun 11, 2012

Play With Xampp on linux 32 bit and 64 bit OS

In Previous blog , I just taught you how to install Xampp on 32  bit and 64 bit distro , in this tutorial I am going to  tell you how to make web development easy on Linux. When you work on Linux environment everything is not easy as it is stable and secure , you have to come up with lots of issues and how to solve it.


 Xampp on linux 32 bit and 64 bit OS

Problem no.1
How to give write permission to /htdocs  to create folder and files?

This is one of biggest issue after installing xampp as we have to create .php files under /htdocs folder

solution : Its not a  rocket science to give write permission to a folder .

open terminal

Note if you use KDE then use su command else use sudo.

after opening terminal write


sudo chmod 777 -R /opt/lampp/htdocs

Problem no.2

Which editor will be best?

solution: If you want dreamweaver like editor then
kompozer will come closer ,if you want fast and stable editor there is numeros my personal favorite are

  1. kate
  2. geany
  3. gedit (you have to twaeked it)
  4. bluefish
  5. kompozer

Problem no. 3

Which browser will be better?

solution : I prefer Firefox over any browser and don't know why. You can work with any browser of your choice . My top 5 browser are

  1. firefox
  2. chrome
  3. opera
  4. safari
  5. konqueror

May 25, 2012

Launching tasks when computer is idle

The-importance-of-being-idle asks: You have talked before about scheduling tasks at a specific time. Is there a way to launch tasks when the computer is idle, not just at a set time?

DistroWatch answers: It is possible to check how busy your CPU is and run certain programs when the processor is idle. However, this may not be the best solution if your goal is running programs without having them interfere with system performance. First, let's look at how to run a command when the CPU is relatively idle. There are a few ways to check to see how busy the CPU is, but one of the easiest is using the uptime command:
jesse@drew:~$ uptime
15:40:49 up 8:17, 3 users, load average: 0.92, 0.88, 0.85
The uptime program shows us the current time, how long the computer has been running, how many users are logged in and the processor's load average. The load average tells us how busy the CPU is. The uptime program displays three numbers for load averages, the first shows us how busy the CPU has been, on average, for the past minute, the second number indicates average processor load for the past five minutes and the third number indicates load for the past fifteen minutes. A load average of 1.00 would mean the CPU is constantly busy, a load of 0.00 would indicate the machine is practically idle. If we want, we can set a job to run only if the load average falls to a certain point, say 0.01. The following script checks the system load once a minute and, when the load drops below 0.05, it will run a job, provided on the command line, for us:
if [ $# -lt 1 ]
   echo usage $0 command
   exit 0

load=`cat /proc/loadavg | awk '{print $1*100}'`
while [ $load -gt 5 ]
   sleep 60
   load=`cat /proc/loadavg | awk '{print $1*100}'`
Now there are problems with this approach. One being that we're constantly running checks, which is a little wasteful. Another is that if our load average never drops below 0.05 our task doesn't get to run. Another issue is that if we want to use the computer while our intensive task is running we either have to interrupt it or deal with reduced performance while our important job is running. In my opinion a better way to handle the situation is to run our special task whenever we want, but make sure it does not affect system performance.

One command useful for keeping jobs out of the way is nice. The nice command tells the operating system to assign a lower priority to our job. The lower priority will help to keep the job from using the CPU while other, higher priority tasks, are active. Here is an example of the nice command in action, being used to run the apt-get program:
nice apt-get update
Should a job already be running and we want to lower its priority, making it less intrusive, we can use the renice command. The renice command typically accepts two pieces of information, the new priority we want to assign and the process ID of the job we want to alter. Priority numbers are typically set in the range of -20 to 19, with 19 being the lowest possible priority. The following command assigns the lowest priority to process 3175:
renice -n 19 -p 3175
While the nice and renice commands work on adjusting the priority of jobs in the CPU sometimes we find that the main bottle neck to performance is with the hard drive. For instance backup processes require a lot of disk access and we might want to keep them out of the way. For these sorts of tasks we have the command ionice. The ionice command works much the same way as nice and renice. With ionice we can either launch a new task with altered priority to the disk or we can make adjustments to processes already running. The ionice command recognizes three classes of priority: realtime (which is the most aggressive), best-effort (which is the default) and idle (which should not interfere at all with other tasks trying to access the disk). The ionice manual page tells us to make a process idle, we assign it a class of 3. In the following example we perform a backup using a polite, idle, disk priority:
ionice -c 3 tar czf mybackup.tar.gz ~/Documents
In this next example we tell the system to make sure the process with ID 4571 takes the lowest priority when accessing the disk:
ionice -c 3 -p 4571
Should we wish to, we can use both the ionice and renice commands to make sure our job stays out of the way both when accessing the CPU and the disk. This next example begins a backup of our Documents directory and assigns the process both a low disk and low CPU priority:
ionice -c 3 tar czf mybackup.tar.gz ~/Documents &
renice -n 19 -p $!
The above commands -- nice, renice and ionice -- affect the scheduling and priority of a task. There is another command, called CPUlimit, which throttles a process. (CPUlimit is usually not installed by default, but is available in many Linux repositories.) What's the difference between throttling and scheduling? Well, a task with a low priority can still use 99% of the CPU if nothing else is competing for system resources. The low-priority task only backs off when another process wants to step in. Throttling a process, on the other hand, forces that process to only use a limited per cent of the available CPU. We can limit a process to use only 10%, 20%, 50%, etc of the CPU, whether the machine is idle or busy. The CPUlimit command typically takes two pieces of information, a process ID of the job we want to throttle and the maximum percentage of the CPU we want to allow to the process. For example, the following limits the process 6112 to using just 25% of our CPU:
cpulimit -p 6112 -l 25
The following commands start a new backup job and then throttles its CPU usage to 10%:
tar czf mybackup.tar.gz ~/Documents &
cpulimit -p $! -l 10 -b

Source :

May 6, 2012

Install XAMPP on 64 bit Linux Distro

Today Linux has become number one choice in Open Source world whether it is Desktop experience, programming, server or Web Development Linux has no match. Its Secure , fast and comes in many flavor.
xampp 64 bit linux
In this tutorial we will focus how to install Xampp on linux 64 bit OS. Earlier day the Linux version of XAMPP called as LAMPP. But it comes as XAMPP with more improvements.
For Installing and running XAMPP on 64 bit linux distro install wine  through package manager , it will install 32 bit packages so you can run  32 bit application also. Please note that  XAMPP is till now a 32 bit application.
After installing Wine Download XAMPP  latest version from
After downloding Xampp copy it to home folder, and rename it to xampp.tar.gz

Note : Some distro allows root login such as PCLinuxOS, OpenSUSE so if your distro allows root login then logged as root. Some distro doesnot allow root login like Ubuntu, Kubuntu ... don't worry login as default.

Go to a Linux shell and login as the system administrator root
su tar xvfz xampp.tar.gz -C /opt
or if fail try
sudo tar xvfz xampp.tar.gz -C /opt
it will ask password , use your root password and hit enter.
To start XAMPP simply call this command:
sudo /opt/lampp/lampp start
su  /opt/lampp/lampp start
You should now see something like this on your screen:
Starting XAMPP 1.7.7...
LAMPP: Starting Apache...

Read complete tutorial at Cellguru

Mar 26, 2012

5 Tips and Tricks for Using Yum

If you're using one of the Fedora/Red Hat derived Linux distributions, odds are you spend some time working with Yum. You probably already know the basics, like searching packages and how to install or remove them. But if that's all you know, you're missing out on a lot of features that make Yum interesting. Let's take a look at a few of the less commonly used Yum features.

Yum comes with a lot of different distributions, but I'm going to focus on Fedora here. Mainly because that's what I'm running while I'm writing this piece. I believe most, if not all, of this should apply to CentOS, Red Hat Enterprise Linux, etc., but if not, you may need to check your man pages or system documentation.

Working with Groups

If you use the PackageKit GUI, you can view and manage packages by groups. This is pretty convenient if you want to install everything for a MySQL database or all packages you should need for RPM development.

But, what if you (like me) prefer to use the command line? Then you've got the group commands.

To search all groups, use yum group list. This will produce a full list of available groups to install or remove. (Yum lists the groups by installed groups, installed language groups, and then available groups and language groups.)

To install a group, use yum group install "group name". Note that you may need quotes because most group names are two words. If you need to remove the group, just use yum group remove "group name".

Want to learn more about a group? Just use yum group info with the group name.

Love the Yum Shell

If you're going to be doing a lot of package management, you want to get to know the Yum shell.

Just run yum shell and you'll be dumped in the Yum shell. (Which makes sense. It'd be weird if you got a DOS prompt or something...) Now you can run whatever Yum commands you need to until you're ready to exit the Yum shell.

For instance, want to search packages? Just type search packagename.

Here's the primary difference, when running things like install or remove, Yum will not complete the transaction immediately. You need to issue the run command to tell Yum to do it. This gives..............