Thursday, September 18, 2008

Problems with audio in hardy heron: culprit pulse audio

When i have upgraded to hardy, after that I started to have audio problems. It seems that one application is locking another application from playing. Then I found out that its a problem with flash enabled sites such as youtube. When they play, they prevent other applications such as VLC from playing. So I installed libflashsupport.
#sudo apt-get install libflashsupport

which solved the problem. But then again, when I am listen to youtube, I couldnt start a voice chat in skype. Oh GOD! it turned out to be pulseaudio, the audio server they are using with hardy instead of alsa is the main problem. It is not robust yet and many programs are not comfortable with it. To get rid of all the problems, you can return to alsa and remove pulseaudio. How to remove is told in this wiki.

Monday, September 15, 2008

Firefox in ubuntu is very slow

I was seriously doubting those who were the fans of firefox because whenever I logged in to Ubuntu and used firefox, my net connection was so slow. But with IE it was lightning fast. So I searched a bit and found the following solution which somewhat speeded it up a little bit.
  1. Open a new tab by typing Ctrl-t
    (That’s the Ctrl key on your keyboard and the letter t key at the same time)
  2. Enter about:config in the address bar of Firefox
  3. Enter ip into the Filter: text box
  4. Look for the network.dns.disableIPv6 entry in the table below the Filter: text box
  5. Double click the network.dns.disableIPv6 entry
  6. Restart Firefox
ref: http://techxplorer.com/2007/02/22/slow-browsing-using-firefox-on-ubuntu/

Saturday, September 13, 2008

Sony vaio CR11s webcam not working on ubuntu hardy

My web cam was not working in skype and I found this little solution which worked very well. The essential thing is the module r5u870 which makes the video device to work. We will first bring the latest module from the svn development trunk directly and then install it. Thats all.

  1. Remove any r5u870 or the ry5u870 modules you may already have. (command:
    #modprobe -r r5u870
    )
  2. Install svn if you dont have it installed already (it should be already installed)
  3. Issue the folliowing commands to download, make and install the new module into your karnel.
    svn co http://svn.mediati.org/svn/r5u870/trunk ~/r5u870
    cd ~/r5u870
    sudo make
    sudo make install
    modprobe r5u870
Thats it!! Your webcam should start working now. You can check it out with skype->option->video call or with ekiga. Have fun!!!

ref: http://ubuntuforums.org/showthread.php?t=821343

Suspend / hibernate problem with hardy heron in Sony Vaio VGN CR11s

I think most of us have the problem of suspending the computer with gusty/hardy. I have read so many threads and nobody seems to have an answer to it. Everybody is boasting like "yeah! I know I can do it, but haven't take a look at it yet." funny huh? Why dont you take a look when u know u can do it!!! And some other threads are scary and tells that we really need to recompile kernel and so some other scary stuff. And it was then when I stumbled into a nice little thread where a guy said to issue the command
#sudo rmmod uvcvideo
before suspending the laptop. I did it, and with some doubt slowly close the lid of my vaio. And, magic :) it worked. It went to suspend mode and wake back again :)
ref: http://ubuntuforums.org/showthread.php?t=712331
For other issues with the sony vaio and hardy please take a look at the following thread...
(i lost the address, I will add it as soon as i find it again)

Thursday, September 11, 2008

Ubuntu: adding more space to root partition

I had given a mare 2.5 gigs of space to my gusty when I installed it and over the time it proved to be pretty miser :) So, I decided to add more space to it. I went to windows vista right click on my computer->properties->manage->disk to get disk management snapshot. From there I shrank my D: drive 4 gigs. Then comes the question of how to add this 4 gigs to my ubuntu root drive. If we boot to ubuntu then we cannot do any partition task as the root drive is mounted. So, we need a live CD. Every ubuntu CD is live, so if u got one then just boot from it and it will start a live session. From there, start gParted (the partitioning tool of ubuntu system->administration->gparted) and if the unallocated space is beside the ubuntu root partition you can just resize the root partition and grow it to include the unallocated storage. But here I faced another problem. My D: drive was a primary partition and so the unallocated space resulted from the shrinking of D: drive was just after that. But my linux installation is insize an extended partition. And, sorrowfully, I can see from gparted that the extended partition is locked and I cannot resize it due to the fact that the swap partition which is in extended partition is in use and locked. To recover, I right click on swap partition and unmount (unswap) it, so my extended partition is no longer locked. Then I resized the extended partition to include the unallocated space just preceeding it, and then resize the root partition of ubuntu to include the new unallocated space that I included inside the extended partition. And that was it!! Just apply the changes, and you are done :)

Friday, July 18, 2008

IPv6 Workshop-DNS

In the top of DNS tree there are 13 root servers. Why 13? Because, UDP packets, which is used for DNS, have a header size that can only accomodate 13 entries.
Root servers are called using A, B, C.........M. And some roots are also replicated.

Bangladesh has a replica of F-root.
Underneath root there are top level domains.
Open recursive name servers finds answers for any query coming from anyone. But, the case should be, it should only find answers for his clients. Due to this open recursiveness, there are many DDoS attacks. Reverse DNS is used for security purposes. Many secured servers will not comply to your request if you do not resolve to a reverse DNS query.

In IPv4 for mapping we use 'A' records in zone files, such as
www. A 10.23.2.1
mail. A 10.23.3.1
In IPv6 we use 'quad A' records, such as
www. AAAA 2001:AA::1
A records and quad A records can be mixed in the same zone file.
If zone files have wrong entries about name servers, it is called lame delegation.

For reverse zone records, there is a top level domain named 'arpa', and under that 'in-addr' for inverse address. And then, underneath that we have /8, /16, /24 and then /32 quads in hierarchical order. So while reading we need to read from the bottom, such as, 2.23.10.in-addr.arpa
The catch is, the DNS system is arranged at the classful boundary, but if we have a CIDR addressign like /21 then how can we resolve that? Then we need to go to the nearest classful boundary that we own. For a /21 address, we need to create reverse zone files for all the block of /24 that we own, i.e., all the 8 /24 blocks that are in our /21 domain. And this kind of records are called pointer records or 'ptr' because they point to actual names. So, at the beginning of the reverse zone file, we put the origin of our site which includes everything upto the network part. For example: origin 2.23.10.in-addr.arpa, and then we start putting the seperate machine addresses in different lines. And the lines contain only the machine addresses. For example:
1 PTR www.sumanta.com
2 PTR mail.sumanta.com
Remember, if we dont put any dot after the digits in the left column, DNS assumes that it is not a fully qualified domain name and it appends the origin after it. But if we put dot after it, then the DNS assumes it as a FQDN and doesn't put the origin after it.

Glue records are the records in my name server where I put the name server entries of my own subdomains. For example, if I am sumanta.com and my customer is computing.sumanta.com, then I should have a record in my zone file pointing to the ns server of computing.sumanta.com

Reverse for CIDR addresses:
For CIDR address such as 202.159.0/26 where you cannot keep zone files for any classful boundaries which is lower than the actual classless boundary we use a different trick. They use something like a range. In DNS conf file, the ns server is defined as:
0-63 NS ns.computing.sumanta.com
and in reverse zone files we have records like

$origin 0-63.0.159.202.in-addr.arpa
1 PTR www.computing.sumanta.com

Now, as we didn't put any dot after the left column digit, so the DNS engine will derive the address as 1.0-63.0.159.202.in-addr.arpa, but that is not what we want, we dont want the 0-63 part in the address. That's why we use another trick called CNAME. CNAME is used for synonyms. If we put something like
1.0-63 CNAME 1
then the erroneous 1.0-63 part will be replaced by only 1, which is correct.

IPv6
For IPv6 the hierarchy is root->arpa->ip6->ip6 address divided at every hex boundary
So, at the reverse zone file, we have to write something like 1.0.0.0.0.0E.F.0.0.A.2.2.so on.ip6.arpa PTR www.sumanta.com
But fortunately, we can use the $origin and write all the common part only once and then just write the last part at the PTR records.

Use "DIG" for checking the configuration of the DNS servers.

Saturday, May 3, 2008

Setting tab stops for equation writing in scientific papers

While writing equations giving equation number at the right side of the column is often a problem. Also while writing the table of content, its a problem to place the page number in the right side. Often we start pressing arbitrary number of tabs and spaces to make it happen or insert table or some other clumsy things. There is a better way in MS word to do this. It is called tab stop. Setting a center tab stop you can instruct the word process or stop at the center each time you press a tab from the beginning of the line. On the other hand, if you set a right tab stop also, then you can press another tab to go to the right end of the line. For doing this, do the following:
  1. Go to the line you want to format
  2. In MS word 2007 press the little button at the right botton corner of the "paragraph" ribbon. There will be a new window in which a button named "Tab.." will be in the botton left corner. Press that
  3. Tab window appears. Now you have to create two tabs except for the default one. In the "tab stop position" text field write in centimeters the (total length of your line) / 2. To know the total length of your horizontal line check the horizontal ruler.
  4. Then in the "alignment" section select the center radio button and press "set".
  5. Follow the similar steps for the right tab stop, but in this case write the value of extreme right end of your horizontal rular in the "tab stop position" text field and selct the right radio button and press set.
  6. So you are ready now. Press OK and go out of the window. Just press tab and you can see your text are moving very elegently.

Good luck!!