: The Scratchpad :

How to turn off system bell in Ubuntu?

Step 1:

$sudo /etc/inputrc

Step 2: Uncomment this line

set bell-style none

July 16, 2009 Posted by | Linux Tips | Leave a comment

Restoring Linux – Restoring Grub

If you install Windows on a sytem that has Linux or if you reinstall Windows on dual boot system, the boot loader will be overwritten by Windows Installation.

Good news is that, this does not overwrite the Linux installation, but just the bootloader in the MBR.

Here are the steps to recover your Linux partition:

1. Boot from Linux Installation disk. You need to boot in a special mode called “Linux Rescue”.

2. Depending on the Linux version you may be presented a command prompt or GUI.

If command line, type : linux rescue

If GUI, select: Rescue installed system.

3. chroot /mnt/sysimage

4. cd /sbin

5. grub

6. find /boot/grub/stage1

7. From the list, select the suitable partition that had Grub previsouly installed.

Eg: grub > find /boot/grub/stage1

(hd0,4)

(hd0,5)   <————— Assuming that this is the drive, our next command will be

8. root (hd0,5)

9. setup (hd0)

Note : Here (hd0) represents MBR, and it is not a typo

January 21, 2009 Posted by | Linux Tips | Leave a comment

Largest , Wierdest, Ambitious Projects undertaken by human race

Am I forgetting something? Drop the name of the project you think that should make it into this list in the comments section.

January 17, 2009 Posted by | Uncategorized | Leave a comment

How to convert Youtube videos into iPod movies using VLC player

Note : This tutorial uses VLC Player (this tutorial uses version 0.9.6).

Downloading the youtube video:

  • You can download the youtube videos using Firefox and a suitable addon.  Fast Video Download is one such Firefox plugin.  Install the “Fast Video Download” plugin on Firefox and restart the browser. Usually the “Fast Video Download” icon will be displayed on the bottom right hand corner of the browser window.
  • Visit youtube and open the clip you want to download.
  • Click the “Fast Video Download” icon on bottom right hand corner of the browser window.
  • Save the file.

Converting the Video using VLC Player:

  • Open VLC Player.
  • From the Menu select “Media” > “Convert/Save”.
  • From the File dialog, select the FLV file you downloaded from Youtube.
  • Press the “Convert/Save” button.
  • From the next dialog, select “Outputs” > “File”. Browse for the location of the output directory and append the filename at the end. The extension of the output file must be .mp4.
  • From “Profile” drop down menu, select IPod mp4/aac.
  • Click on “Save” button.

VLC converts the FLV file into IPod compatible mp4 file.

January 15, 2009 Posted by | Uncategorized | 3 Comments

Linux Driver Locations

Linux drivers are available in /lib/modules/<os-ver>/

Continue reading

December 4, 2008 Posted by | Linux Tips | Leave a comment

Windows Tips

How to disable system speaker?
If you have played DOS games, you must have surely got annoyed by the beep sound coming out of your system speaker. You try to use mute the sound, but it refuses to go away.

Here is the trick to disable the system speaker. Enjoy.

1. Start > Settings > Control Panel > System > Hardware > Device Manager.

2. Click View >Show hidden Devices.

3.Under "Non Plug and Play Devices", press right mouse button on "Beep"

4. Select Disable.

5. Reboot.
 Continue reading 

November 28, 2008 Posted by | Uncategorized, Windows XP tips | Leave a comment

Creating static and dynamic libraries in Linux

Static Libraries (*.a):

  • Compile: cc -Wall -c foo.c bar.c
    • -Wall: include warnings
  • Create library “foobar.a”: ar -cvq foobar.a foo.o bar.o
  • Linking with the library: cc -o executable-name prog.c libctest.a

Dynamic Libraries (*.so):

  • gcc -Wall -fPIC  foo.c bar.c
  • gcc -shared -Wl,-soname libfoobar.so.1 -o libfoobar.so.1.0  *.o
  • mv libctest.so.1.0 /opt/lib
  • ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so
  • ln -sf /opt/lib/libctest.so.1.0 /opt/lib/libctest.so.1

November 28, 2008 Posted by | Linux Tips | , , | Leave a comment

VNC Viewer – Linux alternative to Remote Desktop

Use tigervnc…………. otherwise you will get into lot of issues with xterm and missing fonts…..

such as

“could not open default font ‘fixed'”

Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.

This works:

yum install tigervnc-server

yum install tigervnc

VNC stands for Virtual Network Computing. More info here

Continue reading

November 27, 2008 Posted by | Linux Tips | , | Leave a comment

Linux – Frequently used commands

Tar :

tar -cvf <filename> <foldername>

tar -zvf <filename> <foldername> #with tar & zip

Untar :

tar -xvf <filename>

BZip / BUnzip :

bzip2 <filename>

bunzip2 <filename>

February 28, 2008 Posted by | Linux Tips | Leave a comment

Viewing kernel debug logs in Linux

File where the log messages are stored :

/var/log/messages

Commands to view the log messages :

dmesg

dmesg | tail

tail -f /var/log/messages

February 28, 2008 Posted by | Linux Tips | Leave a comment