1:55 AM

Migratting to Arch Linux..!!




After experimenting on Fedora for months today i ported myself fully to Arch.Arch Linux is a light weight Linux distribution.The Arch is based on simplicity, simple as stick!! The Arch Linux provides the power and combustibility than any other Linux system out there.

The Arch Linux involves installation from scratches and  one can customize the OS in any way one needs to. On a fresh installation of the operating system you will only have a basic Linux system with no GUI,no sound,etc but all basic modules to run an OS. You will be greeted only by a tty where you can login as root and start building your custom OS!!!

The Arch Linux emphasis on simplicity and wants to make your system as simple as possible.By giving such a low functional operating system, the Arch wants the users to add only those packages one needs to. This makes your system light weight and much more flexible than any other Linux distribution. That is in Fedora installing the OS will give you many different packages which you may not even know what it does.There no such case in Arch.If you think you want it then you can install it.

The Arch uses a power full package manager called pacman.The pacman is a light weight package manager in which you will have access to the latest packages compared to other package managers like apt or rpm.

Final word: The Arch Linus is a definite try for intermediate and expert Linux users. Even though the installation in little bit lengthy you will surely benefit from it, you will get a clear picture of what each are meant for and so on.....Beginners are not recommended to use Arch Linux as you should have basic understanding of Linux file system and which files are meant for what and so on....

The arch wiki page is the best guide one can find.The beginners guide contains all details you may want .

Arch Linux beginners guide

Be sure to read each and every line of the wiki if you miss one it will surely screw your system ;) . Last day I accidentally missed a warning which crashed my system...

So give it a try .
Keep exploring and live curious !!!

12:37 AM

Installing mp3 puling gstreamer and vlc on fedora

The fedora repository does not provide many software's which are provided in rpmfusion repo. The rpm fusion contains many popular packages like vlc and gstreamer (mp3 plugin for rhythmbox etc)
The following shell script configures rpmfusion on fedora and installs your favorite softwares........


#!/bin/sh

#program on fedora to install gstreamer vlc
#these packages are in rpm fusion repostiory

no_of_argmnt=1;

#checks wether the user is root or not
if (( $EUID != 0 ))
then
    echo "the script must be runed as root"
    echo "try again as"
    echo "su -c \`sh $0.sh \"package\"\`"
    echo "package can be gstreamer or vlc "
    exit 1
fi

#checks for the parameters
if (( $no_of_argmnt != $#))
then
    echo "parametes missing"
    echo "scrpit usage::"
    echo "su -c \`sh $#.sh \"package\"\`"
    echo "package can ve gstreamer or vlc "
    exit 1
fi

echo "Configuring Rpm fusion...."
echo "Getting rpm fusion package from http://download1.rpmfusion.org"
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

if [ $1 == "vlc" ]
then
    echo "Installing vlc..."
    yum install vlc
elif [ $1 == "gstreamer" ]
then
    echo "Installing gstreamer..."
    yum install gstreamer-{ffmpeg,plugins-{good,ugly,bad{,-free,-nonfree}}}
else
    echo "Unknown package"
fi

echo "Finishing installation.."
exit 0
    

7:37 AM

Script to install flash plugin



A simple bash script to install flash for mozilla and/or chromium browser on any linux system.

sript usage:

To install for fedora use
    sh installflash.sh mozilla

To install for chromuin use
    sh installflash.sh chromium

For both use
    sh installflash.sh mozilla chromium

IMPORTANT :: the script must be excecuted as root

####################################################

#!/bin/sh


if [ -z $1 ]
    then
    echo "Arguements missings"
    echo
    echo "To install for fedora use"
    echo "    sh installflash.sh mozilla"
    echo
    echo "To install for chromuin use"
    echo "    sh installflash.sh chromium"
    echo
    echo "For both use "
    echo "    sh installflash.sh mozilla chromium"
    echo   
    exit 1
fi

if (( $EUID != 0 ))
     then
     echo "This scritp must be run as root"
     exit 1
fi
echo "Downloading flash files from adobe"
mkdir temp
cd temp

wget http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.236/install_flash_player_11_linux.x86_64.tar.gz
tar -xvf install_flash_player_11_linux.x86_64.tar.gz

if [ -n $2 ]
    then
    echo "installing flash for mozilla"
    mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/mozilla/plugins/       
    fi
    echo "installing flash for chromium"
    mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/chromium-browser/plugins/       
    fi
   
fi
if [ $1 = "mozilla" ]
    then
    echo "installing flash for mozilla"
    mv libflashplayer.so /usr/lib64/mozilla/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/mozilla/plugins/       
    fi
fi

if [ $1 = "chromium" ]
    then
    echo "installing flash for chromium"
    mv libflashplayer.so /usr/lib64/chromium-browser/plugins/ 2> /dev/null
    if (( $? != 0 ))
    then
        mkdir usr/lib64/mozilla/plugins/
        mv libflashplayer.so /usr/lib64/chromium-browser/plugins/       
    fi
fi

rm -rf temp/
rmdir temp

###################################################

6:46 AM

Enable Flash Player For Chrome In Linux

Adobe Flash Player is is a multimedia platform used to add animation video and interactivity to webpages.The synaptic package manager provides a flah plugin which may or may not work....It didn't work for me!!!
Here is an alternative way to do so...

Download the .tar.gz file found at the link  http://get.adobe.com/flashplayer/otherversions/

Extract the file to get file libflashplayer.so

create a file named plugin at  opt/chrome/ by the command


sudo mkdir /opt/google/chrome/plugins



Now move the file to the created folder using

sudo cp /location/flashplugin-installer/libflashplayer.so /opt/google/chrome/plugins


Now the launcher command has to be edited by the following steps.

Right click at Applications and click on edit menus




Under the internet look for google chrome right click to  get properties 


Change the command as

/opt/google/chrome/google-chrome --enable-plugins %U

Restart Chrome and you are done !!!!!!





8:10 PM

Linear Regression

Linear regression in is an approach to modeling the relation between a scalar variable y and another variable x.The linear regression involves an analysis of a set of data so as to arrive at an approximate relation between the data so that further predictions of values of y corresponding to the given values of x become possible.

Regression analysis can be done in a number of methods.In linear regression analysis we attempt to arrive at a linear equation of the form y=bx+a so as to model the data.



The values of b,slope and a,y intercept can be found with the help of the following relation

linear regression equations 

Now the equation defines a straight line so that the distance between the line and the given points in minimum.

Once the values of a and b available the prediction is possible using the equation

y=a+bx

Implementation using octave.

The linear regression analysis is implemented using 2 functions..predict() and value()

The predict function takes a nx2 matrix as argument.The elements of the matrix is the arranged such that each row corresponds to a pair of data ie x and y .
The code can be written as..


unction predict(a)

x=0;
y=0;
xy=0;
xx=0;
   yy=0;

for i=1:size(a,1)
x=x+a(i,1);
y=y+a(i,2);
xx=xx+(a(i,1)^2);
yy=yy+(a(i,2)^2);
xy=xy+(a(i,1)*a(i,2));
endfor

m=0;
c=0;

n=size(a,1);
c= ((y*xx)-(x*xy))/((n*xx)-(x*x));
m= ((n*xy)-(x*y))/((n*xx)-(x*x));

        save("c.mat");
save("m.mat");

end


function [y]=value(q)

load("c.mat");
        load("m.mat");
y=(m*q)+c;

end


6:36 AM

Bypassing network proxy in apt-get

Using apt-get command in proxy network results in an error ....
proxy authentication required.
This can be resolved by creating a configuration file in apt.
navigate to /etc/apt/apt.conf
open an editor by
nano apt.conf
add the following lines to the file
Acquire::protocol::proxy "protocol://username:password@proxy:port/";
where protocol is the network protocols like http,https,ftp,etc with wich you download the package.

9:09 PM

Installing Packages From CD/DVD

Software packages for Debian can be installed either from an installation disk or by downloading the packages from the internet.
In order to download softwares from an archive the cd/dvd must be added to the file sources.list. The sources.list file can be modified by the command apt-cdrom




# apt-cdrom add
Using CD-ROM mount point /cdrom/
Unmounting CD-ROMPlease insert a Disc in the drive and press enterMounting CD-ROMIdentifying.. [0eabc03d10414e59dfa1622326e20da7-2]
Scanning Disc for index files..  Found 1 package indexes and 0 source indexes.
This Disc is called:
 'Libranet GNU/Linux 2.8.1 CD2'
Reading Package Indexes... Done
Wrote 1271 records.
Writing new source listSource List entries for this Disc are:
deb cdrom:[Libranet GNU/Linux 2.8.1 CD2]/ archive/
Repeat this process for the rest of the CDs in your set.


This is the only way to add cd archives to the source.list



In order to identify the disk in use  the command apt-cdrom ident can be used



$ apt-cdrom ident
Using CD-ROM mount point /cdrom/
Mounting CD-ROMIdentifying.. [0eabc03d10414e59dfa1622326e20da7-2]
Stored Label: 'Libranet GNU/Linux 2.8.1 CD2'
$




Now the packages can be installed from the cd drive by the use of apt-get.
In order to endure that the packages are installed form the cd comment all other lines in the source.list file.Run aptitude update to update the changes made to the sources.list