There was an error in this gadget

+1

Monday, December 31, 2007

A Newbies guide to Linux Console

2 comments
Newbies guide to Linux Console

Over the years there has been tremendous growth in Desktop Linux , and Linux distributions these days are getting more and more user friendly with all kind of fancy graphical interface . Still the power of Linux or any other UNIX distribution lies in it console and shell commands . Now even though shell is often considered difficult by Linux newbies still it's possible to learn few basic commands , and in this article I try to explain basic commonly used console commands .


The general format of Linux command line :

$ command -options target

Where target is target filename or expression

Some Commonly used Linux commands : -


Showing Currently working directory

The command prints the current working directory , for example

$ pwd
/home/ambuj

It shows /home/ambuj because /home/ambuj is the currently working directory .


Listing files in the directory : -

ls -a :- Displays all the files in the directory , by default ls does not show hidden files( hidden files start with (.) )

ls -l :- Displays the detailed listing of the files in the directory , information like Permission , links , owner , group , size , date , name are displayed

ls -S : the -S option displays the file list in a sorted fashion with the biggest sized file displayed first


ls -sS : the -s option displays file size before the filename combined with -S option it displays a sorted list of files currently in directory with the filesize infront of the filename.


ls -Sr : the -r option combined with -S displays the sorted list of files in the current directory with the smallest sized file displayed first.

ls -sSh : the command displays the sorted list of files in the directory with the file size displayed in a more understandable fashion.

ls -F : this command displays the list of files and directory with directories ending with (/) , executable files with (*) , Symbolic links with ( @)




Removing Directories/File : -

rm directory_name/File_name : Removes directory , Files

rm – i filename/directory_name : Removes directory/file with confirmation

rm -rf filename/directory_name : Removes directory and sub-directory recursively , -f stands for Force

rm -r Directory_Name : Removes directory if it is empty

Copying completely one directory to another directory

cp -r source_directory_name destination_directory_name

-r stands for Recursively


Creating Archives :

gzip (GNU Zip)

gzip can be used for compressing a single file , it is not meant for compressing entire directories as other file formats do . The default extension used bu gzip archives is (.gz) .

gzip filename.ext would create a file name filename.gz and replace the existing filename.ext file with filename.ext.gz file which is compressed gzip archive , the gzip command retains the file's attributes the modification,time stamp, access etc.

The compression level of the file can be varied by using options from 1 to 9 while compressing a file

gzip -1 filename.ext would compress the file quicker but with less compression.

gzip -9 filename.ext would compress the file slower but with more compression.

the default compression level is 6.

The filesize of compressed gzip archive would depend on the orignal file format it would do well with a non - archived file such as txt,doc,bmp etc but would fair poorly with JPG , PNG etc which are already compressed by some algorithm.

The gzipped file can be decompressed by using the gzip -d or gunzip command at the command line.

the default file extension used by gzip archives is .gz if you want to use a different file extension it could be done by using the -S option
example : gzip -S .x filename.ext would create a archive by the name of filename.ext.x

tar ( Tape archiver )
The tar program combines a number of files and directory in a single file which then can be compressed using a gzip or bzip2 program to reduce it's file size.

tar -cvf file.tar file1 file2 file3 file4 : This would create a tar archive combining the file1 file2 and file3 into a single file the archive have the same name as the file1 since we have specified the -f option which makes tar use the first option as the filename of the archive , -c tells the tar program to create a archive and -v option displays all the background information on the screen.

tar -cvf file.tar file1.tar file/ : This command would create a archive named file.tar with file1.tar and file subdirectory as the content of the archive .

tar -cvzf file.tar.gz file1 file2 file3 file/ : This command would create a tar file consisiting of the files and directory specified and then the file is compressed using the gzip program, to create a final archive file.tar.gz.

tar -cvjf file.tar.bz2 file1 file2 file3 file/ : This command would create a tar file consisiting of the files and directory specified and then the file is compressed using the bzip2 program, to create a final archive file.tar.bz2

tar -xvf file.tar : This command would extract all the files contained in the tar file file.tar

tar -xvjf file.tar.bz2 : This command would extract all the files contained in the file file.tar.bz2 , it would first call the bzip2 program to extract the file.tar and the call tar to extract the file.tar and it's conetent.

tar -xvzf file.tar.gz : This command would extract all the files contained in the file.tar.gz , it would first call the gzip program to extract the file.tar and then call tar to extract file.tar and it's content.

If you have created the file.tar but want to add some file(s) later it can be done using the following command and using the -rf option .
tar -rf file.tar file(s)


bzip2
The bzip2 is similar to gzip program but compresses file better and more effectively as compared to gzip program . The default extension used by bzip2 program is (.bz2) , the usage of bzip2 is very similar to the gzip program but has some additional options , which are described here .

bzip2 -k filename.ext : This commmand would create a archive of the filename.ext but would also keep a copy of the orignal file unlike gzip which replaces existing file with the the new archive file.
the bzip2 program also has different compression level ranging from 1 -least to 9-maximum . which can be set by using syntax like : bzip2 -1 filename.ext

bzip2 archives can be extracted by using the bzip2 -d option or by using the program bunzip2 .


Displaying file in the console

$ cat file-name(s)

The above command displays the content of file one after the another .

cat v1 v2 v3 > v4 This statement would combine the content of textfile v1,v2,v3 and create a new file v4 having all the content of three files.

cat v4 >> v5 This statement would append v4 file at the end of file v5. To end the statement type (Ctrl + D (EOF))

cat > filename << STOP This statement would create a filenamed filename at the console and accept input from the user for the file , the file is ended(terminated ) on pressing Ctrl + D.


$ more file-name

The above command displays the content of file page-wise , asking user to press a key usually “space bar” when the entire screen is filled to move on to next screen. The command is particularly useful for long files.

$ head File-Name

The above command displays the first few lines of the file .

$ tail file-name

The above command displays the last few lines of the file .

$ wc file-name

The above command would count the lines , words and characters of the file .

Creating Soft-Link/File -Aliases

If you are right now in /home/xyz directory and you issue the following command , it would create a soft-link of the file( file-name ) in the directory /home/xyz

$ ln -s /path/file-name

Searching Commands

$ grep -r “Text” *

The above command would display all the files in the current directory and all it's sub-directory having “Text” by searching recursively .

$ grep -n “Text” filename

The above command search for “Text” in the file-name and displays the line-number where the text was found .

$ grep “file[- ] name “ file

The above command searches for text “file-name” and “file name” in the file and displays it on the screen .

$ find file-name

the above command searches for file-name in directory hierarchy .

Some Other Miscellaneous Commands

$ cal
Commands displays calendar on the screen

$ clear
The command clears the console screen of any text

$ man command
Gives information about command

$ passwd
Above command allows changing of password of logged in user

$ df
Above command displays the free diskspace .

$ who
The command shows the user who are logged into the system .

$ env
Shows environment variables

$ ps
Shows running processes

$ top

The above command shows a dynamic real-time view of running system . It displays system summary information as well as list of task being managed by the linux kernel .


Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2007 , Ambuj Varshney

Monday, December 24, 2007

Adobe Flash Player 9 Update 3 - New Version of Flash Player on Linux

0 comments

Adobe Flash Player 9 Update 3 - New Version of Flash Player on Linux

A Few weeks back Adobe released the new version of their popular Flash Player( Adobe Flash Player 9 Update 3, version identifier 9,0,115,0) on the Linux platform . Now , the new version of the Flash Player though is available only for the 32bit Linux platform but still atleast adobe is making Linux version available at the same time with the Windows and Mac counterpart which is welcome change from the old days. New Version of Adobe Flash Player has some really interesting additions .

First of all new version of Flash Player supports H.264 which is one of the HD(High Definition ) Codec used for Internet Multimedia broadcasts . H.264 is used in QuickTime Movie files , HDTV in mp4 format and a number of less popular formats like the M4V, M4A, Mp4v, 3gp, and 3g2. So well the new version of Adobe Flash Player should be ready for the streaming HDTV content .

Secondly , Flash now supports the AAC(Advanced Audio Coding) audio format which includes AAC Main, AAC LC and SBR (aka HE-AAC) , now AAC is part of MP4 Audio Compression format .

However , the new version of Flash is bit demanding and well you would need a fairly good system configuration if you want to play streaming HDTV format or for flawless working of the Flash Player . To install Flash Player in Ubuntu 7.10 type in the following command in the terminal window , ensure that you have closed Mozilla Firefox before issuing these commands : -
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz


and
tar -xvzf install_flash_player_9_linux.tar.gz
and
cd install_flash_player_9_linux/
and
./flashplayer-installer
After completing the above steps you can launch Mozilla Firefox and type "about:plugins" in the address bar to verify whether plugin was installed properly .

Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2007 , Ambuj Varshney



Sunday, December 16, 2007

Making your Ubuntu 7.10 Desktop look like MAC OS X Leopard

33 comments
Making your Ubuntu 7.10 Desktop look like MAC OS X Leopard



MAC OS has been traditionally known for their impressive graphical interface and stability . Now even though i have been an avid Linux follower over the past 9 years I have been using Linux , still i find my self attracted to MAC OS .
Now even though these days it's possible to run Hackintosh on normal Intel hardware , but still it's not stable and well there are hardware compatibility issues . So well other alternative to using MAC OS is either to purchase MAC hardware(which would be naturally expensive) and run full fledged MAC OS or you could tweak and customize your Ubuntu desktop to look more like MAC OS X .

In this tutorial i describe step by step how to make your ubuntu desktop look more like MAC OS X Leopard :) .


Step 1 :- Downloading LeopardX Icon Theme

First you need to download LeopardX theme (hosted on gnome-looks.org) from the following website : -

or you could download directly from this link :

http://rapidshare.com/files/73251200/LeopardX-V2.6.tar.gz

Gnome - Looks page : http://gnome-look.org/content/show.php/LeopardX?content=64070

It will download a file named
LeopardX-V2.6.tar.gz , now extract this file using file-roller to any temporary directory that you would use to house the files we would be using for the customization.(In my case it's $HOME/Leopard) or if you want to use console application you could use the following command to extract the file to Leopard directory (Make sure you create the directory before doing this step)

For me to extract the file to $HOME/Leopard directory(already created) command would be : -

tar -xvzf LeopardX-V2.6.tar.gz $HOME/Leopard

2. Downloading Mac4Lin GTK Theme

Now similarly download Mac4Lin GTK theme from the following website and extract it to the folder created above ($HOME/Leopard)


Download : http://rs18.rapidshare.com/files/71511264/Mac4Lin_GTK_Aqua_v0.3.tar.gz

and to extract it to $HOME/Leopard director(already created)

tar -xvzf Mac4Lin_GTK_Aqua_v0.3.tar.gz $HOME/Leopard

3. Download Cursor Theme Package

We need to download the cursor set for our new theme , you can download the cursor set from t he following website :

http://gnome-look.org/content/show.php/Shere+Khan+X?content=57588


After downloading the cursor set extract cursors to the directory created in the first step.

4. Combining the Downloaded Files into a Single Theme Package

Now after completing the above steps go to the directory( cd $HOME/Leopard for me ) in the Terminal and issue the following command to combine the three theme files into a single .tar.gz archive .
tar cvfz MyTheme.tar.gz LeopardX Mac4Lin_GTK_Aqua_v0.3 Shere_Khan_X/


5. Installing Theme Package
Now to install the theme package we have created in the above step , go to
(System -> Preferences -> Appearance) and click Install and point to our newly created MyTheme.tar.gz archive.

This should start installing the theme package (Cursors/Icons/Theme) once installation is completed . Chose Custom in theme and click on Customize .You will find a window like this:
Customize Dialog Box
In this window in Icons chose LeopardX , in Controls Mac4Lin_GTK_Aqua_v0.3 , in Window Border Mac4Lin_GTK_Aqua_v0.3 and in Pointers White Cursor .


If you have followed the steps properly the theme and icons should have been installed , and you should be able to see the new theme applied to your default desktop .


6. Changing the Log In Screen / GDM Theme


To change the Log In Screen/GDM Theme download the package from website listed below :
http://gnome-look.org/content/show.php/OSX+Session+Login?content=68346

After downloading the package , open (System -> Administration -> Log in Window ) and there go to Local and click on Add and point to the downloaded theme package (osx-login.tar.gz) . Now you would find OSX-Login theme listed in the window , select OSX-Login and close the window . Logout and Login again you should find the new theme installed .

Log-in Window allows easy changing of the Login Screen Theme


7. Enabling Compiz-Fusion

IMPORTANT : - Enabling Compiz-Fusion is essential if you want to use Screenlets , Avant Window Manager Properly .

Unlike previous releases of Ubuntu where one had to manually download and install compiz,beryl etc (Compiz Fusion is composite window manager that provides best features of Compiz and Beryl) from Repositories if one wanted to have glitzy visual effects .

Ubuntu 7.10 comes with Compiz Fusion pre-installed and on supported hardware offers a wide array of Visual Effect . Now depending on graphic hardware of computer one could chose from three level of Visual Effect (From
System -> Preferences -> Appearance )

None : - This mode causes Ubuntu to use Metacity instead of Compiz Fusion , with no visual effect


Basic : - Has only simple visual effects like shadows , fading windows-menus etc


Advanced : - Recommended for PC with descent graphic hardware , enables effects like wobbly windows, transparency , animated workspace switching etc
Visual Effect Dialog Box


However , compiz-fusion is capable of much more and you can enable more desktop effects /customize compiz by typing the following command in the terminal window : -
sudo apt-get install compizconfig-settings-manager
After completing above step , you can customize compiz by going to System > Preferences > Advanced Desktop Effects Settings .
After installation is over , open Terminal from (Applications -> Accessories -> Terminal ) and issue the following command to install emerald which is necessary for using themes in compiz .

sudo apt-get install emerald


After installation is over download MacOS X Emerald theme from this link : http://gnome-look.org/content/show.php/Mac4Lin+Leopard+Emerald+Theme?content=68409

Now open (System -> Preferences -> Emerald Theme Manager )

After Emerald theme manager opens click on import and point to the downloaded theme package from withing the Theme Manager , you will find Mac4Lin Theme listed select the theme , click on refresh and quit the application .

Emerald Theme Manager


8. Installing Avant Windows Navigator

IMPORTANT : - To use AWN Compiz-Fusion should be up and running as mentioned in the step above


Avant Windows Navigator is cool little tool that allows you to have a cute looking dock at the bottom of the screen . Even though AWN is still very buggy, still because it is so feature rich and cool looking you could install it .

Before we begin installing first ensure Software Sources are in order by going to ( System -> Administration -> Software Sources ) go to the Updates and the window should like the image below with in Ubuntu updates box " first , second and fourth option " enabled .

Software Sources Dialog box


To install add in the following line at the end of file /etc/apt/sources.list by opening the gedit editor with the following command .

gksu gedit /etc/apt/sources.list


and LINE TO ADD : -
deb http://download.tuxfamily.org/syzygy42/ gutsy avant-window-navigator
deb-src http://download.tuxfamily.org/syzygy42/ gutsy avant-window-navigator

and after adding the above line issue the following command in the terminal window (Applications -> Accessories -> Terminal )

wget http://download.tuxfamily.org/syzygy42/reacocard.asc -O- | sudo apt-key add -

sudo apt-get update

sudo apt-get upgrade
Now we begin installing AWN by issuing the following command in the terminal window :

sudo apt-get install avant-window-navigator-bzr
and , To install additional applets for AWN

sudo apt-get install awn-core-applets-bzr
Now after completing above mentioned steps AWN should be properly installed , To Launch AWN go to (Applications -> Accessories -> Avant Window Navigator )


Now you could customize AWN by choosing to add more applets , configuring 3D effects for AWN etc by going to AWN Manager (
System -> Preferences -> Awn Manager )


Three ScreenShots of AWN Manager , one with Applets Tab opened and other with Themes tab opened

Though the theme which AWN comes with preinstalled is also good , you might like to try this it's cool and very Mac like

http://rapidshare.com/files/71511920/Transparent.tgz.html

you could install this theme through AWN Manager .

This is how my AWN Dock looks(with the above theme installed) like : -


AWN-DOCK

9. Installing Screenlets

IMPORTANT : - To use Screenlets Compiz-Fusion should be up and running as mentioned in the step above

Screenlets gives user a collection of impressive widgets that can be placed on desktop this is similar to feature available on Windows Vista and Mac OS X Dashboard , it gives impressive look to the desktop.
To install Screenlets type in the following command in the terminal window :

First we need to add repository where the Screenlets binary is located , to do so open gedit with superuser permission by typing the following command in the terminal window :

gksu gedit /etc/apt/sources.list


and add the following line at the bottom of the file :

deb http://download.tuxfamily.org/screenlets gutsy screenlets
Now quit the gedit text editor and type in the following command in the terminal window :

sudo apt-get update

sudo apt-get install screenlets
Now , After the installation is over you can add Widgets/Screenlets on your desktop by going to (System -> Preferences -> Screenlets ) , you will find a dialog box like this from where you could add Screenlets onto the desktop .
Screenlets configuring dialog box



10. Getting MAC OS X Leopard Wallpaper

Finally you can get MAC OS X Leopard wallpaper from the following website : http://appleology.com/images/space-desktop.png


Finally this is how my desktop looks after all the tweaking and installing : -

My Ubuntu Desktop

and


Another screenshot showing Menu in the AWN Dock




Technorati Tags:
, , , , , , , ,



Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2007 , Ambuj Varshney

Wednesday, December 12, 2007

Running Windows inside your Ubuntu 7.10 installation

7 comments
Running Windows inside your Ubuntu 7.10 installation


For people making jump from Windows to Linux the biggest problem is adjusting to new environment and applications , now even though these days really good open source alternatives to applications on Windows platform are available but still many people prefer using Windows applications .

Now ,If you want to run Windows application on your Ubuntu installation there are two options available
  • You can use a virtualization software(like Qemu , Virualbox , VMware , bochs etc) which allows you to run full fledged installation of Microsoft Windows inside your Ubuntu desktop
  • Or you might use a application layer called wine to run Windows application natively on Linux . While most of the people would prefer wine to run their windows application because it does not require one to have a licensed copy of windows , however application support in wine is still patchy with some applications working flawlessly and some application not working at all . So well that leaves us to virtualization softwares .
Over the years there has been significant development in virtualization technologies . Now there are number of applications available both in open source and commercial domain that allows running of one operating system inside another operating system .

Some of such popular applications available on Linux platform are : Innotek VirtualBox , Qemu , Vmware , Win4Lin and Bochs .

In This article we discuss how to install Microsoft Windows XP inside Ubuntu using QEmu and Virtualbox .

Qemu : - Qemu is a processor emulator created by Fabrice Bellard , it allows full virtualization of a system inside another thus paving way of allowing one operating system to run inside another operating system . Qemu is open source and released under GNU Lesser General Public License (GNU LGPL)
Qemu has many features not available in similar such products like VMware , bochs etc like increased x86 emulation with accelerator module (kqemu) .

This is what qemu website has to say about qemu : -

QEMU is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performances.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. A host driver called the QEMU accelerator (also known as KQEMU) is needed in this case. The virtualizer mode requires that both the host and guest machine use x86 compatible processors.


We would be primarily showing you how to install Windows XP under qemu with accelerator module enabled .

VirtualBox : - InnoTek VirtualBox is a commercial PC Virtualization software similar to Qemu and Vmware and allows running of one operating system inside another . InnoTek VirtualBox though is a commercial software , however there is a limited free version of VirtualBox available too which we will discuss briefly in this article .


Installing Qemu : -

Before we start installing qemu we need to enable all of the Ubuntu repositories which could be done by following these steps : -

Enabling Additional Repositories


Now many applications need additional repositories to be installed or some to be enabled in Synaptic package manager so before trying out steps given below ensure that repositories in order.

Launch Synaptic Package Manager (System -> Administration -> Synaptic Package Manager ) , then in Synaptic package manager go to (Settings -> Repositories ) you will find window like this . Ensure that all the check boxes are marked leaving source code(if you want to you can enable this also but you are not going to need this unless you are software developer) the dialog box should look like this .
Dialog Box showing the repositories that should be enabled

After completing above step you will find a dialog box like this



Now , To install qemu type in the following command in the terminal window :

sudo apt-get install qemu

sudo apt-get install kqemu-source

sudo apt-get install module-assistant

sudo module-assistant auto-install kqemu

After completing above step the kqemu( accelerator module of qemu which allows you to run virtual operating system at near native speed should be compiled properly and ready to be used)

Now type in the following commands to configure kqemu

First we need to create /etc/udev/rules.d/60-kqemu.rules file and open it for editing , we can do it by issuing the following command in the terminal window :

gksu gedit /etc/udev/rules.d/60-kqemu.rules
After the file is opened in the gedit text editor add the following line in the file and make sure you add a newline at end of file too .

KERNEL=="kqemu", NAME="%k", GROUP="kqemu", MODE="0660"

now open the file /etc/modprobe.d/kqemu and modify the content of file to look like :

options kqemu major=0
Now after above step is completed we need to create a group "kqemu" and add all those users who would like to use kqemu to this group , we can do this by following the commands listed below :

To create group : -

sudo addgroup --system kqemu


Now once the group "kqemu" is created we need to add the users who would be using kqemu to this group we can do this by issuing the following command in the terminal window , remember to change $USER with the user's login name for example in my case it is "ambuj" (so command issued was sudo adduser ambuj kqemu ).

sudo adduser $USER kqemu

Now logout of the session and loggin again so that these changes are reflected properly .

After these steps are completed issue the following commands in this sequence to load kqemu module

Force udev to reload by :

sudo /etc/init.d/udev reload

and now finally to load kqemu module

sudo update-modules
sudo modprobe kqemu
Instead if you want kqemu module to load automatically insert "kqemu" in the file /etc/modules

gksu gedit /etc/modules

If you have followed steps properly you should have qemu with kqemu module working properly and now you could move forward and install Windows XP .


Installing Windows XP inside qemu


To install Windows or any other operating system we first need to create a virtual drive which is basically a file residing in your linux partition which would be used as a hard disk for your Guest operating system .

To create virtual drive for windows type in the following command in the terminal window (in the directory you want to create virtual drive and install windows)

qemu-img create win.img 4G
This would create a virtual drive by the name of win.img which is 4GB large . You might like to tinker with the size of the virtual drive or it's partition drive .


Installation of Windows XP taking place inside qemu

Now , put in the Windows CD in the drive and follow step no 1
If you have an iso from which you like to boot follow step no 2

Step no 1 :

qemu -localtime -cdrom /dev/cdrom -m 356 -boot d win.img

This command creates a virtual computer which boots from your local cd rom and has 356 MB of memory allocated as it's RAM .


Step no 2 (Follow this step instead of step 1 if you have an iso of Windows installation which you would like to boot )

If you have an iso of windows which you would like to use as CD Rom for your virtual computer type in the following command(replace cdwin.iso with the name of the iso you want to boot from)

qemu -localtime -cdrom cdwin.iso -m 356 -boot d win.img


Windows XP Running inside qemu



Important: - if you want to install Windows 2000 add an additional option "-win2k-hack" , if you proceed without adding this option the installer might fail with message "Not enough diskspace " even though there may be sufficient.



VirtualBox : -

First ensure that all the repositories are in order as mentioned in the step above . After ensuring that repositories are in order issue the following command to install VirtualBox : -

sudo apt-get install virtualbox
and after above step is completed launch VirtualBox from (Applications -> System Tools -> InnoTek VirtualBox )

Now entire interface of VirtualBox is very user friendly and wizard based so well there should not be any problem in installing guest operating system inside VirtualBox hence i am not listing procedure here .


Wizard Based Interface of VirtualBox

Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Linux on Desktop blog , http://linuxondesktop.blogspot.com
(C) 2007, Ambuj Varshney

Tuesday, December 04, 2007

Getting Sound to work on your Ubuntu 7.10 installation on Lenovo Y410 Series laptop

12 comments
Getting Sound to work on your Ubuntu 7.10 installation on Lenovo Y410 Series laptop


Important : If you are using Ubuntu 8.04 Hardy Heron you don't need to download/compile alsa , in that case following this step only should work :

add the following line at the bottom of file (/etc/modprobe.d/alsa-base) maybe using gedit (sudo gedit /etc/modprobe.d/alsa-base )

options snd-hda-intel index=0 model=fujitsu




Recently i managed to replace my old IBM Thinkpad Laptop with Lenovo Y410 series laptop , now i never had any kind of hardware related problem on my old Thinkpad . But sadly after installing Ubuntu 7.10 , Fedora Core 8 on my Lenovo laptop i was terribbly disappointed to find my audio hardware not working . So well my search began searching all kind of forums for my problem and finally i found following the steps below made my audio hardware work : -



1. Enabling Repositories
Now many applications need additional repositories to be installed or some to be enabled in Synaptic package manager so before trying out steps given below ensure that repositories in order.

Launch Synaptic Package Manager (System -> Administration -> Synaptic Package Manager ) , then in Synaptic package manager go to (Settings -> Repositories ) you will find window like this . Ensure that all the check boxes are marked leaving source code(if you want to you can enable this also but you are not going to need this unless you are software developer) the dialog box should look like this .
Dialog Box showing the repositories that should be enabled

After completing above step you will find a dialog box like this



After completing above step type in the following command in the terminal window : -

sudo apt-get install build-essential

and

sudo apt-get install po-debconf


and

sudo apt-get install debhelper


and

sudo apt-get install quilt


and

sudo apt-get install libc6-dev

After completing above steps we need to download the updated alsa-driver and compile and install it .

Type the following command in the terminal window chdir into your home directory and being the superuser( su ): -

wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.15.tar.bz2


and

tar -xvjf alsa-driver-1.0.15.tar.bz2


and

cd alsa-driver-1.0.15


and type the following command :

./configure
make
make install

and the following command in the terminal window

rm /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko

and

ln -s /lib/modules/2.6.22-14-generic/kernel/sound/pci/hda/snd-hda-intel.ko /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko

and add the following line at the bottom of file (/etc/modprobe.d/alsa-base) maybe using gedit (sudo gedit /etc/modprobe.d/alsa-base )


options snd-hda-intel index=0 model=fujitsu
also add the following lines at end of /etc/modules (sudo gedit /etc/modules)


snd-hwdep
snd-hda-intel

After completing above steps restart computer , and hopefully sound would be working though there are still some unresolved issue because of which sound works through laptop speakers only and not through line-out , but still it's better than not being able to play sound .


Article Written by : Ambuj Varshney (blogambuj@gmail.com)
(C) 2007 , For Linux On Desktop Blog (http://linuxondesktop.blogspot.com)