Friday, 11 November 2011

New Blogger ate my blog post

I had written a blog about Ubuntu's decline and posted it about 8 hours ago. I wanted to edit it to put some lines in unordered list format. I selected the lines and clicked on the bullet button and it took an additional line under the bullet format. So I pressed Ctrl+Z to undo it. However, to my surprise, the whole blog post was deleted. The contents are gone and not recoverable any more. I also checked Google cache; but it was not there obviously as it was only some hours old.

Speeding up KDM

For some time, I have been noticing that KDE Display Manager (KDM) slows down after every version bump. I was of the idea that this was because KDE was becoming bloated. However, CPU usage of KDE had started declining after version 4.4. So, I was sure that KDE was actually not getting hung up in the background any more. However, till 4.7 the KDM load time kept increasing. As a matter of fact, after the recent update, KDM became so slow that I had to restart my system twice before actually getting to KDM. In fact, during the first two restarts, I was thinking that my installation was broken after the update.


I sometimes browse through the bugzilla to check over recent bugs to find if any of them are related to me. After the update, I decided to look up bugzilla to check if I am encountering a common problem. And, Bingo! The very first bug was about KDM slowing down. There was a suggestion about updating font cache to avoid slow startup of KDM. It can be done using the following command:


fc-cache -fv


I tried it and the next time KDM was loaded very fast indeed. The bug was closed by the Arch linux maintainer with the following comment: "Some font package (maybe unofficial) doesn't run fc-cache after its installation or its removal." However, I think a deeper investigation should be made before closing the bug. I have been a number of instances in Arch linux bugzilla when the bug is closed without sufficient investigation. Arch developers pass the buck to upstream developers very fast.

Sunday, 30 October 2011

Funny Windows

I am using Windows 7 Service Pack 1. Windows might have got a bit more secure and flashy than Windows XP; but it continues to be funny. Today morning only, I encountered the following queer incidents.

1. In the (My)Computer window, I wanted to see Properties for each drive. So, I directly right clicked on them. However, each time it took me to System Properties. To get to Properties of a drive, I had to first select the drive and then right click on it again and select Properties.

2. While cleaning up my C: it showed 730mb will be cleared. Before cleaning, my C: had 6.77gb free and after cleaning it had 8.33gb free. Strange calculation indeed.

3. Last night, I had just put the lid of my system down and slept. According to my Settings, the system should have gone to Sleep mode too and most likely it did. In the morning, I was unable to connect to my wireless network. After banging my head for being forced to use such a system that does not offer any clue as to what the error was, I decided to try a restart. During restart, I found some disk corruption was causing the trouble. [Using Linux on the same machine for years, never gave me a disk corruption.] Also interestingly after recovering from corruption, I found that my wireless card was set to configure to IP address 192.168.190.1 with subnet mask 255.255.255.0 though I had set it to obtain the IP address automatically.

Sunday, 18 September 2011

Using Emacs for development

When I started working with linux, I had the choice of the following text editors:
  • KEdit
  • Vim
  • Emacs

I decided to try all of them. After initial try, I was certain I would not use vi. It just did not suit my tastes. KEdit turned out to be limited in functionality. So, Emacs became my editor of choice. Initially, I was using it for trivial tasks only. Gradually as I knew more about it, I started using it more.

Compiling and debugging in emacs was fine. However, I was missing code navigation features which really come in handy during code reading phases. Searching through the world wide web, I found this blog explaining the use of etags with emacs for code navigation. I gave it a shot and it surely is fast. While working with python, I found emacs' support for python is not that good; but I am sure it will improve soon.

Arch linux: my perspective

When I finally found an article covering Arch linux, I thought its time I write about the distribution I have been using for over two years. I switched to it from openSUSE. I have been a KDE user all along; seen transitions from stable 3.x to current 4.7.

I am a minimalist and Arch fits right in. It sure is "bleeding edge". Today only Chromium 14 was released and it was available in Arch repositories. In contrast in Gentoo, another rolling release distribution, the policy is they stabilize a package after a month without any bug reports about it. Due to this policy, Gentoo is still at Firefox 3.6.x while Arch provides me latest Firefox. Even when Firefox released an update after the DigiNotar issue, Arch also pushed the update to its repositories. With Gentoo's policy, it certainly is more stable. As Arch provides, bleeding edge software, you need to understand how to act/react when there are inconsistencies. Only yesterday, hit three bugs: filed one in KDE directly, another in Arch and another in Enlightenment. Another time, I was getting a bug related to valgrind because I had an updated version of it as Arch had pushed the update much before any other distribution. I should probably also mention that Arch released a patched version the following day.

Arch is really simple in the sense at the system level. I was able to create init scripts for Arch far more easily than on Gentoo for the same package. Arch however is not as configurable as Gentoo is. No distribution can match or even come close to Gentoo in this regard. It uses a unique system for this called USE flags. With Arch I can not have a custom KDE; but with Gentoo I have a large number of options as to what I want to have and what not. This flexibility of configuration in Gentoo comes at a price: every package is compiled on your system.

I have provided comparisions with Gentoo because it is the only distribution that has comparable features. Both of these distributions are in a way close to me. On my home desktop, I have Gentoo installed; but on my laptop where I do most of my development tasks, I use Arch linux and I do not see a distribution switch in near future.

For me, Arch surely is a base platform to do what I want to do. I have so to say three distributions in one: a distribution that provides nice command line environment, another that provides nice and stable KDE. I have even stopped akonadi and nepomuk search from starting up at all as they started mysql instances and I was not using any of them. The third one provides latest Enlightenment desktop. I compile it instead of using the packages in the repositories so that I am up to date and also to get debug symbols compiled in.

There have been some issues with Arch from time to time though. For example, the Ricoh card reader on my laptop works fine for some kernel versions; but does not work with others. Arch surely is not for the beginners. However, for advanced users, it provides a lean system which can be tweaked to taste.

Monday, 12 September 2011

Recovering Gentoo linux after changing hard disk channel

On my system I have two hard drives a 40 gb old one [reminiscent of the times when that much was enough] and a new one of 1tb. Initially both of them where on channel 2: the new one was the master disk while the old one was the slave disk. When I installed Gentoo, I tried

fdisk -l

and found the new one to be /dev/sda while the old one was /dev/sdb. So while installing grub, I assumed the following mapping:
hd0 --> sda --> 1tb hdd
hd1 --> sdb --> 40gb hdd

Grub was installed successfully and dual boot was working fine. [For those readers who are curious about getting a dual boot system, the best place is to look at the handbook.] However, when I got a new DVD writer, the old hard disk was connected at channel 0 as slave and the new one was connected at channel 2 as master. My BIOS was set to boot from the new one and Windows booted fine but I could not boot into Gentoo. So, I decided to fix it and chrooted into my Gentoo installation from the minimal install iso that I had put on to a usb stick using unetbootin. [Recently there have been questions about the performance of unetbootin. I would just like to add that when I tried unetbootin from Windows it failed me thrice with different distributions. However, when I tried it from linux, it worked just fine.]

From within the chrooted environment, I ran

fdisk -l

and found the old hard disk was now sda and the new one was sdb. So, I assumed the following mapping while reinstalling grub:
hd0 --> sda --> 40gb hdd
hd1 --> sdb --> 1tb hdd

However, when I rebooted, grub showed error 17. A quick look at Grub error collection shows that I had somehow got root(hdX, Y) wrong. While talking about the issue on #gentoo, I found that hd0 is actually the drive the BIOS is set to boot from. So, my assumed mapping was incorrect and it turned out that hd0 was being mapped to 11tb hard drive. So, I went into the BIOS and changed it so that the correct mapping was followed.

P.S. To know more about grub read this article.

Tuesday, 6 September 2011

Office not working in Archlinux



After dropping of OpenOffice.org, Archlinux switched to LibreOffice from the Document foundation. As this was pushed through a regular update, I went on with it. However, after some time when I tried opening Office files, I was having trouble opening them at all.
I used to get stuck at this filter selection every time I opened a file. When I opened up LibreOffice, the various files options were grayed out.



I thought of checking the wiki for the procedure of installation. I reinstalled it using the following command:

pacman -S libreoffice-common libreoffice-{base,
calc,draw,impress,math,writer,kde4}


pacman -S libreoffice-extension-{pdfimport,presentation-minimizer,presenter-screen,report-builder,wiki-publisher,ct2n,hunart,numbertext,oooblogger,typo,watch-window,diagram}


After that, I was able to get things working again. However, interestingly, each time I had upgraded my system after the switch to LibreOffice, using

pacman -Syu

I had seen these packages were installed. Now there is only one issue, tooltips are just black rectangles.


Friday, 2 September 2011

Firefox responds to fake certificate issue

Recently, we have seen false SSL/TLS certificate issued by DigiNotar causing trouble to a lot of people. The Tor project's blog describes it at length. Details of such vulnerabilities are detailed here. Firefox has been fast in responding to this. They have released an update which basically prevents its users from becoming a victim.


Wednesday, 24 August 2011

Broadcom wireless on Arch linux

My wireless card is Broadcom Corporation BCM4311 802.11b/g. When Broadcom had not released open source drivers, I was using b43 drivers according to Archlinux wiki. These drivers worked fine till kernel version 2.6.37. From the next kernel version, it started trouble me as described in this bug. I switched to broadcom-wl and things worked fine once again. However, starting from kernel 3.0.x, each time I update my kernel, I have to recompile my drivers using

makepkg -f

and reinstall them using

pacman -U ./<package name>.xz

Now I can successfully connect to WPA networks; but not to WEP networks.