July 07, 2014

Ubuntu 14.04 Desktop - How I feel it

1 comment:
I couldn't install Ubuntu 14.04 as soon as it was released. But I upgraded my office laptop to Ubuntu 14.04 in June.

Ubuntu 14.04 is more stable than other releases. And Ubuntu 14.04 is a LTS (Long term support) version which will release updates till 2019. I switched to 14.04 from 12.04.

They have disabled workspaces. (+1) I hate this workspace business because it is very hard to work with windows when these workspaces are there. In Ubuntu 14.04, workspaces are disabled by default. You have to enable it if you want it. 

Now Ubuntu supports real time windows resizing. (Not that impressive. But nice to have.)  

I don't like Amazon plug-in in Unity dashboard. So I always run fixubuntu.com script to disable it.

wget -q -O - https://fixubuntu.com/fixubuntu.sh | bash

What you have to do is just run above command line on terminal. After doing that you wont see advertisements on your Unity dashboard.


I don't see super fantastic awesome features to celebrate on this release. But developers have done a good job it making Ubuntu more robust and stable. Multi-monitor user experience has been improved. 

They have changed lock screen. (+1) I like this lock screen more than older one. This lock screen is visually similar to the login screen.

March 28, 2014

Portable Drive encryption with Ubuntu

2 comments:
I haven't used encryption on hard disk drives or pen drives ever. But recently I got a requirement to encrypt some portables disks. And there are some limitations also. After encrypting you would not be able to use that drive on Windows Operating System. You are going to limit to ext4 file system as well.

First you have to install cryptsetup to format your portable drive with encryption. To install cryptsetup run following command on a terminal.
sudo apt-get install cryptsetup
After that you have to open Disk utility application. To open it just search on Unity dash board like below.
 
 Then you will get a window like this.
Click on "Unmount Volume"
Click on "Format Volume". Then you will get a new dialog box like below. Select "Encrypt underlying device" option, before clicking "Format" button.
After that Disk Utility will ask for a pass-phrase to encrypt device. Give a strong pass-phrase and don't forget it! If you forget it, you will loose your all important and confidential data.
Then wait till it format the drive. This may take some time depending on your device capacity.
After completing formatting you will get below window.
Most probably after formatting disk utility will automatically mount your disk without prompting for the password. When you are connecting encrypted disk next time, Ubuntu will prompt for the password like below
Just type the pass-phrase and use your portable drive.
But sometimes Ubuntu will prompt for the pass-phrase. When you are attempting to mount drive you will get below error.
Unable to mount x.x GB Encrypted
Error unlocking device: cryptsetup exited code 5: Device <UUID> already exists.
There is a workaround for this bug. What you have to do first is closing all the applications which is using files on your encrypted device. Even the terminal windows you have to close.
Then run below command on a terminal.
sudo dmsetup remove /dev/mapper/<UUID>
Change the UUID part according to your error message. If you are getting an error like below after running above command, please check whether there are any application which uses your encrypted device. If you have anything running please close it and run above command again!
device-mapper: remove ioctl failed: Device or resource busy
Command failed

March 27, 2014

Sri Lanka Cartogram with d3.js

4 comments:
We have been using d3js to visualize things on maps. And after struggling with topojson application my boss found a way to convert Sri Lanka Shape file (.shp) to topojson format. Then we wanted to use cartograms for our visualizations.

I found that there was a d3js cartogram implementation. - https://github.com/shawnbot/d3-cartogram/

With the help of this blog post - http://www.limn.co.za/2013/10/making-a-cartogram/, I finished cartogram Visualization. 

And Nisansa's co-ordinations for center of Sri Lanka was very helpful to calibrate Sri Lanka map.

You can find my sri-lanka-cartogram repository on GitHub - https://github.com/dedunumax/sri-lanka-cartogram

You find the live demo from here - http://web.dedunu.info/sri-lanka-cartogram/


Thanks https://github.com/mbostock for d3js library! He is a wizard in visualizations.
Thanks a lot https://github.com/shawnbot for cartogram.js! Hope this will be useful to you.

February 07, 2014

Hadoop Mapper only MapReduce jobs

1 comment:
It's funny! You can have mapper only Hadoop MapReduce Jobs. This would be useful sometime when you need to change the structure of data. Otherwise you can use this way when want to filter out data. But I don't think you will need this much often.

First file is a simple mapper which really does nothing. You can change it as you want. You can see in main method job.setNumReduceTasks(0); line which set reduce tasks to 0. You can find Maven project on GitHub