Showing posts with label Shell. Show all posts
Showing posts with label Shell. Show all posts

Tuesday, August 3, 2010

Create a GRUB Boot Splash Background

Here i show you how to change the background of GRUB Boot splash. To do this you have follow some requirement. They are
  • It must be sized at 640x480. 
  • It must be a .xpm format image file.
  • It must contain no more than 14 colors.


Now we start, Suppose that you got a image in .png format. How do you convert it into .xpm format. You should have to installed ImageMagick and issue following command syntax to convert .png image to .xpm image.

# convert sampleimage.png  -colors 14 -resize 640x480  sampleimagee.xpm

First convert .xpm image to gz. Then copy that .xpm image in to /boot/grub directory

Convert sampleimage.xpm to gz
           # gzip sampleimage.xpm

Copy sampleimage.xpm.gz to /boot/grub
           # cp sampleimage.xpm.gz /boot/grub

Now configure the grub.conf to set your image.
           splashimage=(hd0,0)/boot/grub/sampleimage.xpm.gz

Now reboot the system and see whether you Grub Boot Splash Background has change !

Saturday, July 31, 2010

Install Audio/Video codec in Linux

People who use Linux distribution have to face one common problem. That is playing multimedia files in Linux. Most time MP3 and most video codec are not include in Linux distributions.

So you have to download the all necessary codec and install them. The best codec pack for Linux i’ve got is the Gstreamer Codec Pack. This package includes most popular codec. You can download them all from http://gstreamer.freedesktop.org/download/. All of them are source packages. After you download, unzip, configure, compile and install them. Here are the command that you need

Unzip : tar –zxvf gstreamer-0.10.30.tar.gz

Configure : ./configure

Compile the package : make

To Install : make install

Tuesday, July 13, 2010

Writing A little shell scripting

Here we are going to write a little shell Program.
First open the terminal and then issue following commands
vi firstscript.sh

Now you are created a file called "firstscript" and going to enter shell programming syntax. Enter following simple script.

#!/bin/bash //make this document a script file
# Display text using a function
function textdis
{
echo "Welcome to my Shell Scripting world";
}
textdis; //execute the function



Press Ctrl^d // on your keyboard to save the document

Now give permission for execution -> chmod +x firstscript.sh
Now execute the script file -> ./firstscript.sh