Sunday, October 21, 2007

Installing MPlayer on Linux

Before you install MPlayer, it asks for DivX or XVid codecs.


Fetch them from

http://www.xvid.org/
http://download.divx.com/labs/divx611-20060201-gcc4.0.1.tar.gz


First install these two, so mplayer can support these codecs as well. It’s not a big deal to install these codecs. DivX has a shell script called install.sh just run it using ./install.sh command

Bytheway, to extract a tar.gx or a tgx file, use the following command tar –xzvf file_name.tar.gx
To extract a tar.bx2 file or a tbz file use the following command.
tar –xBvf file_name_here.tar.bz2

for xvid codec uncompress it and go to that directory and in that, go to build/generic
and then do the following
./configure
make
make install

Older wmv versions are supported by MPlayer anyway.

This file you are downloading is a ‘bunzip2’ file, not a ‘gzip’ file http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0pre8.tar.bz2


So to uncompress it you have to use the –B option.
So it should be
tar –xBvf MPlayer-1.0pre8.tar.bz2

Then start installing MPlayer uncompress it
tar -xBzf MPlayer-1.0pre8.tar.bz2

Go into that directory, it’s creating
./configure –enable-gui
If you don’t unset h –enable-gui option it will not compile it for the GUI skin.
make
make install

Then install a font
Copy a ttf file form anyware to the /user/local/share/mplayer/ directory and rename it so subfont.ttf

Then install a skin.
Download any skin from http://www.mplayerhq.hu/MPlayer/Skin/ and then make a director inside /user/local/share/mplayer/ calles skins. Copy the skin (.tar.bz2 file) into the newly created directory and uncompress it.

Then rename the skin (the name of the directory which was created by uncompress) that you want to appear as the default skin for Mplayer, to default.

Then you can play music and movies. Use gmplayer file_name.mp3 in a terminal or you can set file association and then use it like any other player you are already familiar with.




























How to make Firefox Faster

















Here is the way of doing it…

1. Type "about:config" into the address bar and hit enter. Scroll down and look for the
following entries.

2. Alter the entries as follows:
Set "network.http.pipelining" to "true"
Set "network.http.proxy.pipelining" to "true"
Set "network.http.pipelining.maxrequests " to some number like 30. This means it will make 30 requests at once.

You can set this value in to any number,but i guess 30 would be more than enough..

3. Lastly right-click anywhere and select New à Integer.
Name it "nglayout.initialpaint.delay" and set its value to "0". This value is the amount
of time the browser waits before it acts on information it receives.

Visual Studio 2008 and .NET 3.5






















What’s New with .NET 3.5


CLR Enhancement.
Compiler Enhancement.
LINQ.
Performance Improvement.
Networking Changes.
Windows Information APIs.
WCF works with POX and JSON.
So many more..



















What’s New with Visual Studio 2008


Supports .NET 2.0, 3.0 and 3.5.
Enabling Flexibility to switch on / off.
Works on HTML, XML and Code Editor.
Semi-Transparent IntelliSense.
Multi-Targetting.
Organized Using.
Split View.
WPF IDE Integration.
Nested Master Page.
Richer support for JavaScript.
Good for AJAX Developers.
So many more..

This Blog Post is based on the Presentation of Chua Wen Ching (Solutions Engineer, Mesiniaga, Malaysia and Microsoft MVP Visual Developer – Visual C#) which was presented at the Microsoft Developer Day 2007 Sri Lanka.

You can Download those Presentation Slides from following URLs.

Discover Next Generation Visual Studio and .NET Framework 3.5.zip

An Adventure with CSharp and LINQ.zip


Saturday, October 20, 2007

Microsoft® Silverlight™









"Microsoft® Silverlight™ is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, Python, and Ruby, and integrates with existing Web applications. Silverlight supports fast, cost-effective delivery of high-quality video to all major browsers running on the Mac OS or Windows."















For more information about Microsoft® Silverlight™ visit..

http://silverlight.net/

How to get the Read & Write Permissions to ntfs File Systems using Linux






1st Install the fuse Package..

http://fuse.sourceforge.net/

Here is the steps for installing fuse..

tar -xBvf filename
./configure
make
sudo make install

Then Install the ntfs-3g Package..

http://www.ntfs-3g.org

Here is the steps for installing ntfs-3g..

tar -xBvf filename
./configure
make
sudo make install

If you have done it correctly ntfs-3g is ready for your Linux Computer..
You have got the right to read & write ntfs file systems..

Follow the following steps to mount your ntfs partitions with ntfs-3g..

Unmount all the partitions those are already mounted..
Use the below command..
sudo umount -a

Then mount them back with ntfs-3g..
Use the following command..
sudo ntfs-3g /dev/sda(Partition #) /mnt/(Partition Name)

For more information read the manual pages for fuse & ntfs-3g..
Use man -ntfs-3g and man -fuse..



How to Repair a Corrupt MBR and boot into Linux

There are times when you inadvertently overwrite your Master Boot Record. The end result being that you are unable to boot into Linux. This is especially true when you are dual booting between windows and Linux OSes. Once when I was working in Windows XP, I accidentally clicked the hibernate button instead of shutdown. And windows somehow overwrote my MBR which housed the GRUB boot loader. At such times, it pays to have this cool tip at hand.

This is what you do to restore the GRUB boot loader when faced with the above problem. First you need a Linux distribution CD. If you are using Fedora (RedHat) then the first CD is sufficient. But you may also use any of the live CDs like Knoppix, Ubuntu Live CD and so on.


With Fedora CD

Boot your computer with the first CD of Fedora in your CD drive (You have to enable your PC to boot from the cdrom, which you can set in the BIOS settings). At the installation boot prompt that you get, enter the following command:

boot: linux rescue

... and press Enter. The installer will ask you a few questions like the language you would like to use, the type of keyboard etc. Then, if you have linux previously installed on your machine, the Fedora installer will automatically detect it and mount it in the /mnt/sysimage directory. Once the linux partition is mounted, you are dropped into the command shell prompt. The next step is to make your newly mounted directory the root (or parent) directory. This you do by running the chroot command as follows:

# chroot /mnt/sysimage

# _

Now you are in the shell with respect to the parent directory which is the linux partition on your harddisk.

From here, the steps needed depends on which bootloader you are using. You have to have a fair idea what is the device node of your harddisk partition housing your MBR. In most cases, it is /dev/hda if you have an IDE harddisk. But if you have a SCSI harddisk, it will be /dev/sda.


Restoring GRUB
Execute the following command :

# grub-install /dev/hda

... to install GRUB boot loader on to your MBR. And then type exit to reboot the machine. Now your GRUB boot loader is fixed.


Restoring LILO

LILO stands for LInux LOader which was the boot loader used before GRUB was developed. It is fairly cryptic and is the default bootloader prior to and in RedHat 7.0 .

Here you just type the command :

# /sbin/lilo

... to install the bootloader on to the MBR.

If you don't have a Fedora CD, then you need not despair. You can also repair the boot loader using one of the numerous live CDs available.


Using Knoppix CD to repair the boot loader

Here you have to boot into knoppix (either GUI mode or text mode). Once you are logged in, fire up a terminal (in GUI mode) and type the following commands:

$ su -

# fdisk -l

This will list your hard disk partition information. From the listing, you can know in which partition you have linux installed. Now you have to mount the partition which contains the linux filesystem. For the sake of this discussion, let us assume it is /dev/hda3 .

# mount -t ext3 -o rw /dev/hda3 /mnt

#_

Now your linux partition is mounted at /mnt . Next you have to use the chroot command as follows:

# chroot /mnt

#_

The rest of the steps are the same as listed above for Restoring GRUB and LILO boot loaders.