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