Sunday, June 25, 2006

Japanese Input in linux

I was trying to setup Japanese input in linux. This was not an easy task, however I found it easier than windows. Here's what I did (on ubuntu):

1) sudo apt-get install im anthy scim-gtk2-immodule scim-uim scim-qtimm
2) Create a file called 75custom-write_japanese in /etc/X11/Xsession.d/
Paste the following lines in it:
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
export QT_IM_MODULE="scim"

3) sudo dpkg-reconfigure locales
(Over here, if you have the option of selecting anything, select en_US.UTF-8. But I was not given the option of selecting)

4) Add scim -d to your startup. For KDE, make a file ~/.kde/Autostart/startscim
Paste the following lines:
scim -d

5) Run: chmod 744 ~/.kde/Autostart/startscim

6) Restart the X server.

Now you will see a nice little gtk-applet sitting in the systray. You can click on it, configure it, and use it to select Japanese or English. It takes a while to get used to it. It will also popup an annoying panel of its own when you select Japanese input. You can drag this to a place more convenient.

All in all, it works well, and I'm happy with it.

Information taken from this page

Saturday, June 24, 2006

Dealing with "The Most Annoying Web Page"

Many of you may have come across "the most annoying web page". It's a sick page that keeps giving you popups. Now if you don't want to keep clicking on those retarded popups (javascript alerts). Then here's what you do: (apart from killing your browser).

1) Open a new browser window
2) Disable Javascript (In firefox you go to Edit>Preferences>Content)
3) Click on the popup one last time, and it's all over.
4) Enable Javascript again.

Click here if you want to check it out. (Its way too annoying)

Friday, June 23, 2006

Firestarter and BORGChat

I use a LAN chat client called BORGChat. Its a very good piece of work. Although its a windows program, I run it in linux with WINE.

Getting BorgChat to work through firestarter was a bit of a problem, but I managed to figure it out. First, I found out which ports borgchat uses. This can be done in two ways:
1) Open BorgChat, go to "Options > Connections" and it will show you the post
2) Disable the firewall, run BorgChat. now open a terminal, and type sudo lsof -Pni . Now look for Borgchat and Wine. You will find the ports on which they are listening.

Once you know the ports, you have to open these ports in Firestarter. I allowed only Local users to access, by using (ip-address/subnet-mask) in the "allowed" section.

But borg was still not working. Then, I went to "Options > Connections" in BorgChat again, and selected the method IP multicast instead of UDP broadcast. And then I told my friend on LAN to do the same. Borgchat then started running normally. I can even transfer files.

The obvious drawback of this method is that you'll have to tell all people on the LAN to use IP Multicast. I have only one friend on LAN, whom I chat with, so it was not a problem for me.

If, by chance, Borg is still not working for you, then you may need to follow the steps in my previous post (Firestarter and Samba).

LiNuX RuLZ!!

Thursday, June 22, 2006

Firestarter and Samba

In my previous post, I have described how I set up Firestarter. However, there were a few issues with Samba. I was able to browse my shares by entering the IP address. But, today when I tried to "browse" my network, I couldn't see anyone. Konqueror gave me an error saying. "Unable to browse local network. This may be caused by a firewall" (something like that).

Then I stumbled across this thread on ubuntuforums. It gave a very good picture of what was going on, and also a solution to the problem. Now, as you know, I'm a total n00b when it comes to networking, and I didn't actually understand everything, but I managed to set things right.

First of all, in the "Policy" tab of firestarter, I had opened Samba ports (137-139 445) and I had set "10.10.19." as my allowed source for samba. I figured that the correct format should be IP-address/subnet-mask. So I set it as . Again, I'm not entirely sure of this. See this page for more details.

Next, I installed "winbind." I don't know what exactly winbind is, but it seems that it plays a role in resolving hostnames. Do a web search for more details.

After that, I edited the file /etc/firestarter/inbound/setup .There I added the line:

# Allow response to netbios name broadcasts from the local network.
$IPT -A INBOUND -s $NET -p udp -m state --state NEW -j ACCEPT

Then just restarted firestarter (sudo /etc/init.d/firestarter restart), and I was able to browse my local network in konqueror.

Since I installed winbind, I also added "wins" to the "hosts" line in /etc/nsswitch.conf:
hosts:     files dns mdns wins

This will allow ordinary TCP/IP programs to resolve hostnames with netbios. (Don't know what it means :-P )

Wednesday, June 21, 2006


I installed Firestarter today, after the whole "Mysterious Download" thing, I got a little paranoid. Now I'm quite a n00b when it comes to networks and stuff. But I managed to get Firestarter running just fine :)

First, I apt-getted firestarter. Then I started it. Then I had to go through the configuration wizard. I didn't understand a word of wtf was going on in the wizard, so I just kept the default options, and kept clicking Next.

The Firestarter window has 3 main tabs. Status, Events and Policy. I figured I had to open the ports that I get incoming connections on. So after fiddling around a little, I clicked on "Policy", (Editing > Inbound traffic policy)

Then I clicked on "Add rule", and added FTP (ports 20-21), since I run an FTP server. Next, I added Samba, (ports 137-139 445). Here I didn't choose the default option of "When Source is Anyone". I wanted only LAN clients to be allowed, but for some reason, that option was grayed out. So I selected "IP, Host or network" and entered the IP 10.10.19. Notice I didn't put the last digits.

Next, I added Bittorrent (ports 6881-6889). And then clicked on "Apply Policy" on the top.

Now I tested my FTP and Samba. Both were working fine. (I'll also get my friend to test these from his computer, just to be sure. This post will be edited if I encounter problems).

Bittorrent: Azureus was using port 21351, which was obviously blocked. So I configured azureus to use port 6889. Then it showed the nice "green" status, and I was happy. :)

I also noticed many connections on Bittorrent ports, even after quitting azureus. I asked some people on the azureus IRC chatroom if this was normal. Yes, they said its normal. It probably happens because the tracker(s) have my IP address, and people try connecting. But since azureus is not running, the connections just get rejected, or something like that.

Monday, June 19, 2006

ext2 upgraded to ext3

I was absolutely bored of fsck running every time I have an unclean unmount. It was so fscking boring! This was bacause my linux partitions are ext2, and not ext3.

I realized that ext3 partions are nothing but ext2 partitions with journaling. (ext3 = ext2 + journaling)

So is there any way to upgrade to ext3. Yes, there sure is! I found this page.

Basically, I had to run the command:
tune2fs -j /dev/hda3

/dev/hda3 being my root partition. After running the command, a .journal file will appear in the root directory.

Next, change your /etc/fstab and mount the / partition as ext3, instead of ext2. And then reboot your system.

1) Make sure your kernel supports the ext3 filesystem. Ubuntu Dapper supports is, so no problem.
2) Do this at your own risk. Backup data just incase.
3) Read this page for more detailed information

Mysterious download

The other day, at night, I was doing nothing, just staring at gkrellm. Now, I noticed that some data is being downloaded at a steady 4kBps. At first I just thought it must be a cron job, like apt-get update or something. But I have a 128kbps connection, and whenever something is downloaded, I get a full speed of around 13-14kBps, even during apt-get update

Next, I decided to see whats up, and I ran the command "sudo lsof -Pni" to see all connections. I expected to see an external IP address, but I just saw the usual processes, no external IP was listed, and nothing out of the ordinary was established on the daemons listening on ports. I started to get more suspicious. I started killing daemons that I thought might be causing this: smbd, nmbd, vsftpd, ircd, and some others. But the download didn't stop.

Even though I have a cable connection, my IP address is dynamic. So I simply logged off the internet and then logged in again. The download now stopped, and I had a new IP address.

After this experience, I have decided to install firestarter (which is a firewall). It seems to be very easy to use.

But I wonder what that mysterious download was! And why was it downloading at a lower speed? "ps -A" also showed nothing out of the ordinary and gkrellm showed "1 user".

Strange, isn't it ?

Printer - there and back again

After I upgraded to Dapper, my printer stopped working. /var/log/cups/error_log gave me this error:
E [19/Jun/2006:12:01:40 +0530] cupsdAuthorize: Local authentication certificate not found!

I looked at a lot of threads on ubuntuforums and a lot of results on google. Finally I deleted my printer, and added it again. And now, it works. Just finished printing a test page. Boy, them test pages sure suck up a lot of ink!!

Wednesday, June 14, 2006

Azureus and the disappearing tray icon

I installed Azureus today, using apt-get. There were a few problems with it:
1) The Tray Icon at the bottom is a white blank space
2) There is no X button to close tabs.
3) If there is an improper shutdown, the warning message will not go, as the "Hide" button does not respond.

These problems are verified by other users on ubuntuforums. There are 2 ways of solving this:
1) Use Automatix to install azureus
2) Download the package from and extract and use it mannually.

And remember to remove the apt-getted version first.

Tuesday, June 13, 2006

Google Earth for Linux!

Yes, its finally released for Linux!

It needs a lot of resources though, and some people are having trouble using it. I'll download it tonight.

Special thanks to Ryan Gordon for making this possible :)

Google Earth - Download

Breezy to Dapper in 36 insane steps

Ubuntu released it's latest version 6.06 (Dapper Drake) a couple of weeks ago, and I decided to upgrade. I was using the Breezy Badger release. I had to do some really insane stuff to upgrade. This is primarily because I have a crappy internet connection, and I can download large files only at night (10:00pm to 8:00am). Also, my computer turns off automatically at 7:50am, I have set this as a cron job.

Note: This is not intended to be a guide to upgrade to Dapper. Please refer to the Ubuntu wiki page for information on how to upgrade.

So here's what I did, step by step:

1) I downloaded the dapper CD. (took 2 nights, on my 128kbps connection)

2) I realized that this is the wrong CD, and the "alternate" CD is needed to upgrade from breezy to dapper. The one I downloaded was for a fresh install only.

3) Downloaded the "alternate" CD. (took another 2 nights)

4) Installed the ubuntu-desktop metapackage, had to remove firefox and gaim that I had installed myself, not from the repository. (Used kopete and mozilla in the meantime).

5) CD burning issues cropped in, maybe the DVD lens has dust, or my CDs are bad. :(

6) Mounted the iso directly, using the command "mount -o loop /mnt/ranjan/dapper/whatever-alternate-i386.iso /cdrom"

7) Changed the repository to "dapper" and added the CD to the repository.

8) Tried to run "sudo apt-get dist-upgrade", but it said that another 740MB of packages need to be downloaded. This is a pain in the ass. Will take another 2 nights.

9) I used the option "sudo apt-get --download-only dist-upgade" to download the packages at night, i didn't want the upgrade to take place while I'm asleep.

10) Now I realized that some packages are going to be REMOVED, this incudes KDE, that I need. Can't let this happen, can I?

11) Found help in the ubuntu chatroom, someone told me I need to install the kubuntu-desktop metapackage as well, since I'm using KDE.

12) I must change the repo back to breezy, and I'm afraid I might lose all the data that I downloaded in 2 nights, so I took a backup. "cp /var/cache/apt/archives/*.* /mnt/c/apt-cache"

13) changed back to breezy, and apt-get updated and apt-get cleaned.

14) sudo apt-get install kubuntu-desktop and got this error:

Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
kubuntu-desktop: Depends: akode but it is not going to be installed
E: Broken packages

15) Decided to install the "akode" package manually. "sudo apt-get install akode"

The following packages will be REMOVED:
juk kdeaccessibility kdemultimedia kttsd libakode2 libarts1-akode

I decided to proceed anyway. Then Went to pee and then drank some cold water.

Came back, and process went smoothly.

16) sudo apt-get install kubuntu-desktop.

17) KDM was kind enough to ask me which login manager I want to use, and I selected GDM. This happened while "configuring packages" after apt-get.

18) Changed /etc/apt/sources.list back to dapper.

19) sudo apt-get clean

20) cp /mnt/c/apt-cache/* /var/cache/apt/archives

21) sudo apt-get update

22) had to add cdrom again

23) sudo apt-get dist-upgrade

24) had a look at the packages removed, they are in the "installed" list, so no problem

25) closing all programs and proceeding. 60 MB more need to be downloaded, using --download-only option and going to sleep.

26) Woke up this morning, all downloads were complete. Did sudo apt-get dist-upgrade, and got an infinite loop of errors. Now doing sudo apt-get update to correct the problem. I can only hope it will be solved, as the error seems to be similar to the one when apt-get update fails.

27) Process started (apt-get dist-upgrade) :D .I hope I don't run out of disk space (only 1.4GB free) :-P

28) Dist-upgrade suddenly stopped in the middle, and gave me this error:

Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

29) Anyway, I did "sudo apt-get dist-upgrade" again, but some problem about something depending on libsdl-gfx1.2-4, so installing that mannually

"sudo apt-get install libsdl-gfx1.2-4"

Then it started installing/setting up a whole load of stuff :-S (possibly continuing the dist-upgrade?)

30) That got over after a long time. Then i did "sudo apt-get dist-upgrade" yet again. And again, got the artiwiz-cursor error :(

31) I decided to remove the artwiz-cursor deb file from the cache, maybe it got corrupt somehow.

32) sudo apt-get dist-upgrade again, 8KB need to be downloaded, fine.

Same error again. This is sick, saw the description of this horrid artwiz-cursor. OK, its just a freakin Ascii X mouse cursor font, I got rid of it.

33) Again, sudo apt-get dist-upgrade. And Finally no more artwiz shit.

34) Finally, its over :) Checked if there are any broken packages. No broken packages, now rebooting.

35) X server refused to start, thanks to artwiz being uninstalled. Now I had to boot into windows to use the net to find out what I could do about it. A bug report page told me that installing or reconfiguring "xcursor-themes" package may do the trick. And yes, "dpkg-reconfigure xcursor-themes" solved the problem. And then I could install artwiz-cursors.

During this process, however, whenever I switched to a "blank" terminal (say, CTRL+ALT+F10), the system would freeze. No keyboard response, nothing at all. Had to press the reset button. And had to run fsck every time, and loads of errors were found on /home. I wonder how many files became corrupt in the process :'(

36) Reboot again, and HURRAY, DAPPER IS WORKING!!

Wednesday, June 07, 2006

About google & Linux

Google, I think, has been more kind to linux compared to other companies of the same gernre. When they released google-pack, linux users were quite disappointed, because it was available only for windows. However, they recently ported their software Picasa to linux. It uses WINE and mozilla. Google also made several patches for WINE in the process.

Google-talk is another software thats available only for windows. However, it uses the Jabber Protocol, which means that linux users can use Gaim or Kopete to chat. Later on, they made a web-interface built into GMail. The fact is, my friends who use windows prefer the web-interface over Google-Talk.

Google-Earth is available only for windows, but linux users can go to and have a look at satellite images. Maybe not as good as Google-earth, but heck, it works!

Google even has Special Search options, which includes a section on linux and BSD.

Recently, google started an online-calendar, and they are working on an online Spreadsheet. All you need is a web-browser, which means they'll work on any OS.