ubuntu Network Manager showing 'Enable Wireless' in grey and makes it unclickable

i've run into this issue multiple times in ubuntu while waking up from a suspend / hibernate like operation. right clicking on the Network Manager on the notification area shows 'Enable Wireless' but unclickable and in grey. you can fix this by making following changes to file:

/var/lib/NetworkManager/NetworkManager.state

and making sure it looks like:

 

[main]

NetworkingEnabled=true

WirelessEnabled=true

WWANEnabled=true

 

sometimes a "sudo service network-manager" is enough after the previous step to reflect the change, but on other occasions i've had to reboot my machine.

give this a try when you're stuck and let me know if it works.

the only program that i follow on Indian television - Sa Re Ga Ma Pa - Little Champs

i believe it is the sacred duty of television, radio, literature, and other such media, to
introduce its audience to the expanding possibilities of life. it goes without saying that
they don't agree to my belief. but seldom, some do.

for anyone who can appreciate music, this show - Sa Re Ga Ma Pa - Little Champs,
is a blessing. who would have thought these children aged 10-14 would be such fabulous
singers? i'm mesmerised each time i hear them; and so is Lata Mangeshkar, as conveyed
by her through SMS to the show. i'm sure they are not even mature enough to understand
how exceptional they are and how their performance influences thousands of viewers.

the performances are so pure and straight from the heart. i feel pity for those in my 
generation, who survive on base pleasures, and cannot appreciate such purity and divinity. 

Read the rest of this post »

how i used udev, udevadm, and a shell script to automate syncing of media files between my android phone and computer

udev provides powerul rules that can be used to perform custom tasks whenever there is activity on usb ports. here's what i created in /etc/udev/rules.d/99-sync_music_files_on_android_devices.rules:

    
ACTION=="add|change", ATTR{size}=="31114240", ATTRS{vendor}=="SAMSUNG", ATTRS{model}=="GT-I9003", NAME="galaxy_s_external_sd", RUN+= "mkdir /media/galaxy_s_external_sd", RUN+="mount /dev/galaxy_s_external_sd /media/galaxy_s_external_sd", RUN+="/home/vinu/bin/sync_music_files_on_android_device.sh"
ACTION=="remove", RUN+="/bin/umount -l /media/galaxy_s_external_sd", RUN+="/bin/rmdir /media/galaxy_s_external_sd"   LABEL="sync_music_files_on_android_devices_end"

the first line registers an action to add/change event of a usb device that has attributes as size: 31114240 and parent device having attributes of vendor: "samsung" and so on. you can find the attributes related to your device by using udevadm as:

   $ udevadm info -q all -n /dev/{device_label}       

udevadm is pretty interesting and can provide a lot of information about devices, shows all applicable rules for a device, and also allows testing your rules using triggers. see the udevadm man page for details.

i've also asked the device label to be custom (NAME) as: galaxy_s_external_sd so that i can refer to it that way in RUN which creates a mount point and mounts the device at the desired location. then i RUN the shell script that actually syncs the media files and logs the activity:

#!/bin/bash
rsync -r -t -v --progress --delete-before /home/vinu/Music/sync /media/galaxy_s_external_sd/Music >> /home/vinu/log/rsync.log

interesting isn't it? let me know if you try this out, or if you've done more interesting stuff related to udev or, in general with linux, through comments.

references:

http://reactivated.net/writing_udev_rules.html

http://wiki.archlinux.org/index.php/Udev -- lots of examples

nature never ceases to amaze - lake shore at Chicago

(download)

"There is a pleasure in the pathless woods,
There is a rapture on the lonely shore,
There is society, where none intrudes,
By the deep sea, and music in its roar:
I love not man the less, but Nature more."

- Lord Byron, Childe Harold’s Pilgrimage

Read the rest of this post »

top 3 ways to mess-up a cucumber functional test suite

on a recent project we used cucumber extensively for functional testing of our rails app using selenium webdriver to run it in the browser. all of us are convinced that it's a great tool, but there are many a things worth keeping an eye on otherwise it can lead to pain. 

here i list top gotchas that we targetted and brought sanity back; but before i start, i'd like to point-out that these problems arise from the misuse of the freedom that cucumber gives us. cucubmer scenarios are plain english, and hence there are as many styles of writing scenarios as there are members on the team and that trickles down to steps as well.

Read the rest of this post »

Don't miss in Mahabaleshwar: Tiger Path

especially for those who are troubled by the fact that Mahabaleshwar is increasingly and uncontrollably becoming too commercial, don't miss this trail called tiger path (2.25kms, Bombay Point to Polo Ground). it is virgin jungle, but has the bare necessity one would want there, a clearly marked trail and milestones at the right places to indicate the direction to take.

Read the rest of this post »

the best way to upload photos to facebook from (k)ubuntu

Its been a well known issue that the facebook uploader fails miserably in ubuntu, and hence these packages rock! first i installed phatch

$ sudo apt-get install phatch

next, f-spot

$ sudo apt-get install f-spot

though i know that f-spot allows one to batch update photos, i preferred the intuitive and simple interface of phatch for doing so. i used f-spot's Facebook upload plugin (which is deactivated by default) to upload to Facebook. the f-spot plugin can be activated from Edit > Manage Extensions and used from File > Export > Facebook. happy photo uploading!

Driving skills

As a child i used to curiously observe the rhythm with which my Dad used to press the pedals (even before i knew they were called accelerator, brakes and clutch) while he was driving. Looking back, that experience of sitting next to the drivers' seat taught me more about the use of those pedals, hand-to-eye co-ordination and judgement, than what i learnt when i actually sat on one.

Read the rest of this post »