08 December, 2009

Playing around with your system's Init scripts

Nowadays with so much focus on usability in Linux, all the administration tasks can be done in GUI. Consequently, when things don't work, people are clueless where to look to resolve the error. Hence it's pretty much important to know the innards of system. I had a couple of tasks like disabling a couple of services & changing the cpu frequency governor. I decided to find to the most low level way of doing the same. Well, here it goes. And yes, these all all from a latest Fedora distribution perspective(I se F12).

Changing the CPU Frequency Governor in Fedora:
Assuming that you usually run in init level5, edit the file /etc/rc.d/rc5.d/S06cpuspeed and change the line default_governor=ondemand to default_governor=performance. Save and quit.
When you reboot next time, you'll notice that the CPU is running at full speed from the start.

En/Disabling a service in Fedora:
Whatever you accomplish from System->Administration->Services can also be accomplished by just removing a link from a particular file. For e.g. if you want to disable the Smolt service, you just need to remove the link /etc/rc5.d/S90Smolt by typing "unlink S90smolt". Once you reboot, you'll observe that the Smolt service is disabled.

NOTE: There are other saner ways of doing these from the command line.

05 September, 2009

Auto login without password on Fedora 11

In case you want to automate your user login in Fedora, just follow these simple instructions.
Add the following text to /etc/gdm/custom.conf(replace 'indro' with your user)


And in case you also have a Wi-Fi network connection, just execute the following additional commands.

#rm /home/indro/.gnome2/keyrings/login.keyring

30 July, 2009

Installing Fedora 11 on Dell Inspirion Mini 10

Last week i got my hands on a friends' Dell Inspirion Mini 10 and the chance to install Fedora 11 on it. The Dell Mini's a really a nice piece of hardware with truly small dimensions and big battery life.

Dimesions - Just amazed to see what can be packed in such a small box these days). Weighing under 1Kg.
Screen - Though it's a very small screen compared to what we're used to, it's very decent.
Battery Life - 7-8hrs!!
Keypad - Very nice and comfortable for a device of this size.
Performance - o complaints for the portability it provides.
Fedora 11 works beautifully with the slightest effort :))

Touchpad - The Touchpad kept behaving weirdly(Was it the drivers..hmmm..) and i had a tough time using it.

Now coming to the Fedora 11 installation experience.

1. Download the Live CD iso using a torrent from here.

Prepare a bootable USB by ext2 formatting the USB stick, making the partition Bootable and then installing the iso to the USB as follows:
#yum install livecd-tools
#livecd-iso-to-disk Fedora-11-i686-Live.iso /dev/sdb1
(Assuming sdb1 is the bootable USB partition)

Boot using the USB and DoubleClick on the Install to HardDisk Icon.

Partitioning and Installing - Fedora 11 uses EXT4 as the default FS and expects an EXT4 rootfs. But, the version of GRUB supplied by Fedora does not support EXT4. So, we need a separate EXT3 /boot partition of around 20MB. The Installer crashed many a times and we observed that the installer is unable to format a swap partition into any other FS format. We had to boot using the USB and change the partition table using fdisk, then then use mkfs.ext3 to partition it. This left with the impression that Fedora needs to work on the LiveCD installer, at least providing less cryptic messages when it comes to getting the partitioning right. I wonder if a newbie could figure her way out of the cryptic error messages and weird behaviour of the installer.
Apart from that, the installation was a breeze and got over in 5 minutes flat.

Configuring FEDORA11 on the Mini 10

Enable the rpm fusion repos as follows:
#rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-*

The first thing that needs resolution is the inordinately large font that makes usability Zero.
GoTo System->Preferences->Apprearance->Fonts->Details and change the Dots Per Inch to 80. Use Alt-C to close the window. This makes the system much more usable.

Touchpad: Behaves weirdly and is a tad too sensitive. GoTo System->Preferences->Mouse and reduce the sensitivity by playing around a bit. Also enable the 'MouseClick with TouchPad' and Vertical Scroll features.

Wireless: Doesn't work by default as the Broadcom drivers are non free.
#yum install kmod-wl
And wireless works!

Audio & Video: Just install the normal codec packs and mplayer.
yum install ffmpeg ffmpeg-libs gstreamer-ffmpeg libmatroska xvidcore
#yum install mplayer smplayer

Increasing the Screen Real Estate: By default it's difficult to browse. In Firefox, remove the Bookmarks Toolbar. Also set the Top & Bottom Panels of your Desktop to AutoHide giving you a very comfortable viewing.

Stop unnecessary services from System->Administration->Services.
Also remove programs like imsettings-start, Login Sound, Print Queue Applet, Remote Desktop etc. by going to System->Preferences->StartupApps and reduce the number of programs that start at boot up.

All in all this gives you a pretty fast booting and responsive system running your favourite Fedora 11 :)

24 July, 2009

Non vegetarianism and ethics - an antithetic view

Now this piece might just manage to raise some eyebrows. So, let me clear the air at the onset itself - I'm a Vegetarian. This article is just a free flow of thoughts where I've tried to think against the current ...

It all started at lunch today, when we had a spirited discussion on the 'Non Vegetarian Way of Life'. The common view point is that eating Non Veg food and killing of animals for the same is unethical. These days all over the world celebrities are calling on people to eat & think Green. The vegetarians usually take a morally upright position in this regard and feel that their way of life has to be right. Isn't it obvious? Well, apparently to many it isn't. And that is what stoked the debate.
The Veggies basically had three things to say:
1. It's unethical to kill animals and eat them.
2. Eating flesh magnifies your carnal instincts and so is again bad (but isn't that natural Viagra!)
3. If man wants to attain a higher state of self consciousness, one of the pre-requisites is that you gotta be a Veggie. As a corollary, being a Veggie is right.

I've tried to come up with some interesting counter thoughts to all the three above.

Rebuttal One - The ethics of killing and eating - Strip man of all the socio-cultural influences and what do you see? An animal who's probably somewhere near the top of the food chain. The earliest fossils of Homo Sapiens found in Africa date to around 200000 years ago. The earliest evidence of agriculture found is about 10000 years ago. Agriculture started in America only around 5200BC. Then how did man survive for the thousands of years before agriculture was practised? The obvious answer is Hunting. Even the earliest cave paintings show man hunting animals(not growing tomatoes and potatoes). The simple point is that stripped of every other influence, man is an animal who needs to hunt for survival, hunt for protection. So what the Non Veggies exhibit is just the primal instincts, the natural instincts. There is no question of ethical or non ethical. The ethics have not been made in consultation with all the Animal & Plant Kingdom. Ethics are man made and in some ways show the high handedness of our species.

Here's some more food for thought for the veggies:
(a) Agriculture uses pesticides to kill millions of insects.
(b) The forest habitat of millions of animals is lost due to the conversion of forests to agricultural lands.
(c) Where does Honey come from?
(d) The pest control that people do at their homes isn't exactly vegetarian.

So even if not directly killing the animals, people tend to kill and maim uncountable creatures during their day to day life. The Veggies therefore can't exactly take a morally high ground. Life's complex..far too complex and our lives are all entwined in unfathomable ways.

Promoting vegetarianism is in some ways against the natural way of life. If a Lion is hungry it will hunt and eat. So why should it be not true the other way round? What about people living in extreme climes like the Tundra/Taiga regions or the arid deserts? The natural way of life there is hunting.

Killing for meat was always acceptable in the wild. In this game called Life, for a very long time killing was equivalent to survival. What is wrong is the rearing of animals just for the purpose of killing and eating them(the term used for animals such bred is Livestock). That's not natural because that is altering the food chain, altering the natural way of how things should be. Slaughter houses should be banned but maybe not hunting with bows and arrows only. A rather nice thing to do would be to ban guns. Guns gives the hunter an unfair advantage over the hunted.

Rebuttal Two - Flesh eating and carnal instincts - The main argument forwarded here was that flesh eating accentuates carnal desires. Now who can for sure tell that what's the purpose of life? Oops!! Looks like nobody's found an answer to that question yet. But except man, all other species seem to have a simple purpose - survive and pro-create. So, why does man to be any different? However depressing it might sound, but i feel that man has neither found nor will ever find the Purpose of Life. Such questions are just to difficult to answer in the vastness of this Universe. So if the Veggies think that they know the purpose of Life and are working towards it by curbing their natural instincts, well, all i can say is "God Speed" them towards that ultima thule of theirs.

Health may be a reason to go veggie, but curbing of carnal instincts!! That's again like altering the natural course of things. That's again stupid.

Rebuttal Three - Vegetarianism helps to attain a Higher State of Consciousness(get rid of the Taamsic feelings) - A very simple question - What's the Higher State of Consciousness and who's to decide that? If man alone decides that, then by corollary he becomes the imposer and then it doesn't remain the "The Higher State of Consciousness". Shouldn't such things be decided in consonance with all the beings, with agreement with all the Animal & Plant Kingdoms? So maybe rather than try to attain Higher Consciousness, man should first try and find ways of communicating with the beings of the Animal & Plant Kingdoms. That definitely sounds like "Higher State of Consciousness".

Then why am i a Veggie?
Rearing of Livestock just for getting their meat is unethical. Such rearing of Livestock in appalling conditions for meat production should be stopped. Humans have become masters of the planet. They've forgotten to co-habit and co-exist. The balance that existed in the nature between the Hunter & the Hunted is now gone.That's why we gotta stop eating meat - to attain equilibrium.
The UN Food and Agriculture Organization (FAO) has estimated that direct emissions from meat production account for about 18% of the world's total greenhouse gas emissions. That's another thing you should keep in mind when you order your next meal.

Bottomline: Killing for meat was, is and will be a way of life and survival. But the beautiful natural balance between the Hunted & the Hunter should not be tinkered with.

There's more than the 2 basic diet styles of Vegetarian & Non Vegetarian.
Vegan - diet and lifestyle that seeks to exclude the use of animals for food, clothing, or any other purpose.
Lacto-vegetarianism - diet that includes dairy products but excludes eggs.
Ovo-vegetarianism - diet that includes eggs but not dairy.
Lacto-ovo-vegetarianism - diet that includes both eggs and dairy products.
Semi-vegetarianism - consists of a diet largely of vegetarian foods, but may include fish and sometimes poultry, as well as dairy products and eggs.
Pescetarianism - diet that includes seafood and excludes mammals and birds.

23 July, 2009

Stop mail message from /var/spool/mail

If you're tired of the message "You have mail in /var/spool/mail/root" and it's eating up precious bytes on your disk, you can stop them like this:
On Fedora Linux:
Edit the file /etc/crontab and change the line MAILTO=root to MAILTO=""

That's it!!

20 July, 2009

Stupid, stupider and stupidest

With every passing day, my belief in FOSS is just strengthened. Just to give you an example of how bad proprietary licensing can be, consider this. One of my friends asked me for a Linux install. While installing we discussed about virtualisation and he asked if i can demo it to him. I said "Sure buddy!". And made a VMware setup on his PC to demonstrate the concept of virtualisation. Every thing went well...almost. Just before the login screen, Windows XP spewed out a message saying that i need to re-activate my copy of XP. Amused, i asked my friend if his copy of Windows XP was genuine and he replied in affirmative. A bit of googling and to my horror this is what i found - Microsoft believes that running a Virtual m/c counts as two copies of Windows!. Well, what kind of stupid licensing is that. I mean, i didn't perform another installation, so how can this be a second installation. It's the same m/c dude!. To top it up, i also found that going back and booting Windows XP natively again requires an activation. And the icing is that you only have a limited number of activations available(2). Well, so much for what? Prevent piracy? Wake up to reality you guys up there at Redmond. With such a stupid WPA(Windows Product Activation), you'll end up nowhere.
So, i just suggested my friend to shun using Windows and enter the brave new world of FOSS.

28 June, 2009

Fedora 11 on HP Pavillion tx1000 - works magically :)

Well, one more edition of Fedora and i had lots to look forward to. With every Fedora release things have been better & smoother. So i was eager to see how much better thing have gotten better. I still remember the first Fedora install on my HP Pavilliion tx1000, a Fedora Core 7 install. Installation itself was a pain, with the install DVD not even booting normally. Once the bare minimum install was done, i struggled to get the features(audio, wireless, video accel. etc.) up and running. Things slowly got better with the next 3 editions of better. And i hoped that the Fedora 11 experience would be even better. Apart from a couple of minor problems, Fedora 11 has been a great experience altogether.

1. Basic Install: I downloaded a DVD using the jigdo downloader and the install was pain free. Even though Fedora 11 provides the option of EXT4 based partitions, i stuck to EXT3 based ones, partly because of the peculiar requirement that the / partition cannot be EXT4 as GRUB still can't understand EXT4. So, if you want a EXT4 based root partition, the solution is to have a separate /boot partition of approx. 100MB. But i stuck to the good old EXT3 itself.
Once Fedora 11 booted, i started checking each feature.

2. Audio: Well, Pulse Audio just works for me. But i did notice some glitches in the audio when switching b/w applications.

3. Display: Was fine, but again their was some latency when switching windows. I decided to install the NVIDIA proprietary driver module. For this i used an excellent application that does all the hard work for me. You can download this application called AUTOTEN from here. Just select the NVIDIA drivers checkbox and it's done. Voila !! The display can not get any more snappier. This gives you all the muscle power you need for the jazzy Desktop effects. Just go ahead and install stuff like compiz now incase you want some bling.

4. Wireless: Well just use AUTOTEN again. It just works. And the Network Manager does a great job at managing your n/w connections.

5. Touchpad: That's been the only piece of hardware that's given me some problem on Fedora 11. The Vertical Scroll was not working properly and the scrolling was area was somewhat displaced to the extreme right of the Touchpad. I fixed the problem as follows:
(a) Generate your Xorg.conf with the following commands.

#yum install system-config-display
#system-config-display --reconfig

Now you have the xorg.conf in /etc/X11.
(b) Edit the xorg.conf sections

In section "ServerLayout" add the follwoing line
InputDevice "Synaptics" "CorePointer"

And make an altogether new entry for the touchpad
Section "InputDevice"
Identifier "Synaptics"
Driver "synaptics"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto-dev"
Option "Emulate3Buttons" "yes"
Option "RightEdge" "5000"
Option "SHMConfig" "true"

The "RightEdge" param is the fix for the Touchpad problem, defining the boundary of the Right Edge.

6. Codecs: Installed all the codecs(both audio and video) by following instructions from here.

7. Suspend-Resume: JUST WORKS !!! :) :) ..Yes, i can't stop smiling as this feature has never worked for me prior to Fedora 11. I haven't tried hibernation though, because i don't have a swap partition.

With fedora 11 other problems like the cursor freeze have also vanished for me.

So, all in all - Fedora 11 Rocks !!

TX 1000 has a 64 bit AMDTurion processor. So, i upgraded to the Fedora 64 bit edition. Well, it's just as good as the 32 bit edition. The installation issues were the same trivial ones as that of 32 bit. So, sorted them out in a jiffy. The only difference i noticed was the battery life. The battery life for the 64 bit Fedora isn't as good as the 32 bit's. Wondering if it's due to the h/w or s/w...