Yet Another Blog by Nitesh Mistry

Debian Release Day!
6th February 2011

Happy Debian Release Day!

Rare are the days, when we greet people like this.

Now that Squeeze is stable, time to switch to Wheezy.


Email comments to Nitesh Mistry   Tags: debian, greetings, linux.
Paste in to KDE Pastebin using Pastebinit
11th January 2011

First off, Wish you all a Very Happy New Year (that is the heights of laziness, you think?).

We all love chatting and collaborating on irc and pastebins are very usefull for sharing more than 3-5 lines of text as otherwise most channels consider it as flooding.

Almost all major projects including Debian and Ubuntu amongst others have their own pastebin utility. The latest to launch one was KDE.

There are also pastebin clients to help you send the files to the pastebins right from the CLI without needing you to launch the web browser, open the pastebin website, upload the file / copy-paste the contents in to the text box and then finally grab the url of your paste. One of such pastebin clients is Pastebinit.

Pastebinit is a very simple to use program written in Python. The irssi fans will appreciate the fact that they don't even need to leave the console. Simply give it the location of your file or make it read from stdin and specify the pastebin you want to use. It uploads the content of the file (or whatever was passed on to it) to the specified pastebin and gives you the url of the paste as the output. Now that's cool stuff! Isn't it?

How to get it? The tar ball is here. If you are Debian or Ubuntu user, simply give the following in the terminal:

sudo apt-get update; sudo apt-get install pastebinit

"Whats new? I am already a pastebinit fan!" - you say. Alright, so here is the 'new' part - How to use pastebinit to post to the KDE's newly launched pastebin?

As of now, pastebinit is not configured to post to So what? Just add the following text in a file and save it as

basename =
regexp = ""

user = paste_user
format = paste_lang
content = paste_data
password = paste_password
expire = paste_expire
private = paste_private
api = api_submit
mode = mode
regexp = regexp

private = 0
format = "text"
expire = 86400
api = 1
mode = xml
regexp = "<id>(.*)</id>"

Now save this file[1] in /etc/pastebin.d/ directory (which is automatically created when installing pastebinit).

That is it and you are good to go. Test it - give the following command:
pastebinit -i <location of the file to share> -b
and most probably it will print the url of the paste and return the prompt.

If you want to use the KDE pastebin by default, add the following line to your .bashrc or (as the case may be, .bash_aliases) file:

alias pastebinit='pastebinit -b'

Now you do not need to give the -b argument each time to paste to the KDE's pastebin.

Note - The above patch is already committed upstream. So the next time it is packaged, it will work with KDE pastebin service by default. But with all the doomsday predictions making rounds, why wait till then? :)

1 - Thanks to St├ęphane Graber for pointing out the missing 'regexp' lines.

Email comments to Nitesh Mistry   Tags: geekosophy, greetings, howto, kde, linux, pastebin.
Light Music - Internet Radio with mpg123
31st December 2010

Light music? No, I am not talking about any genre of music but about being light on your system while playing music.

Recently, I started playing (with) internet radio - one of the perks of having a unlimited broadband internet connection. Playing internet radio within the browser means managing one more window which needs to stay open all the while (constantly using around 100 MB of system memory), even if I am not browsing the web. So the other alternative is to give the url to your favourite gui music player to play. I use amarok for managing and playing locally stored music. It has a brilliant user interface to browse my music, manage playlists and all. But any modern graphical audio player also has a big memory foot-print (considering my poor 6 year old box) - grabbing almost 50-70 MB of RAM. And, since while playing internet radio, songs are automatically queued by the station, there is very little for me to tinker around, and the audio player usually stays minimised in the system tray.

Then why waste so much of resources when there is mpg123 to do the task. And it does the task really well. It runs from the terminal and still provides basic functionality (read man mpg123 for details). While it is playing, just check your system monitor; mgp123 rarely uses more than 700 KB of system memory (that is just 1% of what graphical audio players occupy) and it never shows up in the top 10 CPU users. As someone wisely said, "Frugal living is a virtue".

Wow! So how to go about it? Simple, run the following at the terminal:

sudo apt-get update; sudo apt-get install mpg123

To play internet radio with mpg123:

mpg123 <url of the radio station> &

For example, mpg123 & will play the classical guitar channel at internet radio station.

To stop playing the music, just bring the process up giving fg command and interrupt it with ctrl-c or simply kill the process by giving killall mpg123 command.

Cool. Now enjoy the "light" music. ;)

Email comments to Nitesh Mistry   Tags: geekosophy, howto, internet, linux, mpg123, music, radio.
Controlling Information
4th December 2010

This week there were series of news relating to decontrolling/slipping of information.

First, beginning from Sunday, Wikileaks started releasing "sensitive" US Embassy cables to public termed as cablegate.

Second, there was this article by EFF denouncing actions taken on the basis of powers granted under COICA.

Then this announcement from the co-founder of Piratebay about the plans to devise a decentralised, peer-to-peer, DNS system.

Lastly this bit of news regarding wikileaks servers affected by massive DDoS attacks.

And just when I was about to push this post, I came accross this post announcing IDONS (short for Internet Distributed Open Naming System) project, similar to the one announced by p2pdns.

Do these news link up to reveal a constant tussle between the citizens and their own representatives in respect of free flow of information? Wihout expressing my opinion, is/why is it that the governments around the world always want its own electors to remain blind-folded?

Email comments to Nitesh Mistry   Tags: current-affairs, internet.
Redirecting to Other Website
13th November 2010

Yesterday, I gave this blog a website of its own. So now its address is instead of old Creating a new site was very simple. As simple as opening a new email account, rather even more. With just 3 - 4 clicks, this blog had its spanking new website ready to shift in. Then it was just a matter of moving my blog contents to this new website and telling my DNS manager about its new address (follow this space on how did I get a new website and manage DNS). Also, getting a new website is as good as free because my webhost - NFSN - charges me only for the actual storage space and bandwidth used. So it is practically same as just transferring data to a new directory since my website is completely static.

So far so good. And then it hit me! What about the readers who are already following my blog? If they visit my old address, they will get 'Page Not Found' error. All those who have subscribed to my RSS feeds will no longer get the updates. Keeping the same content at both the places is not such an elegant solution. Neither does it do any good to search engine friendliness. So, how do I make the old visitors (who might directly visit my old address) go automatically to the new address?

".htaccess" To the Rescue!
Well, as I found out, there was no need to worry. If your webhost is using Apache webserver, this is just a two minute job. Apache webserver system provides a simple way to redirect a visitor to another website using a redirect directive in a .htaccess file. Oooo, sounds too geeky! Don't worry, it just sounds geeky. Actually you only have to create and save a file. So, create a text file named ".htaccess" and put the following line in that file

RedirectPermanent <old address> <new address>
For example, in my case the line was RedirectPermanent /blog (I did not need to write the old address completely; just the part which needs redirect). Save the file and close it. Now put this file in your public directory of webserver and you are good to go.

If you are even half as geeky as I am, you will definitely want to test this. So in your web-browser, type the old address and whoa, it automatically takes you to the new address! Another nice little thing I liked about this is, all the extra words and characters that are suffixed to the old address are automatically suffixed to the new address as well. Just to give you and example, I have a tag named 'linux' in my blog so to access it, the old address was which after putting this redirect, automatically goes to And this applies to every link in the 'blog' directory.

Neat, isn't it?

Email comments to Nitesh Mistry   Tags: apache, geekosophy, howto, htaccess, redirect, website.
Happy Diwali
5th November 2010


Email comments to Nitesh Mistry   Tags: greetings.
Weekend Trip to Ganpatipule
6th October 2010

This weekend, we (me, my parents and sister's family) decided to travel to Ganpatipule, one of the popular tourist destinations in Maharashtra.

The Journey

Ganpatipule is approximately 400 kms. drive south of Mumbai, off the Mumbai-Goa highway. It is in the Ratnagiri district of Maharashtra and around 30 kms. from Ratnagiri city. The route to Ganpatipule which we took is 8 hours long, so it would have been better if we started really very early in the morning to avoid the traffic around Panvel, and also carry some food and beverages to avoid the halt for breakfast because it was almost evening by the time we reached. If you want to travel faster, greener and cheaper at the expense of some privacy, Ratnagiri is also a railway station on Konkan Railway and almost all trains on the route stop here. Auto-rickshaws from there charge around 300 rupees for a 45 min. ride to Ganpatipule. The roadways had many ghats and the view from there is very picturesque.

If you are fond of Malwani food, there are some good places to have lunch on the highway around Chiplun, which comes about 120 kms. before Ganpatipule. I have marked a couple of restaurants on the route map.

The Destination

One of the main reasons for the popularity of Ganpatipule is that it caters to both type of Indian tourist - one looking for fun and the other looking for pilgrimage. Because this place is about a temple on a beach.

Here are some other pictures of Ganpatipule.

The Temple

As the name suggests, this place hosts a very beautiful temple of Lord Ganesha. Not only does it has beach on one side but also a small hill on the other which gives its visitors a very serene feeling. The structure of the temple is made of red stones which are intricately carved. The idol of Lord Ganesha itself was of red stone and the legend has it that the idol was discovered there and not man-made. Devotees can perform abhishek (a Hindu ritual) here in the morning. But for that, we had to intimate the temple authorities on the previous day, and they gave us a time-slot during which we can come to perform the ritual. When we reached the temple at the appointed time, we (the men) were made to wear Pitambar (kind of dhoti - I couldn't take our pictures in the dress) while the ladies were already asked to come wearing the sarees. To perform the abhishek we were allowed to enter the sanctum of the temple where all the arrangements were made by the temple priests. We offered flowers, and other goodies to the Lord Ganesha while the priests chanted sacred shlokas. At the end we left with Lord's blessing in the form of flowers and Prasaad (sweets and coconut).

There is one very unique thing about this temple. It is the Pradikshina path. Usually all Hindu temples have a small pathway encircling the inner sanctum within the structure which everyone walks clock-wise at the end of visit to the temple. However, at Ganpatipule, the Pradikshina path is a whole one kilometre trek around the hill behind the temple. It was very nicely laid footpath with trees on both the side. And since we visited just after monsoons, it was all lush with greenery. It was almost like a small nature trek. I suggest that anyone visiting Ganpatipule must take the trek. I have posted some of the picutues at the online album.

The Beach

The beach is another reason to visit Ganpatipule. It is only a small stretch of about a kilometre or so, but it is ultra-clean (even as compared to the beaches of Goa). Also the water is almost transparent to the extent that you can see your feet inside the water. However, it is not safe to tread deeper here as they say that there are patches of quicksand. The guards there were quick to call out the ones who tried to be adventurous and go into deep water. We could also see a couple of fishing boats on the horizon. Also, since it is a pilgrimage destination, there were no beach-side shacks serving alcohol and non-vegetarian food. However, there is a long row of small shops and cafes nearby. All in all, a perfect beach to visit with the family.

The Stay and the Food

There are quite a few options for staying in Ganpatipule, and most of them are economical. However, be sure to make reservations at least a week in advance, as most of the good hotels tend to be fully occupied during the extended weekends and festive days. We had planned for the trip just a few days before, and hence couldn't make reservations. So we had to scout for rooms after reaching there which took us almost couple of hours. There is one Shiv Sagar Palace (looks like a palace literally) almost a couple of kilometres before the main market area starts. All the rooms of this hotel are well appointed and have beautiful sea-view. However the staff wasn't so welcoming, and the receptionist didn't even answer our queries promptly. Opposite the palace on the other side of the road is an unnamed hotel which offered basic lodging facilities (read - no TV, no AC - just bed, fan and running water in bathroom) at almost one-third the rates of Shiv Sagar Palace. But the view from each room was more magnificent. It overlooked the entire hill and the beach below. Also there were quite a few hotels in the main market area near the temple which offered almost the same basic lodging. There is also a MTDC resort opposite the temple.

The foodies in us were however disappointed. There were hardly any proper restaurants. Most of them served home-style food and would close down even before 8 in the evening. The only restaurant that we could find was the one inside MTDC resort and we had to wait to find a table. Even the taste of food was just about okay and we ate only to fill ourselves. The Chinese dishes that we ordered tasted more like Punjabi cuisine. At least the breakfast was good, because we like Indian snacks. The beach-side cafes, that I mentioned before, served hot and spicy wadapav, misal, puri-bhaaji, etc. If you like burgers, fries, sandwiches, omelettes and cakes for breakfast, forget it.

The Shopping

The Ratnagiri belt is famous for its kokum and mango products. So we bought dried kokum (used in Indian dishes), kokum sherbet, mango pickles, aam-papad, etc. We also saw quite a few shops selling wooden toys and show-pieces. Some say they are the speciality of the area.

The Conclusion

We had a really good weekend. A must visit if you are interested in either the divine temple or the clean, beautiful beach.

Email comments to Nitesh Mistry   Tags: beach, hinduism, maharashtra, temples, travel.
Computer as an Alarm Clock?
24th September 2010

We all like to wake up listening to good music instead of blaring noise of alarm clock or mobile phones. And, when it comes to sleep, if you are as much like Kumbhakarna as I am, chances are that you hit the snooze/stop button even without opening the eyes and sleep for another hour.

So I was always looking for a solution, where I could set my computer as an alarm clock, and play my favourite song or playlist to wake me up. This way I will have to get out of my bed and come to the desk to stop it, by which time I would have gained my senses. Similar question was also asked by someone in Mumbai Linux Users Group mailing list some time ago (I am not able to locate the exact thread right now).

But there was a two part problem in doing this:
One - I did not want to keep my computer switched on the whole night (you know how hip it is to be 'green' now-a-days); and
Two - How to play the songs without creating the security/privacy issue of making the computer log in to my user-space automatically.

But for linux users, no problem is too big to be solved.

First problem got solved when I came accross this great article by Mechatotoro. Until I read his post I was completely ignorant of a nifty feature residing in my computer's BIOS. To enter the BIOS settings, press DEL key (or depending on your computer make, F2 or F12 key) immediately after pressing the power button of the computer. On this white-and-blue screen, navigate to the Power Management Setup section. Now go to Resume by Alarm option and select Enabled. Set the day and time field immediately below that. Press F10 key and when prompted to save the settings press Y and Enter.

That is it and now the computer will automatically get powered on at the set day and time. Ofcourse I will need to keep the main power switch on, as I am using a desktop computer. No need to worry about this if you are using a laptop.

Now the second problem. One reason why I did not want to use Mechatotoro's solution as-it-is, was that, that involved setting up auto-login. How to play the songs without setting auto-login on the computer as it is a potential security and privacy hazard. Thankfully, most linux operating systems (including Ubuntu) have a nifty little feature named cron. Here all the users of the system can set up their own list of tasks to be executed automatically at the specified date and time. For example, fetching mails from the remote server every 5 minutes, or as in my case, play the specified song at a particular time of the day.

But using cron has a small little problem. While it can let any graphical audio players play the songs when the user is logged in, it cannot do so if the user is not logged in. In my case, since I would be asleep when the computer starts in the morning, I will not be able to feed in the password for my account to let cron play the songs. So I turned to my friends at Mumbai Linux Users Group for help and as expected, they pitch in right away. The problem it seemed was that, not all audio players can play songs without user being logged in. After many trials and errors, I was suggested to try mpg123, and it worked!

So here's how to put down the second problem:

Dan-te-naaaan! I am all set to wake up in the morning and do Pranayaam and Sudarshan Kriya. No more excuses.

Oh, but how do I stop the song?
Option 1 - Enter my password to log in to the computer > Fire up a terminal > type killall mpg123
Option 2 - Oh, I have a multimedia keyboard! So I just press the mute button.
Option 3 - Why should I stop it at all. Thats my favourite song, isn't it? I enjoy it while I brush my teeth and have morning cuppa.

So all you lazy bones, you have one less excuse to not get up in the morning.

Email comments to Nitesh Mistry   Tags: alarm, auto-power-on, bios, cron, geekosophy, howto, linux, mpg123.
Cloning Debian Installation
15th September 2010

There have been many times when I made a fresh installation of a Debian or Debian-based OS on a new computer or a different partition of my hard-disk and asked - how could I install all the other packages that I have installed on my main system in one go. Many answers involve remastersys, aptoncd, etcetera, etcetera. But they are helpful only when I want to install the same release of the distro. What if I upgraded my distro to the latest release? After every time I upgrade my system, I want to install all the packages that I had additionally installed on my older system.

The answer to this question always eluded me until recently when I read this article. And the solution was right there in my system itself, without the need for any external program. Not that I was completely ignorant of this solution, but I was not able to put it all together.

I am tempted to explain the whole thing here again, but the author of the original article has put it very descriptively. So I am going to only list the commands here:

Step 1 - On the system you want to copy from

sudo apt-get autoremove

Step 2 - Again on the system you want to copy from

dpkg --get-selections > installed-packages

A new file by the name of "installed-packages" will get saved in the home directory. Copy this file to the new system on which you want to install all the packages.

Step 3 - On the new system

sudo dpkg --set-selections < installed-packages
sudo apt-get dselect-upgrade

Note: Before you proceed with Step 3 - If the original system had some packages installed from third party repositories, add those repositories to the new system's /etc/apt/sources.list file. If you don't do this, those third party apps will not get installed. Also copy the /etc/apt/trusted.gpg file from the original system if you don't want to import gpg keys of all third party repositories from their websites.

That's it and you are done! Kewl B-)

Email comments to Nitesh Mistry   Tags: debian, dpkg, geekosophy, howto, install, linux.
Invoking Lord Ganesha
6th September 2010

Vakratunda Mahakaaya
Suryakoti Samaprabha
Nirvighnam Kuru Mey Deva
Sarva Kaaryeshu Sarvada

Meaning: Curved trunk, a mighty body, beholding the magnificence of millions of suns, Oh Lord, I pray to you, to remove all the obstacles from all the actions I intend to perform.

If you happen to be at any Hindu pooja or an auspicious event/gathering, you will invariably hear the recital of above shloka at the beginning. The meaning above is a crude translation of it (from my very little knowledge of Sanskrit, and what I learnt from my mom and at various religious discourses.

It is an invocation of Lord Ganesha who is also known (among various other names) as Vighnaharta, that is, demolisher of all obstacles. At the beginning of any (good/auspicious) work, we recite this shloka to praise Lord Ganesha, and to pray to Him to remove all obstacles from the task at hand.

By now, you must have understood the context of this post. Though this is not technically the first post, since the blog actually begins from here, lets all praise Him and pray to Him to bestow His blessings.

From this weekend, begins the 11 day Ganesh Festival (from the 4th till the 14th day of Hindu month of Bhadrapad) celebrated by Hindus across the world, especially the western parts of India. I will try to do a post on the same with pictures of celebration in our locality. Till then, stay tuned.

Email comments to Nitesh Mistry   Tags: ganesha, hinduism, religion, sanskrit.

Creative Commons License
This work by Nitesh Mistry is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 India License.
Created using Chronicle