TimeLinux1

Tuesday, December 30, 2014

Unsupported Version of Google Chrome after Ubuntu update

Recently ran the 'Software Update' utility on my laptop running Ubuntu Linux 14.04 OS and ever since, I have been graced by this (un)friendly sort of error every time I use gmail app on my google chrome browser:

This version of Chrome is no longer supported. Please upgrade to asupported browserDismiss

This error suggests that the gmail app is not very happy with my browser version (which was v36, the latest version out there being v39). Now If I use 'Software Update' utility again, it tries to update a laundry list of all packages in my OS to update totaling upto about 600 Mb; which would be ok if I wasnt short on time. So a better solution for me would be to simply upgrade Chrome only and nothing else. And here is what I tried.

First, I tried to upgrade Google chrome via the browser settings menu but it came back and said its already at the latest! well that wasnt much help.
So I then, tried my next option of upgrading only Google chrome via the apt-get utility (as shown in the screen shot).




And that did it. Once apt-get completed its work, I restarted my browser and it on checking its version, it showed that it was upgraded to the new version (v39). And yes the error no longer shows up either! Hooray!

So, if you have been through this error yourself and wondering what to do, then you could follow the simple method of upgrading only Google chrome & get rid of that pesky error.


Sunday, December 28, 2014

Installing Standalone Hadoop on Ubuntu 14.04


Today we discuss the process of Installing Standalone Hadoop on Ubuntu 14.04.

Here is the short of it.

Pre-requisites:

1- Java binaries  - Hadoop requires Java to run its process
2- Hadoop Tarball - Thats a no brainer, you need hadoop to run hadoop. :)
Note: For standalone hadoop (one node only), ssh is not mandatory.

To get Java, you can rely on the good old Open JDK (like I did myself) or you can get the 'official' java from https://www.oracle.com/java/index.html.
In my case, long time ago for some other work, I had installed openjdk (the un-official but opensource version of Java) version 7 (or java 1.7 as some like to say) according to the instructions from this page - http://openjdk.java.net/install/
We will come back to this in the configuration part later in the discussion.

As for Hadoop, you can simply download it from Apache site. I downloaded from http://www.apache.org/dyn/closer.cgi/hadoop/common/ and downloaded the (slightly older) version 1.2.1 tarball (hadoop-1.2.1.tar.gz).

The first thing to know is that you DONT need to be root to install ubuntu (as long as you have sudo).
So I was logged in as my own not-root user (mrinal)



Then I created a directory under my home directory where I moved the hadoop tarball I downloaded earlier from Apache mirror (see above) and unpacked it using the following command:

mrinal@ms-dell:~/hadoop$ mv  /home/mrinal/Downloads/hadoop-1.2.1.tar.gz   /home/mrinal/hadoop/
mrinal@ms-dell:~/hadoop$ tar xvzf hadoop-1.2.1.tar.gz

This creates a new directory in the same place and that becomes my hadoop install location.


Now, refering back to the java install process from above, in ubuntu, the java is installed by apt-get installer process under /usr/lib/jvm folder. Sometimes there may be previous older preinstalled versions of java present but you can ignore them--we are interested in the version 7.

Then I set my environment variables in my .bashrc file (for subsequent logins to be set properly). The .bashrc file resides in my home directory (in my case /home/mrinal) as follows

mrinal@ms-dell:~/hadoop$ vim ~/.bashrc 

and at the end of the file enter these lines:

Note: It is crucial that the PATH env variable includes the JAVA_HOME/bin & HADOOP_INSTALL/bin directories.

For Hadoop in distributed mode in a cluster, ssh service is required but in our case being a standalone mode, ssh is not mandatory. Nevertheless its good to know that in Ubuntu (and Linux in general) ssh is preinstalled.

The last thing before hadoop config checks is to set JAVA_HOME variable in the hadoop-env.sh file.
This file resides in the $HADOOP_INSTALL/conf directory (/home/mrinal/hadoop/hadoop-1.2.1/conf in my case). If you dont set this variable, you would get weird errors like "localhost: Error: JAVA_HOME is not set." when you try to start / stop / do anything with your hadoop.

Anyhow, once you are done with all the above steps, you should be able to do basic config checks to see if your hadoop is installed and functioning ok..

mrinal@ms-dell:~$ echo $JAVA_HOME 
/usr/lib/jvm/java-7-openjdk-amd64/
mrinal@ms-dell:~$ echo $HADOOP_INSTALL
/home/mrinal/hadoop/hadoop-1.2.1
mrinal@ms-dell:~$ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
mrinal@ms-dell:~$ hadoop version
Hadoop 1.2.1
Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152
Compiled by mattf on Mon Jul 22 15:23:09 PDT 2013
From source with checksum 6923c86528809c4e7e6f493b6b413a9a
This command was run using /home/mrinal/hadoop/hadoop-1.2.1/hadoop-core-1.2.1.jar
mrinal@ms-dell:~$ start-dfs.sh 
starting namenode, logging to /home/mrinal/hadoop/hadoop-1.2.1/libexec/../logs/hadoop-mrinal-namenode-ms-dell.out
mrinal@localhost's password:
localhost: starting datanode, logging to /home/mrinal/hadoop/hadoop-1.2.1/libexec/../logs/hadoop-mrinal-datanode-ms-dell.out
mrinal@localhost's password:
localhost: starting secondarynamenode, logging to /home/mrinal/hadoop/hadoop-1.2.1/libexec/../logs/hadoop-mrinal-secondarynamenode-ms-dell.out
mrinal@ms-dell:~$ start-mapred.sh
starting jobtracker, logging to /home/mrinal/hadoop/hadoop-1.2.1/libexec/../logs/hadoop-mrinal-jobtracker-ms-dell.out
mrinal@localhost's password:
localhost: starting tasktracker, logging to /home/mrinal/hadoop/hadoop-1.2.1/libexec/../logs/hadoop-mrinal-tasktracker-ms-dell.out
mrinal@ms-dell:~$





Tuesday, October 14, 2014

Internet Broadband and Prepaid Mobile at Delhi Airport -- Tips for Travelers to India



If you have traveled to India in the past, you probably have faced the situation of trying to scurry for a decent mobile phone and Internet connection from the get go. I have been to the UK and some EU countries and like them India has adopted the GSM cellular technology. And you can get a phone over the counter without much ado there ('Welcome to Lebara Mobile'--that British accent female voice is unmistakable..:) )Plus the phones are not locked to the carriers like in the USA. I personally feel, the consumers in USA are fleeced by the 'locked phone' culture. How ironical, in the 'land of the Free'..Funny how Businesses work in USA.

Anyhow, back to India. I used to have a difficult time finding a temporary cellular phone (without having to activate 'Roaming' on my USA phone). Plus Internet connections were always a hassle because most of the services were specifically compatible to Windows OS only (I have been an exclusive Linux-phile for about 15 years now) and I would always have to struggle to find that would work with my Linux laptop.
But that was then. And here's my story of 2014 about the same in India. And I was pleasantly surprised.
As a visitor to India, here are some tips you can find useful to get --

  • Prepaid mobile connection 
  • Broadband Internet connection that would work with Linux OS.


1) Carry a Xerox copy of your Passport from your home country
2) Carry two Passport size photos from your home country
Note: Well, if you dont have the two above, dont despair, the folks here can help you get that at the airport itself; but its easier if you have the two things handy before you come.

3) After you finish your Customs formalities and get your baggage BUT just before you exit the Airport terminal (T3 for Delhi Indira Gandhi International Airport aka IGI Airport), look for kiosks that advertise Cellular and Internet services--there are many. The one that is most popular is called 'AirTel'--it is India's #1 Telecom provider.

4) Once you arrive at the Airtel (or Vodafone or Reliance kiosk)--I prefer Airtel--ask the person for A) Prepaid Mobile Sim Card B) 3G Internet Broadband connection (4G LTE is expected sometime early 2015).

5) The person will ask for the passport copy, pictures and your Address of stay in India--you can use your hotel address if you want.

Note: If you have an unlocked phone (like me) then you dont have to pay for the phone device (for the Prepaid sim card). They do have the 'Micro-sim' that my Sony Xperia Z1 Compact uses. If you DON'T have an unlocked phone you can buy one at the counter/IGI Airport for less than USD 50.

6) The Service itself is quite in-expensive compare to USA. It cost me about Rs 3000 (which is about 50 USD) for BOTH the Prepaid Cell connection and the 3G USB Internet dongle.

7) It takes about 15 minutes to get paperwork completed and you to get going to your hotel.

8) You may want to ask the contact # of the Airtel representative at the counter, just in case.

9) In my case, I specifically asked if the Internet connection would work with my Linux OS and his answer was 'Yes' and that was good for me. Also the service was functional within 2 hours. Just enough time for me to reach my destination and relax a bit.

10) Quality of service -- I was pleasantly surprised that the Internet speed is comparable to the USA -- upto 21Mbps down and 2Mbps up. ( I got about 15Mbps--see pic below). The customer service is prompt if you call 59059 from your cell for any reason.

11) Yes, again the Mobile Broadband works with Linux. I have Ubuntu 14.04 LTS and it seamlessly detects the USB dongle with the Broadband sim soon after you plug it in.

Wednesday, October 1, 2014

Sony Android Phone Not working 100% with Ubuntu


Those of you who care to read what I write would note that I have no liking for Microsoft or Apple products. I have been using FOSS specially Linux OS as my laptop/desktp OS since year 2000 and also as the OS for my smartphone (as Android incarnation) since 2010.
Currently I use Ubuntu 14.04 LTS (Trusty Tahr) as desktop OS and Android 4.4.2 (KitKat) as smartphone OS. The hardware for the same is Dell XPS 13 and Sony Xperia Z1 Compact. Occasionally I do use Fedora (on Sony Vaio S laptop) as my 2nd laptop and Amazon Kindle HD running Amazon's derivative of Android (called Silk) as tablet. But truly that is rare. My laptop and my smartphone are my primary devices..
But why am I telling you all this?
Well there is a precise reason for that. If you noticed all of the above OS (be it laptop/smartphone/tablet) are based on the GNU/Linux Kernel. Right?
So you would expect they would get along well together, Right? Wrong..

[Microsoft and Apple sauce fans: desist from saying "switch to us". No wont, you are not Free. I may be a bit uncomfortable but I'm Free..So dont even start..]
Anyway I digress..

It so happened that I recently switched to my new Sony Xperia Z1 Compact (from my previous HTC Evo LTE). The reason for the switch was upgrade to a new, powerful, goodlooking, waterproof, feature packed phone. To make the best of the phone's 20.7 megapixel camera, I got it loaded with a SD card to store all my pics. And then I gleefully went on clicking pics.
After a while, I wanted to transfer my picture files to my Ubuntu 14.04 laptop. Just like I used to do with my old (HTC) phone simply by connecting with a USB cable. But this is where my horrors start.
To my surprise, Sony Xperia detects the USB connection and immediately prompts you to install an file transfer software (called ominously 'PC companion') that works only with (hold your breath) Microsoft Windows or Apple (s)Mackintosh. What?? Why?? Arent you Android Sony Xperia OS? And if so arent you a derivative of Linux OS? So isnt it logical for you to work seamlessly with any Linux OS (in this case Ubuntu) using an open standard USB? Well apparently not. The developers and designers at Sony didnt have the foresight and vision to think beyond Windows and sMacintosh eventhough they are themselves based on a Linux OS. What a shame.
After a bit of twiddling, I do see a link under 'Settings > Storage' that prompts me to transfer files from 'Internal storage'(here, builtin phone storage) to 'External storage' (here the SD card). And I accept this option thinking that its only fair--I can transfer the files and then plug the SD card to my laptop directly (ie without the phone via USB). But another goof up on the software designers. They very conveniently forgot to mention that the 'Transfer' is actually a 'move' not a 'copy' (ie after transfering the files it will wipe out the original files. Who designed this? Can they at least warn the End user before doing such a one way transfer? Poor thinking Sony!!
Anyhow, I transfer the files and try to connect the SD card directly onto my laptop but as if all the prior misery was not enough, now the SD card is not recognized by Ubuntu OS because the SD card was formatted by the Phone OS (in this case unbelievably a Linux derivative called Android) in a format which is understood only by Windows and NOT by Linux. Why? This never was a problem with the previous Android phone (from HTC).

So what to do now?
I had to jump through these hoops to finally be able to transfer the files:

0- Put the SD card from my Sony to my older HTC phone (while my Sony phone sat useless like a plastic POS)
1- Transfer ALL files (including pics, songs, etc) from SD card in the HTC phone to the Laptop
2- After Transfer Format the SD card (while its in the HTC phone) so that the format is now recognizable to Linux (Remember, Sony formatted in a way only to be understood by Windows - the evil proprietary "extFAT" while HTC formats it into a universal Linux readable "vFAT" format)
3- After Format, put the SD card back into my Sony phone
4- Connect the Sony phone back to the laptop
5- Copy back the files from the laptop to the SD card that I did NOT want to transfer originally(like songs etc)

So as you see it was 6 step hassle. Why?
Because some genius in Sony decided that it was a wonderful idea to totally ignore Linux compatibility eventhough the phone OS in use (Android) is itself a Linux derivative and as such should talk the same language and be seamless..But no.. Great Sony!! (puns intended)

Sony here's the lesson for you. You are great hardware maker. No doubt. I have long been your fan. So have millions of others like me. But you are losing the smartphone battle to Samsung and iOS. Arent you? Do you want to keep losing market or do you want to win back again? If you want to win back then...Dont be stupid and restrictive. Dont be anti end user comfort. Only those companies who give utmost importance to End-user convenience succeed and are actually succeeding as we speak. Dont you see? If a savvy end-user like myself had to go through so many hoops to get something as simple as file transfer from phone to laptop then think of Grandma or Aunt Tilly. You have already scared them and lost their business. Come on Sony give us a better deal and DONT ignore Linux. Period.


Saturday, September 13, 2014

My First Year with Dell Ubuntu Linux XPS 13 Laptop

Today I wanted to share my experience of my recently completed 12 months with Dell Linux Laptop.
If you are wondering what is a Dell Linux Laptop then go here on Dell's website. I hope Dell doesnt change the URL anytime soon. But let me begin by saying that on a scale of 1-10 about my overall satisfaction with this laptop I would give it a high 9.5 or 10/10.
Now if you have followed my previous posts about Linux Laptops on Sony or Asus Bamboo Laptop you will notice that I'm a hardcore Linux OS person & that I cant stand Windowwws (aka Microsoft) or osxxx (aka Apple sauce ;-)). So there is a slight chance that I may be a little more critical any OS other than Linux but I believe with what other OSes do to End-User Freedom, its all well to be a little unfriendly to them...

I must say in my eyes, Dell is the only major hardware vendor who has in the last decade had the guts to take to the market with a Factory installed Linux laptop. The key word is 'major'. Other little hardware assemblers and VARs have been doing it for a while but they are not anywhere in the graph. In the hardware landscape if you are not in the top 10 you are really not there..Anyhow I digress. Dell had first come out with their first version of Dell Factory installed Linux Laptops in the form of the Inspiron 14 Ubuntu laptops back in 2007. And I remember I had immediately scooped one up eventhough it was a bit pricey at about $1500 then. Although it was not the top notch contender but hey you must recognize Dells effort and guts to do something other than what the cattle crowd of hardware players does for Microsoft. I had liked that incarnation for a while -- I still have it in my array of laptop collections and it does work still albeit slowly. But this second version of Dell XPS 13 preloaded with Ubuntu 12.04 that Dell came out with in 2012 was a kicker. Eversince I heard about it I was very eager to get one and finally in May-June of 2013 I did. Let me go a bit into its specs first...

What I wanted from my next laptop was:
1- Lightweight & less than 3lbs  (this one was advertized as 2.96 lbs & I believe .69 inches thick). So check..
2- Hi Speed at 3GHz or more (this one has Intel i7 Quad core at around 3GHz & 8 GB RAM) so good on that front.
3- Low Heat and Fan noise (It is markedly cool and silent thanks to its Carbon Fiber Base and efficient circuitry-- I can barely hear the fan even when running videos and it is in quite in contrast to my frustration with the Sony vaio running linux. So we are good on that front..
4- SSD Hard Drive (this one has 256 GB of solid state disks) No more spinning spindles and cranking disks that also add to the weight besides being failure prone after prolonged usage..So check
5- Backlit Keyboard (very important for me because I work in the dark often like early mornings/late nights and without disturbing others--also good for airplanes when they turn off lights--you can keep working)
6- HD Graphics (this one has full 1080p HD screen with Intel IvyBridge Graphics card) so movies are a thrill..
7- Long Battery life of minimum 5 hours (this one gives 6 hours with lots of programs and about 7 hours when only surfing/browsing). Again much better than the Sony Vaio experience
8- Small form factor - this is where it really does good. Due to the edge to edge screen using Gorilla Glass Dell has been able to squeeze in a 13 inch in a 11 inch form factor..How cool is that?
9- Compact Power Adapter - I have had ugly bricks for power adapters in the past. This one is sleek, tiny and small like a cigarette case and puts the apple sauce people to notice. Not to forget the cool LED light on the connector is a useful innovation especially when you are trying to grope for the DC power port when working in the dark like me..
10 - Linux OS - Last but not at all least - How can we forget this. I have sworn to never buy a windows and or apple. So this one is all set..

And as you see, the laptop holds good in each of my wants. Infact the package is so cool that I have had several people in several countries/places stop and ask me about which laptop is it? where I got it from? how much I paid  and that it really is a great looking beautiful lapto  etc, etc..One guy thought this was a tablet..But nope this is a full featured laptop that holds the punch.

Now how much did I pay for it? About USD 1550 all inclusive. Granted its not the cheapest in its segment but Do you really  want a cheap laptop and cut corners in your style statement? I dont. Plus look at it this way, its a fully loaded Ferrari of a laptop. Do you want to compare it to a Camry?
BTW, one thing I must say that the Ubuntu folks didnt do 100% on was the suspend mode. In 12.04 LTS (the default with this laptop) throws the following onscreen messages when you suspend the laptop or wake it up:
[12656.501533]PM:Device 00:07 failed to resume: error -19
[12658.420216][drm:gen6_sanitize_pm]*Error* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000
legacy_resume():pnp_bus_resume*0x0/0x70 returns -19

But suspend still works--only the above ugly cryptic errors show up. I believe it is something to do with the Power management routines that are called when suspend function is invoked in the kernel. Anyhow I chose to ignore it for a year and when in July of this year (2014), Ubuntu came up with the 14.04 LTS with bug fixes I upgraded to it promptly and now those errors are gone & I dont see them. This was the only reason I gave it 9.5/10 when 12.04 was running. But now with 14.04 LTS on and the error gone, I can give it 10/10. In other words in my first year with the laptop I have been extremely satisfied with the Dell XPS 13 runing Ubuntu. And for someone who changes laptops every 12-18 months, I think this one will hold for a long time to come who knows may be I will be surprising myself using the same laptop from 2013 in 2018 and yet not compromising on anything..who knows..
So next time you are faced with the decision to buy a laptop for yourself or loved ones, dont overlook the incredible quality, features and value of the Dell XPS 13. Put on a Tux sticker from Zazzle on the lid like I did and you will be very satisfied with your purchase, make a statement and also turn heads..

=====

Oh yes one more point..
I have never been a fan of Ubuntu's Unity Interface. So one of the first things I did to customize it to my taste (besides installing Chrome Browser) was to install gnome using the following command..
$ sudo apt-get install gnome-shell
You can find several tutorials to guide you through the process like this one here.