Hello World,
This is the first post - mainly for testing purpose
Proper introduction of this blog might most probably come in the next post
Entries from September 2010
Hello World,
This is the first post - mainly for testing purpose
Proper introduction of this blog might most probably come in the next post
So what is this blog about? Yet another blog by a self-centric fellow - you would say.
Well as I said on the links page, this is my single unified blog. It means I have discontinued writing on other blogs, which were mostly topic oriented. From now on I will continue writing on all those topics and more here.
But you ask - why?
And what will this blog cover?
As I said above, anything that I have in mind. The topics may range from accountancy and finance, to technology and internet, to photography, philosophy, politics, and anything else under the sun. I know, you may not be interested in everything that I blurt out here. Hence the tags. You can browse the blog by tags, and also subscribe to a particular one by adding the rss feed of that tag to your favourite reader (as if you didn't know this already ;).
There is one thing that you may see missing here, that is comments below the posts (or rather absence of it). One reason is, I believe, that comments are more like personal form of communication. So I have provided an email address below every post, where you can send me your comments. I will try my best to communicate with you (unless you are a spam bot). Another reason is that I didn't want to activate the dynamic webserver of my web-host (required for commenting feature) which would save me a few bucks a year - an important reason for a student with tight budget, you see. :)
What else can I say about this blog. Enjoy reading!
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.
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
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-)
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:
crontab -e
sudo crontab -e
. When asked, provide the password. (edited on 25th Sept. 2010)# m h dom mon dow command
10 6 * * * /usr/bin/mpg123 <path to my song file>I Keep a difference of about 10 minutes between the time I set in BIOS for starting the computer and the time I set above. This provides a buffer for letting the computer boot-up and reach a stage where it can let cron execute the command.
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.