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)

Friday, November 16, 2007

Creating Your ultimate Ubuntu 7.10 Desktop

12 comments
Creating Your ultimate Ubuntu 7.10 Desktop

Ubuntu 7.10 Codenamed Gusty Gibbon was released few weeks back with much fanfare ,now Ubuntu for past couple of years has been one of the most popular Desktop Linux distributions . Ubuntu 7.10 includes a number of features , applets and Wizards to simplify desktop Linux experience however because of many licensing restrictions it does not include out of the box support for popular audio/video codecs and many commercial but good applications . Also because of the limitation of trying to accommodate all kind of applications on single CD Ubuntu comes with a limited set of applications .

Now , i often have arguments with my friends who are new to computers that windows is better , mac is better and blah blah blah and they often use this argument that it's difficult for newbies to install applications , codecs etc on Linux as a way to justify their arguments . So well i decided being such a Linux fanatic i have to do something about it so well i thought of writing a guide sort of step by step tutorial that would allow anyone to have a kicking Linux desktop with most of the codecs enabled and descent set of applications in few steps .

Steps Written in RED are of paramount importance and other steps may not work correctly if these steps are not followed .

Step 1 : - 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


Besides these you may also like to add medibuntu repositories if you want to install applications like ------- , to add mediubuntu repositories follow the following steps

echo "deb http://packages.medibuntu.org/ gutsy free non-free" | sudo tee -a /etc/apt/sources.list

and

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update



2. Enabling Cool Graphics Effects

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
Now , the biggest advantage of Compiz Fusion is even on really slow hardware one can have descent set of visual effects even on my slow laptop i could use Extra graphics effects though it was painful while using application like OpenOffice because of my slow hardware.

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 .

3. Installing Audio/Video Codecs

The first thing anyone who wants to use Ubuntu as a replacement to their windows operating system would like to do is install support for all kind of audio/video multimedia codecs . Ubuntu does not come installed with support for major audio/video formats because of licensing issue and other issues . To install support for audio/video codecs type in the following command in the terminal window : -

sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly
And if you want to install mp3 support in nautilus you may like to install mpg123 which is a nice command line based utility for playing mp3 files and it works well even on modest hardware .

sudo apt-get install mpg123

This would enable most of the popularly used codecs in the Totem Movie player which uses the GStreamer framework to play audio/video files.

If you want to use a different media player and framework you might try installing MPlayer or VLC (depending on which you prefer ) instructions on installing them are listed below .

Installing VLC Player : -

LC Player is another of popular video player available under Linux . It is released under GNU General Public license and is available for different platform including Windows,Linux,BeOS,Mac OS X etc. VLC player is based upon free open source libraries like libdvdcss,FFMpeg for decoding various video formats.One Important feature of VLC Player is it's ability to play files over NetWork Protocols. The Frontend of VLC player is created using wxWidgets toolkit and it's appearance can be changed by using different skins. One Popular feature of VLC Player is it's ability to play files that are incomplete/broken or partially downloaded , making it useful for previewing file while downloading on file-sharing networks.

To install VLC Player type the following command in the terminal window : -

sudo apt-get install vlc

After completing above step launch vlc player from (Applications -> Sound and Video -> VLC media player )


3. Installing Linux DC++ Client

DC++ is a popuar tool used for p2p file sharing and is especially popular in college campuses , to install dc++ for linux follow the following instructions .

Type the following command in the terminal window: -

sudo apt-get install linuxdcpp
And after completing above step launch dcpp from (Applications -> Internet -> DC++)
Linux Client of popular DC++ Application


aMule

aMule is alternative to popular eMule program on windows platform , amule supports/works with eDonkey2000 Network or Kadnetwork and allows P2P sharing of files . aMule is available on number of platforms , Current supported systems include Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Windows and Solaris.

To install aMule type the following command in the terminal window : -

sudo aptitude install amule
After completing above step launch aMule from (Application -> Internet -> aMule )


4. Installing Adobe Acrobat Reader


* Requires Mediubuntu repositories

Type in the following command in the terminal window :

sudo aptitude install acroread acroread-plugins acroread-escript


and , plugin for firefox

sudo aptitude install mozilla-acroread


5. Installing Macromedia Flash support and Sun Java JRE

Both Macromedia Flash and JRE are an important part of internet experience almost all the websites use either of the two technology to add extra functionality to the web page . By default Ubuntu does not come preinstalled with support for these two , however they can be installed quite easily by typing in the following command in the terminal window .

To install flash type in the following command in the terminal window this command is going to download a script that would further download the files needed for installing flash-support and install it .
sudo apt-get install flashplugin-nonfree
Script downloading further files needed for installing flash support



and to install Sun Java JRE type in the following command in the terminal window .

sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

6. Scribus

Scribus is one of the most impressive Desktop Publishing application that is free and cross platform . Scribus is available on Windows , Mac OS X , Linux , OS/2 etc . It is highly suited for preparing file for professional quality image setting equipment .It has high end page layout features of the kind found in Adobe PageMaker, QuarkXPress and Adobe InDesign.

It can also create animated and interactive PDF presentations and forms. Example uses include writing small newspapers, brochures, newsletters, posters and books.

Anyways , to install scribus type the following command in the terminal (Application ->Accessories -> Terminal )

sudo aptitude install scribus
and after completing above step launch scribus by typing "scribus" in terminal window.
Scribus on Ubuntu

7. Downloader For X

Downloader for X is a nice download manager that allows downloading files from Internet , pausing them and downloading them later . It also supports splitting file into number of segments so that files could be downloaded quickly . However one thing that i didn't like about is it's interface is somewhat difficult as compared to some of the download manager available on Windows.

Anyways to install " Downloader for X " type the following command in the terminal window.

¨sudo aptitude install d4x "


After installation is over launch ¨Downloader for X¨ by typing ¨d4x¨ in the terminal window , or by going to (Applications-> Internet -> Downloader for X )


This is how Downloader for X looks




8.
Google Desktop

Google Desktop allows one to full text search of a user's e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .

Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .


To install type the following command in the terminal window : -


wget http://dl.google.com/linux/google-repo-setup.sh


and

sudo bash google-repo-setup.sh


Now after completing above steps to install Google Desktop Search type the following command in the terminal window : -

sudo apt-get update

and

sudo apt-get install google-desktop-linux

After completing above step logout of gnome session and relogin you would find the following dialog window

select the appropriate option : -


Now after choosing appropriate option you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .


9. Google Picasa

Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS (??) . Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.

Now to install Google - Picasa type the following command in the terminal window

wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
and
sudo dpkg -i picasa_2.2.2820-5_i386.deb
After completing above step launch Google Picasa from


Some Tips to consider before running picasa (taken from google picasa website )

Tips

  • If you use NFS, when Picasa first starts, tell it to scan just your desktop! Otherwise Picasa gets real slow while it scans all your NFS directories!
  • To get Picasa to see pictures on your hard drive, click "File / Add Folder" (NOT "Import").
  • When adding a folder to Picasa, the default action is to remove the folder from Picasa. You have to actively choose Scan once or Scan always.
  • Picasa is not supported over remote X connections.

10. Google Earth

To install Google Earth type the following command in the Terminal Window (Application->Accessories -> Terminal ),keep in mind that googleearth is downloaded from Medibuntu repositories and not Ubuntu hence be sure you have activated the repositories correctly as described in first step of this article.

¨sudo aptitude install googleearth"

After downloading is over you will get a screen like this press ¨Yes¨ to accept the license agreement and complete software installation.


Now you can launch Google Earth from (Application -> Internet -> Google Earth)

A Picture of Google Earth Running on linux



11.
Installing gdesklets

gdesklets 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 , it does provide quite a good look to the desktop.

To install gdesklets issue the following command at the command line

sudo apt-get install -y gdesklets
after installation go to (System -> Preferences -> Sessions) There go to Start up program and add gdesklets shell , now every time gnome loads up you should see your gdesklets on the desktop.

This is how my desktop looked like with all the desklets (Widgets )

12. Installing MPlayer with all codecs and dvd playing support

*This step requires Medibuntu repositories

MPlayer is one of the most popular media player available on linux , it supports playing all the major audio/video file formats . With w32codecs and libdvdcss2 it plays all the major audio/video format,however w32codecs has dll files from windows operating system hence its not available on the ubuntu official repositories and needs to be downloaded from the mediubuntu repositories.

To install MPlayer with all codecs type in the following command in the terminal window : -

sudo apt-get install mplayer


and

sudo apt-get install w32codecs libdvdcss2



After completing above steps you could launch MPlayer by typing in gmplayer in the terminal window or from (Application -> Sound & Video -> MPlayer Movie Player )


Quod Libet : -

Quod Libet is an extremely versatile music player based on GTK+ that is extendible via plugins , has a rich feature set and has really unique feature of building playlist by searching for particular kind of music files based on search terms or regular expression . It has been programmed in Python programming language and hence it's plugin are also created in Python. A number of plugins are available including ones that help in copying songs to digital audio players , last.fm plugin , advanced editing features and many more .

Quod Libet uses GStreamer framework of GNOME to play audio files and hence integrates quite well the the GNOME desktop environment , also audio format supported would be same as the one supported by GStreamer so you may want to install mp3 support since by default many linux distributions these days dont come with mp3 support installed.

To install Quod Libet type the following command in the Terminal Window : -

sudo apt-get install quodlibet
and after completing above step launch quod-libet from (Application -> Sound & Video -> Quod Libet )

Quod Libet Website : - http://www.sacredchao.net/quodlibet


13. RealPlayer

Realplayer is one of the most popular cross platform media player available on Windows,Linux , Mac OS and a number of other platform . RealPlayer plays popular .rm ,rmvb,.mp3 and other media formats.

To install RealPlayer first download RealPlayer10GOLD.bin file from the following website assuming you have downloaded it to your home directory .

After downloading the file go to the directory where you have downloaded the file in terminal window and type

After installation is over type

¨chmod +x RealPlayer10GOLD.bin¨

and

¨sudo ./RealPlayer10GOLD.bin¨

for installation to begin . Follow the instructions as presented to complete installation .

After installation is over you can launch Real Player from (Application -> Sound & Video -> Real Player 10 ).

Real Player for Linux




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

Thursday, October 25, 2007

Ubuntu 7.10 Desktop Linux on Steroids

1 comments
Ubuntu 7.10 was released a few days back and being an avid and passionate user of Ubuntu Linux i downloaded the distribution on my slow college internet connection , It took me over 30 hours to download the distribution [:(] So i was really looking forward to the new Ubuntu 7.10 and here is the review of the Linux distribution :-

Ubuntu is one of the better known Linux distribution , that is making mark on the desktop front from the deal with Dell to topping distrowatch there have been ominous sign that Ubuntu could actually challenge likes of Mac OS and Windows on the desktop . Ubuntu 7.10 is one step forward in this direction . It is probably one of the most polished Linux distribution that is very well supported by community on the internet . Ubuntu 7.10 builds on previous releases and adds new features , functionality, features ,customization that truly make it a interesting desktop Linux distribution to try.

Installation : -

I have been using a really old laptop (Cel 1.4Ghz , 256 MB etc etc) so as recommended on the Ubuntu website (they recommend not to use Live CD for installation on system with less than 320 MB of RAM) I downloaded alternate installation CD which is basically text mode installation cd for Ubuntu which provides a bit more customization of installation . Now initially the installation did go well , i didn't have any kind of problem but when actually it started copying files onto the system and configuring various devices on the computer for some strange reason entire installation screen looked garbled with all kind of strange text ( i guess it happened because of some bug in graphic card detection system because it was doing that when this happened on my system) anyways so since alternate installation CD didn't work out the way it should have i downloaded normal Live CD .
Some Clips of Installation using alternate installation CD


This is how alternate installion CD's installer froze

I booted into Live CD , now to my surprise Ubuntu 7.10 had automatically mounted swap partition unlike the previous Ubuntu distribution which for some strange reason had removed automatic mounting of swap drive making entire Live CD installation painful on my rickety old system .

Now because of mounting of swap partition , the Live CD and Installation was atleast responsive (unlike Ubuntu 7.04 :( ) and i was able to install Ubuntu on my computer in around 1 hour . The installation program hasn't changed a lot from the previous release of Ubuntu 7.04 . There is a migration assistant that could be of particular use to Linux newbies who would be using their computers as dual boot system , it basically allows one to have the same kind of desktop configuration (fonts , wallpaper , user account etc etc) as Windows on their newly installed Ubuntu Desktop . Also, since in the Live CD installation you are booted into a full fledged Linux desktop so if you have sufficient amount of RAM you could easily use other applications while installation is going on .

Over the past 8-9 years i had been using Linux , Linux installation has improved a lot from a time when it was the most difficult part for newbies to a time now when installation of certain flavor of Linux distribution like Ubuntu,Freespire,etc are even simpler than popular Windows operating system , things have surely changed a lot .

Booting into newly Installed Ubuntu System

After completing the installation on rebooting the system , i was presented with grub bootloader and to my relief it had configured my operating system properly ( i have Windows XP , Freespire , OpenSuse installed) . From selecting Ubuntu in grub bootloader to booting to Log in screen the entire thing took ----- minutes .

Ubuntu 7.10 Login Screen

After logging into , i was thrown into the familiar Ubuntu desktop with Human theme . Now the first thing you notice is that all your partition including NTFS windows partition are automatically mounted and even read /write support is automatically enabled unlike Ubuntu 7.04 .

Also , unlike previous releases of Ubuntu where one had to manually download and install Compiz Fusion (Compiz Fusion is composite window manager that provides best features of Compiz and Beryl) from Repositories if one wanted to have glitzy visual effects . In Ubuntu 7.10 Compiz Fusion comes 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
Now , the biggest advantage of Compiz Fusion is even on really slow hardware one can have descent set of visual effects even on my slow laptop i could use Extra graphics effects though it was painful while using application like OpenOffice because of my slow hardware.

Hardware Support

Hardware support is one area where desktop Linux has matured a lot over past few years most of the cameras,phones , ipod , printers ,graphic card etc all are very well supported out of box on Linux distribution these days , and Ubuntu has one of the best hardware support .

I Was able to use my phone Sony Erricson K750i and Nokia N73 ,Printer HP 1210 , Apple 30GB ipod , and few USB pen drives out of box without any hassle . Now besides this it recognized and configured almost all the peripherals on my laptop properly .

Another interesting addition to Ubuntu 7.10 is new Graphical Configuration Application (System -> Administration -> Screens and Graphics ), that simplifies configuration of things like graphics driver , resolution , monitor , dual screen , etc . Now this application is welcome addition as configuring via xorg.conf is really painful and difficult for Linux newbies . Also another interesting thing was support for wide screen monitor , in previous releases i had a significant trouble trying to configure widescreen monitor support using utility like 915resolution , Now in Ubuntu 7.10 it seems this application has done something to make it bit easier . Though because of unavailability of wide screen laptop i wasn't able to test this .
Screen and Graphic configuration application
Another interesting thing in this release of Ubuntu 7.10 is improved font support , the fonts look much better than previous release of Ubuntu and even in Firefox i must say fonts looked better than same web page rendered on Firefox running on Windows .

There is also significant improvement in printing .



Application Set

Since Ubuntu is a single CD Linux distribution , it comes with very basic set of applications . Some of the application included with Ubuntu 7.10 are : -

As a desktop environment Ubuntu uses Gnome 2.20 , if you are one of those who prefer KDE you could use Kubuntu .


As Email Client Ubuntu comes preloaded with Evolution, and for internet browsing Firefox Web Browser .
Application Menu in Ubuntu
Ubuntu comes loaded with OpenOffice 2.3 which is quite mature office productivity suite , with included applications for word processing , Spreadsheet ,Presentation , Database and Graphic designing . OpenOffice over years have matured a lot from it's StarOffice days , especially in terms of Microsoft Office compatibility . One should be able to open Microsoft Office documents easily in open office with little or no loss of formatting .

For instant messaging Ubuntu 7.10 has Pidgin 2.2.1(Which was previously called Gaim ) , now Pidgin supports all the major protocols including AIM,Jabber,MSN,Yahoo,IRC etc .
Pidgin Instant Messenger
Though , One area where Ubuntu lacks a bit is Multimedia support it comes with basic multimedia application and only limited codecs are installed by default because of Licensing issues .However Ubuntu 7.10 has made it really easy to install codecs with wizard based installation of codecs.

Wizard based Installation of codecs

For Music management it comes preinstalled with Rhythmbox which has good Ogg playback though mp3 support is lacking because of codec issues , For movie playing it comes pre installed with Totem which uses Gstreamer back end for playing video files . Though i would recommend installing of more mature and better multimedia application like MPlayer or Xine for playing video files .

For Photo management it comes preloaded with F-Spot and for graphics editing GIMP .


Desktop Search

One significant inclusion in Ubuntu 7.10 is inclusion of search tool called Tracker this tool coupled with search applet provides a very similar search functionality to Mac OS Spotlight . Now the application is still in early stage of development , but still it promises a lot . Now there have been similar tools available on Linux including Novell supported Beagle and Google Desktop but biggest advantage of Tracker over these tools is Tracker is extremely efficient and can perform well even on slow hardware .

Also one can easily adjust performance of Tracker from (System -> Preferences -> Indexing Preferences )

Tracker Performance Adjusting Dialog Box

Also Tracker is very well integrated with Gnome with Deskbar applet providing easy way of searching for files , Deskbar applet provides simple way of searching for files . Alt + F3 opens up Deskbar search box .

Tracker Deskbar Search Applet


Alternatively if you want to use Tracker search box , you could use (Applications -> Accessories -> Tracker Search Tool ) for searching for files .
Tracker Search Box

Conclusion

Overall Ubuntu 7.10 is extremely usable Desktop Linux distribution that could be ideal distribution for people making transition from Windows to Linux or Mac OS to Linux . Tracker search tool , Easy wizard based installation of codecs , Visual Effects using Compiz Fusion and easy installation of thousands of application in repositories all of this makes Ubuntu very appealing to linux newbies .


Brief of features in Ubuntu 7.10 : -
Kernel 2.6.22
Xorg 7.3
OpenOffice 2.3
Firefox 2.0.0.6
GNOME 2.20
Pidgin 2.2.1
GIMP 2.4.0-rc3
Tracker search tool
Compiz Fusion 3-D effects



Article Written by : -
Ambuj Varshney <>
For Linux On Desktop Blog (http://linuxondesktop.blogspot.com)
(C) 2007 , Ambuj Varshney