24 Aug 2014

Essential Windows Softwares

I earn my bread and butter by working as a computer technician and I have to on daily basis install Windows on my client's computers. Windows in it's default installation lacks many essential softwares for day-to-day computing tasks. I used to have a DVD containing all the essential softwares and recently that DVD got broken by an accident. Burning a new DVD became necessary and I went on the hunt for the set of softwares which are essential after a fresh Windows install. My criteria was simple. Choose the softwares which are open source and only include closed source softwares when there is no viable open source alternative available.

15 Jun 2014

live score of 2014 FIFA football world cup in linux terminal

The FIFA football World Cup 2014 is underway in Brazil. Most people will be glued to their television sets during the matches all over the world. But there are many people who won't be able to watch it on telly for various reasons. If you are one of them and you are tied to your computer but want to keep an eye on live score of the FIFA footbal World Cup 2014 matches then worry not.

3 Jun 2014

how to automount usb drives and memory cards in linux

A recent discussion on Debian forum has inspired me to write this post. If you use a minimal window manager like openbox, fluxbox, i3 etc. you will find that USB drives and Memory cards won't automount. It can be very hard for new Linux users to figure out how to mount the USB drive or Memory card they have just inserted. Thankfully this can be achieved easily via udev rules. Open your favorite text-editor as root ( sudo or su) and copy-paste the following,

#! /bin/sh

KERNEL!="sd[b-z]*", GOTO="exit"

ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="exit"

IMPORT{program}="/sbin/blkid -o udev -p %N"

ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"

ENV{ID_FS_LABEL}=="", ENV{dir_name}="flash_drive_%k"

ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_vfat}="auto,uid=1000,gid=1000,dmask=022,fmask=133"

ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} vfat %E{mount_options_vfat} 0 0' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/mount -t vfat -o %E{mount_options_vfat} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ntfs}="auto,uid=1000,gid=1000,dmask=022,fmask=133"

ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ntfs-3g %E{mount_options_ntfs} 0 0' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options_ntfs} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext2}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext2", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext2 %E{mount_options_ext2} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext2", RUN+="/bin/mount -t ext2 -o %E{mount_options_ext2} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext3}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext3", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext3 %E{mount_options_ext3} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext3", RUN+="/bin/mount -t ext3 -o %E{mount_options_ext3} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext4}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext4", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext4 %E{mount_options_ext4} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext4", RUN+="/bin/mount -t ext4 -o %E{mount_options_ext4} /dev/%k '/media/%E{dir_name}'"

ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"

ACTION=="remove", ENV{ID_FS_TYPE}!="", RUN+="/bin/sed -i '/\/dev\/%k /d' /etc/fstab"

LABEL="exit"

And save this file in '/etc/udev/rules.d' directory with the name '10_usb_mount.rules'.

We'll need another rules file for Memory cards,


#! /bin/sh

KERNEL!="mmcblk[0-9]p[0-9]", GOTO="exit"

ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="exit"

IMPORT{program}="/sbin/blkid -o udev -p %N"

ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"

ENV{ID_FS_LABEL}=="", ENV{dir_name}="sd_card_%k"

ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_vfat}="auto,uid=1000,gid=1000,dmask=022,fmask=133"

ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} vfat %E{mount_options_vfat} 0 0' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="vfat", RUN+="/bin/mount -t vfat -o %E{mount_options_vfat} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ntfs}="auto,uid=1000,gid=1000,dmask=022,fmask=133"

ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ntfs-3g %E{mount_options_ntfs} 0 0' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options_ntfs} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext2}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext2", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext2 %E{mount_options_ext2} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext2", RUN+="/bin/mount -t ext2 -o %E{mount_options_ext2} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext3}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext3", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext3 %E{mount_options_ext3} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext3", RUN+="/bin/mount -t ext3 -o %E{mount_options_ext3} /dev/%k '/media/%E{dir_name}'"

ACTION=="add", ENV{mount_options_ext4}="auto,users,exec,noatime"

ACTION=="add", ENV{ID_FS_TYPE}=="ext4", RUN+="/bin/sed -i '$a\/dev/%k /media/%E{dir_name} ext4 %E{mount_options_ext4} 0 2' /etc/fstab"

ACTION=="add", ENV{ID_FS_TYPE}=="ext4", RUN+="/bin/mount -t ext4 -o %E{mount_options_ext4} /dev/%k '/media/%E{dir_name}'"

ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"

ACTION=="remove", ENV{ID_FS_TYPE}!="", RUN+="/bin/sed -i '/\/dev\/%k /d' /etc/fstab"

LABEL="exit"

Save this file in '/etc/udev/rules.d' directory with the name '10_sdcard_mount.rules'.

Next open terminal and run the following command as root to reload the udev rules,

udevadm control --reload-rules

That's it! The next time you plug-in a USB drive or a Memory card it will get automounted and be ready for you to use. Cheers!!! 

10 Apr 2014

Three Free And Secure Windows XP Alternatives

Microsoft finally pulled the plug on Windows XP on 8 April, 2014. Computers running Windows XP won't get any further security updates-patches. This means that the computers running Windows XP have become more vulnerable to the security risks even if they are running latest anti virus-malware products because operating system level exploits are beyond the scope of these products.

4 Dec 2013

Enable Numlock on bootup in GDM, LightDM and LXDM

GDM :-

First you'll have to install package 'numlockx'. It is available in the repositories of almost every Linux distribution. After you have installed 'numlockx' package open the following file as root in your favorite text editor,


/etc/gdm/Init/Default


1 Dec 2013

A nice looking and useful bash PS1 prompt

It's been a while since I blogged anything. Getting lazier. Anyways the folks who use Linux and/or Mac are familiar with Bash. It's the default shell in most of the Linux distributions and Mac. And the folks who use these operating systems also know the power of working in the terminal. And the prompt you see whenever you open the terminal is controlled by PS1. Most of the time the default prompt is, let's face it, boring. Today I'm gonna give you a nice, colorful, two lined prompt that also displays the exit status of the last command. Exit status means whether the command failed or succeeded.

30 Jun 2013

we don't like cricket, WE LOVE IT.

Just behold the following image,




Isn't that a beautiful cricket venue? That is Threlkeld Cricket Club. It is a small village club in Cumbria which has a 1st X1, a midweek side, an U11 and an U13 side.Cricket has been played at Threlkeld for nearly 100 years and until 10 years ago the facilities consisted of a tin shed. After many years of hard work and tireless fundraising, enough money was raised to build a new club house. 5 years after this a local farmer donated a large piece of adjoining land and the pitch was extended, the ground levelled and a new square laid. Threlkeld was runner up in Wisden's prettiest ground competition. The ground is not only used for Cricket but for the village school sports day, hound trailing, children’s parties and other local events. It is truly a community facility.

In June 2012 after a period of heavy rain a raised culvert filled with gravel and overflowed. Tonnes of gravel, rubble and toxic silt were deposited on large parts of the ground, especially the square. The water course drained old lead mine workings upstream and as a result the silt was laced with lead, arsenic and cadmium.




Not only does the rubble need to be removed but the top soil is contaminated and will need replacing along with proper disposal (a study has been carried out by the England & Wales Cricket Board). Estimates from the England & Wales Cricket Board suggest this will cost upward of £50,000 to sort out. Not only has the club lost it's ground it has also lost a key revenue stream as no money is being spent in the bar on match days and the ground can't be used for events. The club has very limited financial resources and without help Cricket may never be played at Threlkeld again.

But the players of Threlkeld Cricket Club don't like cricket, THEY LOVE IT. So, rather than sobbing at the loss of their long shadows on a manicured green wicket, the team packed up their whites and went on a search for the most inspiring and extreme wickets the glorious Lake District has to offer. Check them out,














Local photographer Stuart Holmes willingly volunteered to record their extra ordinary cricket matches. The result is an amazing A3 calendar featuring 12 unique and individual cricketing photos. If you buy this amazingly beautiful calendar you also support them in their effort to save their cricket club and keeping their cricket alive. So if you really love cricket i urge you to visit their official website rainstoppedplay and buy it today.

You can visit their Facebook page on,
https://www.facebook.com/ExtremeCricketCalendar

Cheers!!!!