25 September, 2007

Playing Audio/Video on FC7 ( Fedora )

Apart from surfing and editing documents, most of us these days use our machines for listening to music or watching videos. Here i try to detail my experiences in getting audio and video working on my FC7 installation on the HP Pavillion tx1000 tablet. I hope that this becomes a easy reference for people who want multimedia on the Linux Desktops/Laptops.
Also provived is misc. info on other useful topics like package conversion etc.


Playing mp3 files on XMMS:
The MP3 plugin for XMMS doesn't come bundled by default with the distro due to some licensing issues. Download the xmms-mp3-1.2.10-16.fc7.i386.rpm plugin from here
Install as follows:
#su -
#rpm -iv xmms-mp3-1.2.10-16.fc7.i386.rpm

Playing vcd, dvd, .dat, .mpg, .wma, .avi, .divx, .mkv files in FC7
Enable the Livna Repo using following command:
#rpm -ivh http://rpm.livna.org/livna-release-7.rpm
Download necessary plugins as follows
# yum install gstreamer-plugins-ugly
Remove existing totem player from your system(there are install issues with xine)
# yum remove totem totem-mozplugin totem-plparser
Install the player afresh with other addons using:
# yum install totem-xine totem-xine-mozplugin totem-xine-plparser libdvdcss libdvdnav libdvdplay xine-lib-extras-nonfree rhythmbox.i386 0:0.10.0-8.fc7
That's it! Now you can play most of the formats.

Flash plugin for Firefox on Linux:
Download the rpm from here
Install as follows:
#rpm -iv flash-plugin-9.0.48.0-release.i386.rpm


RPM-DEB package inter converter:
There are times when a package is available for as a .deb package but no rpm. A nice utility for doing the same and vice versa is alien. You can install it on FC7 as follows:
1. Download alien from here.
2. Ensure you have perl installed. I have 5.8.8. Other versions should also be fine.
3. Download html2text from same place as you downloaded alien in step 1.
4. Install html2text with
#rpm -i --nodeps html2text-1.3.2a.i586.rpm
The --nodeps option is required as it cribs about some missing dependency.
5. Extract alien.
$tar -zxvf alien_8.64.tar.gz
6. Install alien
$cd alien
$perl Makefile.PL
$
make PREFIX=/usr
$su -
#make PREFIX=/usr install
#cd /usr/lib
#ln -s /usr/lib/libcrypto.so libcrypto.so.4
#ln -s /usr/lib/libssl.so libssl.so.4
#exit


Now you can convert a .deb package to rpm and vice versa like this:
$alien --to-rpm your_deb_package.deb

I would like to thank:
http://lampcomputing.com/node/5 (playing video on fedora).
http://www.hccfl.edu/pollock/AUnix1/alien/ (provides alien).

20 September, 2007

Install FC7 (Linux) on HP Pavillion tx1000

Got a brand new tablet tx1000 this month and i've spent a lot of time intalling and configuring Linux on it. I'm sharing my experiences here. I installed Fedora(FC7) on my tx1000. The exact model of my tablet is tx1201AU and it was bought in India. Got Vista pre-installed on it.
Note: There are other sites providing help on the same. Some info might seem repetitive but here i document only the portions i have used and tested personally.

Free space creation on disk for Linux.:
Didn't use any tool like cfdisk. Simply used options available in Vista control panel to shrink the partition. The max. compression obtained is 50%. So, after doing this, i had ~70GB for Linux. Good enough!. And yes, don't forget to create backup disks for your Vista before you play around with your system. And during the installation i also got rid of the other factory default partition used as a recovery partition.

FC7 Install:
Used a FC7 DVD that i got free with LinuxForYou (July 2007). As the install starts, the screen freezes. I thought that was the end of it. I hit the Power button. But wait! The installer moved ahead as i hit the Power button. Rest of the install was pretty normal. After installation, the kernel seemed to hang while booting again. Use the Power button OR touch the mouse pad to boot into the prompt. First things first.
#su -
#yum upgrade kernel kernel-devel

After this edit your grub.conf and change the kernel boot cmdline of the upgraded kernel to the following:
ro root=LABEL=/1 noapic nolapic irqfixup pci=nommconf

This should fix your kernel freezes at boottime.

NVIDIA Graphics Card Setup
Next comes the NVIDIA graphics driver. The NVIDIA driver is a proprietary binary only module. Get it from here. Be careful about the version (IA32/IA64/AMD64). I chose IA32 version as the FC7 DVD provides a 32 bit kernel(no 64 bit goodness for me yet:( ).
Backup your /etc/X11/xorg.conf file.
Login as root
#init 3
This will stop X and take you to run level 3.
#sh NVIDIA-Linux-x86-100.14.19-pkg1.run
It will re-build the kernel module for you. The kernel-devel package should be present. If you ran the yum command mentioned above, you should have no problems. It also runs the nvidia-xconfig.
Add following lines in your /etc/X11/xorg.conf's Section "Module" if they are already not present.
Load "extmod"
Load "glx"
#init 5
You are ready for some mind blowing eye candy now. Go to System->Preferences->LookAndFeel->DesktopPreferences and switch On Desktop Effects for some nice effects.
I've also tried SecondLife Client (requires 3-D support from your Graphics Card )and it works absolutely fine. By the way it doesn't work on Vista(no SecondLife client support on Vista yet).

Audio
Audio doesn't work by default. Download the latest alsa package from:
ftp://ftp.suse.com/pub/projects/alsa/snapshot/driver/
$tar -jxvf alsa-driver-hg20070904.tar.bz2
Go to the untarred folder.
$./configure
$make
#su -
#make install
#yum install xmms
Launch XMMS and set Options-Preferences->OutputPlugin->Configure->AudioDevice to hw:0,0
That gets your XMMS working and also provides headphone jack detection.

Webcam:
$svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk
$
cd trunk
$
make
#make install
#
modprobe uvcvideo
Run Ekiga and select V4L2 as configuratiion option.

TouchPad
By default the TouchPad is hyper sensetive. You can reduce the sensitivity of the TouchPad by installing gsynaptics and fine tuning the sensitivity.
#yum install gsynaptics
Now edit the /etc/X11/xorg.conf and in the "Input Device" section for "Synaptics" add the following line at the bottom.
Option "SHMConfig" "true"
Now restart X as follows:
#init 3
This will take you to the console login. Login as root and start X with following command:
#init 5

Now you can adjust the TouchPad sensitivity from the link System->Preferences->TouchPad


Extra Keys:
You can configure the DVD and the QuickPlay keys on the right hand side of your screen as follows:

#yum install xbindkeys

Edit your /etc/rc.local file to add following
#DVD button
setkeycodes e00e 144
#Media button
setkeycodes e008 136

Add following lines to your user's ~/.Xmodmap (if you don't have one create one)
keycode 198 = XF86Launch0
keycode 122 = XF86Launch1


Add following lines to your user's ~/.xbindkeysrc (if you don't have one create one)
"totem"
XF86Launch0
"xmms"
XF86Launch1

Now add the xbindkeys command to your session. Got to System->Preferences->Personal->Sessions create a new entry and add xbindkeys
Next time you log in, pressing the DVD button should start totem and pressing the QuickPlay button should start xmms, assuming you have them installed.

Doing the above should give you a pretty much functional machine though without much fluff. Suspend (to RAM) works fine out of the box as does smart card. Sometimes the SmartCard might not be mounted automatically, this can be done manually as follows:
#mount /dev/sdbx /media

TODO:
1. Haven't got Bluetooth working yet though i tried once.
2. Touchcreen
3. Wireless

I would like to express thanks to the following for their great work and providing initial leads to sort out the installation problems:
http://www.cnpbagwell.com/Tx1000/HomePage
http://www.kellyandsopho.com/tiki/tiki-index.php?page=LinuxOnHpPaviliontx1000z

15 February, 2006

Bulls or Bears ?

The Indian stock market (Bombay Stock Exchange or BSE) has touched dizzy heights in the last fortnight crossing the psychological 10000 mark. The rate at which the sensex has climbed is also noteworthy, taking just under 2 months to jump from the 9K to the 10K mark. After the Dot Com bubble burst in 2002, the Dow Jones never managed to touch it's peak which it attained during the boom, but the BSE has not only touched the peak but has also gone on to record new highs. So what does all this mean to the investor who invests his savings and anxiously waits for quick and better returns on his hard earned money?

In the stock market setup there are basically three entities that are involved - the buyer, seller and the stock broker. When the markets are bullish lets see who all benefit from the climate. The seller benefits by reaping good returns on investment, the broker benefits because of all the trading activity, the companies listed on the exchange benefit as they get an easy opportunity to raise huge capital sums easily, the investment bankers benefit as they get the business of bringing out IPO's and of course the politicians who can boast of a thriving economy. But is it good for the common man who wants to invest his savings in stocks?

Simple mathematics will suggest that the value of the investors money is reduced and the stakes become very high for him. Given the volatility of the stock market, it is very difficult to predict if the markets will go higher and higher and bring in returns for the investor who has invested when the markets were bullish. The Indian economy with its dependence on the monsoons cannot be expected to perform well under all circumstances. This maybe a pessimistic view when all around us people are rejoicing and the economy is flush with liquidity. But then i feel that these are genuine concerns that a wise investor should think of before investing bigger sums of money in the stock market. Every company into which your investment goes should be carefully checked for its past trends and its roadmap for the future should be carefully scrutnised. Given the flurry of investments made by MNC's in the Indian economy, there should not be much concerns about the markets doing better. But then the wise will investor should be prepared for the lean season as well.
Or are we better off praying for a bearish market in 2006? Ouch !

14 February, 2006

Loose Control !

The weekend was happening and the underlying theme was 'Loose control'(will come to this later). That's what we did when myself, Geeson(my roommate) and Akash started off on a early morning bike ride. The plan was to see Geeson's work place(actually a chemical factory) at Hoskote and then grab some breakfast before returning home. So we got up at 5 A.M. and dressed up to venture out in the chilly morning. Just to warm ourselves up, we played some indoor football(for which we faced our landlady's wrath later in the day) before we set off.

The morning air was chilly and crisp and the empty roads were a welcome break from traffic jams in which we get stuck in Bangalore. Geeson forgot to get his driving glasses and had a tough time driving through the chilly wind. The scenery on the way was not very spectacular. Although the two lakes on the way were a visual delight (also a treat for bird watchers and photographers). Sadly we did not have a camera. We saw a couple of dead dogs lying on the road that were run over by Lorries. It was a disturbing sight to see the birds scavenging on the poor dog's squashed dead body. As we entered the Hoskote Industrial area, we passed by the Glas Fibr Ltd. who are the only manufacturers of wind mill blades in India. It was an awesome sight seeing those giant blades so closely. We reached our destination Akzo Nobel Coatings Ltd. in about 40 minutes time. We parked our bikes, took out visitors passes and started the tour.

The factory was a pretty sight considering that it was a chemical factory. The beautiful lawns and the shiny architecture made the place look like one of those new economy businesses. Geeson showed us around the manufacturing unit and explained how the powder coatings are manufactured and applied. We wondered how much the technology has advanced and processes have matured. We spent about 45 minutes in the factory and then started our journey back. Before setting the pace we stopped at a roadside tea stall and had some hot tea. I enjoyed the return trip much more as the sun had come out and it was not very cold. On the way Geeson suggested that we could drop in at our friend Ankur's place and if lucky might have our breakfast there. This turned out to be a good idea and we reached home by 10.45 A.M after our breakfast with Ankur and Priyanka.

During our breakfast conversation in the morning we planned to watch the movie Rang de Basanti in the evening. The movie turned out to be a nice tale of a hedonistic bunch of guys transform to rebels to stem the rot in Politics and in the Society. It also highlighted another important issue, i.e., of bringing out the nexus between politicians and middle men in defense deals which has cost India 206 MIG planes and the lives of 76 young pilots. The movie's soundtrack by A.R. Rehman is awesome and the 'Loose Control' theme was a big hit among the crowd. Well, not one to be left behind, we chipped into the theme in our own way and went to 'The Dhaba' and talked of the ills plaguing the society. The party ended with each one of us getting sloshed after all those beers. It was in the truest sense - 'Loose Control'.

13 February, 2006

Finally .. !

.. i have a blog of my own. And what's it going to be all about ? Well, mainly my ideas on how technology is influencing our lives. Also some tips and tricks for Linux. And of course, things might be somewhat opinionated. But then isn't it all about the power to express yourself?