Showing posts with label Script. Show all posts
Showing posts with label Script. 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

Friday, July 30, 2010

Installing Windows Application in Linux

Most of Linux user suffering from installing Windows application in Linux. By default Linux do not support .exe files. Some users are use the Wine emulator to install windows applications. But i found better GUI Linux application to install windows application in Linux OS.


It is CrossOver Linux. This applications allow user to install most popular Windows applications in Linux. The latest CrossOver version 9 allow user to install Microsoft office 2007 also. This application support many most popular windows applications. You can find more details about CrossOver by visiting codeweavers.com. Also you can see more videos by visiting Codeweaver web site. You can find licensed application through Torrent site. Just Type CrossOver 9 and search it. This application available in .rpm, .deb, and .sh packages.



IF THIS POST IT GOOD AND INTERESTED FOR YOU, PLEASE DON'T FORGET TO LEAVE A COMMENT.


Tuesday, July 13, 2010

Using VI editor on Linux

Here are the commands that you need to Use VI editor on Linux

Open the terminal and issue,
 # vi


Eg : # vi myfirstfile

Insert Text in to the file Using i, a, o, and O

The first way to switch to insert mode is to type the letter i, which, mnemonically enough,inserts text into the file. The other commands that accomplish more or less the same thingare a, to append text to the file; o, to open up a line below the current line; and O, to open up a line above the current line.

Deleting Text

The simplest form of the delete command is the x command, which functions as though you are writing an X over a letter you don’t want on a printed page: It deletes the character under the cursor. Type x five times, and you delete five characters.

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