Reuse docker images and save bandwidth

Lately, Docker has been creating a lot of fuss and I decided to give it a try. The website was easy to follow and the hello world example easy to setup.

The Problem

It was great to have a container setup for me automatically with a ubuntu base image running. All this in just few seconds. Well, assuming you have a blazingly fast Internet connection to download the image in few seconds. In any case, it makes sense for anyone to be able to reuse already downloaded files on one machine for the other machines. This is what I wanted to do, it didn't make sense for me to download the image on all of my machines.

The Solution

Initially I thought “well, its just a matter of copying the image file to the other machine and you're done”. Well, I soon realized that it might not be that straightforward as it is not just one image but different “layers” of images managed by AuFS.

Luckily, Docker provides a simple solution to do this –

user@machine1:~$ sudo docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              12.04               8dbd9e392a96        9 months ago        128 MB
ubuntu              latest              8dbd9e392a96        9 months ago        128 MB
ubuntu              precise             8dbd9e392a96        9 months ago        128 MB
ubuntu              12.10               b750fe79269d        9 months ago        175.3 MB
ubuntu              quantal             b750fe79269d        9 months ago        175.3 MB

user@machine1:~$ sudo docker save ubuntu > ubuntu.tar

Now copy ubuntu.tar from machine1 to machine2 and follow these from machine2:

user@machine2:~$ cat ubuntu.tar | sudo docker load

user@machine2:~$ sudo docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              12.04               8dbd9e392a96        9 months ago        128 MB
ubuntu              latest              8dbd9e392a96        9 months ago        128 MB
ubuntu              precise             8dbd9e392a96        9 months ago        128 MB
ubuntu              12.10               b750fe79269d        9 months ago        175.3 MB
ubuntu              quantal             b750fe79269d        9 months ago        175.3 MB

Or, if you want a compressed tar,

user@machine1:~$ sudo docker save ubuntu | bzip2 > ubuntu.tar.bz2

Copy ubuntu.tar.bz2 from machine1 to machine2

user@machine2:~$ bunzip2 ubuntu.tar.bz2 –stdout | sudo docker load

Or, if your machines are connected by a network and you can use ssh,

user@machine1:~$ sudo docker save ubuntu | bzip2 | ssh  user@machine2 “cat > ubuntu.tar.bz2”

user@machine2:~$ bunzip2 ubuntu.tar.bz2 –stdout | sudo docker load

Hope that helps!

Akademy 2013 and la experiencia

[update: earlier, this was accidentally posted incomplete, this version is the complete one]

This year's gearheads' meetup was in Bilbao which is located in the Basque Country in Spain. The talks were very good and gave a good idea of whats going around in the Qt and KDE worlds. There were people taking Qt to new platforms and others getting your contacts more organized.

The talks

The first keynote was from Eva from EFF where she talked about how the recent revelations affect people outside the United States. Then, Kevin talked about how to use QWidget-widgets in QML, making life easier for developers. This was followed by updates on Qt on BlackBerry and story about the Mer Project and how essential they are in helping Free Software mobile platforms to funciton. Something special this Akademy, we had Jerome from the Razor project talk about the project, it goals and bits about how parts of LXDE were rewritten in Qt. There was also a talk on Plasma2 – the next version of KDE's workspaces which brings in the new feature where Plasma can dynamically load different shells (desktop, netbook, tablet etc).

I had a talk on Pair Programming with KDE where I shared the experience of me and few other KDE contributors working on code together. While there were many different things, the most important realization we had was that pairing was awesome to introduce new contributors to a project's codebase and good practices. (Also, I learnt to never, ever edit your already good slides just before your talk to screw them up 😛 )

On the second day, there were lightning talks by various people, a talk about KPeople – a new metacontact library and a pretty cool demo of dictation by Simon from Peter Grasch. We also had a group photo 🙂


Other than the usual BoFs, there was a very interesting BoF this year around usability testing. Thanks to Björn and Jos, we had a session where people brought in their apps and others volunteered as users to find usability (to be more precise, learnability) issues. We had KScreen, Plasma Network Manager, Plasma Media Center and KStars as the applications and each of them had pretty useful results. There were countless ocassions where a developer would get amazed “omg! I thought that was obvious”.

There was also a BoF around the mentoring program the KDE organizes. We talked about how the programs were going on (and were being planned) and also some of the issues that came up this and the last year. At some point, there was the topic of Indian students being too naive, which is kinda true at times because of the way kids are brought up here. Most of the times, however, just pointing out their exact mistake and ways to improve will do the trick. I say that from personal experience (and I'm sure others will agree). Still, if you believe you've encountered someone who seems from another planet instead of an Asian subcontinent, don't hesitate to ask on #kde-in (or motivate the student to do so).

KDE Mentoring program BoF

There was also a BoF on Plasma Media Center where we explored ways of improvement and the road to the future. More details on Sinny's blog.

There were also some discussions of some magic that's gonna happen in KDE-India next year, but, for now, thats all we'll tell you 😛

Win free copies of Packt’s Linux Shell Scripting Cookbook

I am pleased to announce that I have teamed up with Packt Publishing to organize a giveaway especially for you. Four lucky winners stand a chance to win few copies of the book. Keep reading to find out how you can be among the lucky ones.

The Prize

What you will learn from Linux Shell Scripting Cookbook, Second Edition

  • Master the art of crafting one-liner command sequence to perform text processing, digging data from files, backups to sysadmin tools, and a lot more

  • And if powerful text processing isn't enough, see how to make your scripts interact with the web-services like Twitter, Gmail

  • Explores the possibilities with the shell in a simple and elegant way – you will see how to effectively solve problems in your day to day life

What can you win?

  • 2 e-copies of Linux Shell Scripting Cookbook, Second Edition are up for grabs as well as 2 print copies will be available (for US or UK based address) or any other eBook of your choice from the Packt library.

What do I have to do?


Contest Rules:

  • 4 winners with maximum no. of posts will be selected by me or Packt.

  • Earliest reply/post will be given preference.

  • Contest open till 30-July-2013, so hurry up.


I’m going to Akademy 2013 !

After a long wait, I finally have my visa to Spain to attend Akademy 2013! If you haven't heard of it, Akademy is the annual summit of KDE where gearheads meet to plan the next steps to world domination. We talk about how to create beautiful free software for people to use and to enrich our vibrant community. I am also giving a talk on the fun, and sometimes weird times when I did some pair programming on some KDE software.

Sounds exciting? Well, its not too late, you can still register at

Using QtMobility on SailfishOS SDK

Jolla's SailfishOS SDK was released quite some time back for Linux, OSX and Windows. I had tried it once during that time but only compiled some sample apps until I found some time recently to port one of my N9/Harmattan apps to Sailfish/Nemo.

The problem

The app needed to use the device's GPS system to know its coordinates for which I used QtMobility's location API. However, when trying to compile, the SDK wasn't able to find the QGeoPositionInfoSource header and I found that it was really missing from the SDK's include dir. In fact, the whole QtMobility module was missing.

The solution

SailfishOS SDK doesn't contain QtMobility by default, you have to install it manually. Luckily the SailfishOS SDK control center makes it easy.

  1. Click on the SailfishOS button on the leftmost toolbar in Qt Creator
  2. Goto Targets and click 'manage' in SailfishOS-i486-x86 (it might be different for you)
  3. Scroll down to qt-mobility-devel and install it.

Presto! Now you can use QtMobility in your application 🙂

KDE Meetup at DAIICT Gandhinagar was Amazing

Last weekend, the KDE community in India organized KDE Meetup at DAIICT, Gandhinagar. There were three primary motives behind this-

  • Spread awareness about Open Source software among students
  • Lot of students have misconceptions about real world software (the myth that its very difficult to work on a big project), try to address them
  • Usually all tech conferences, especially FOSS ones are centered around places like Bangalore, Pune etc – give a chance to people in another region

I am happy to announce that the event was a huge success, not just in terms of number but in the quality of response we got and that we met all the three things we wanted to do!


To start with, day 1 was mostly focused on getting people comfortable and answering the questions and doubts they had. Pradeepto Bhattacharya, one of the founders of KDE India community shared his experiences with students on how it matters if you contribute to FOSS when in college. The students appreciated that doing real world software helps to understand the real challenges behind software development.


Going by the general format of pre-lunch talks and post-lunch hands-on, we started by talking about Qt and its fundamentals. The students were amazed by the power of the framework and the day to day software that is built on Qt. KDE developer Vishesh Handa who maintains KDE’s Semantic/RDF system talked about signals/slots with model/view and it was good to see that people were quick enough to co-relate it with traditional MVC (keep in mind that the majority of students were 1st-2nd year students so thats a big deal).
The most interesting part was the post-lunch hands on which the students were excited about, and rightly so – because thats where the fun is. Do something yourself and things start making sense, you start appreciating the beautiful things a small amount of code can produce. Another thing that I have seen in my experiences with students is that version control is one of the things that excites them the most. The realization that there is something that can help you managing your code and that you no longer have to do things like main.cpp.old.old was exciting for them.

You understand how successful you were with the crowd when they come back on the next day and can’t wait for the event to start. The excitement about the new things to learn, the feeling of being among like-minded people was the best start to the 2nd day full of learning. We had talks on the KDE Education suite software which ranges from chemical calculations, physics simulation to word games for children. It was good to know that children in Brazil use KDE software in schools to learn, and so does a remote village in West Bengal. Vishesh talked about Nepomuk – KDE’s Semantic data system and the three functions it performs – index, organize, visualize. He demoed how you can use the system to organize and find your contents – and if you’re creative enough play your favorite dialogues from videos – just wow.


It was a moment of pride for me that we were a part of an event which touched the lives of students – especially the ones who would’ve never got the exposure otherwise. It was amazing, rewarding and people appreciated it and I hope we keep doing awesome things like this.

Along with tweets, you can browse photos from the event-

GNUnify 2013 was awesome

This is a month of FOSS events – and one of them was GNUnify 2013 at Symbiosis Institute of Computer Studies and Research. There were talks ranging from systems stuff like GCC, about Android hacking to KDE development. We met people from communities of KDE, Mozilla, Wikimedia, friends from RedHat and of course the awesome awesome organizers and volunteers.

It is nice to see a Free Software event like GNUnify to turn into a tradition where teachers and students work hard to create what is rightly said a forum to unite open minds.

Day1 of the event had lots of talks including our very own KDE – we planned a full day track on KDE primarily aimed to introduce people to KDE (and Open Source in general) and give them starting tips on how to get started. The talks started with introduction of Qt and a hands-on where people tried writing sample applications. Something new here was that we had to cover QtQuick/QML which these days is the preferred way of doing GUI in Qt, but at the same time we couldn't leave out the traditional QWidget style of doing GUI. This was primarily because of two reasons, first most of the current KDE applications are written in QWidget so people will need that if they want to contribute and secondly the desktop components of QML still aren't widely used.

 Pradeepto on KDE 

We started with the Qt talk and the hands-on was very well received by the attendees. They tried Qt Creator and created sample apps, winning tshirts in the process smiley After lunch Sinny talked about and gave a demo on using QtQuick/QML for writing fluid and modern GUI. This was followed by a talk on getting started with KDE development where we demo'ed a small hack in rekonq (a KDE browser based on WebKit) so that people get confident that its pretty easy to get started. We also spent an hour or so in answering questions that people had in mind about contributing.


The organizers were kind enough to arrange a pool-side dinner for us and it turned out to be a nice opportunity to socialize more, and meet all of the volunteers at one place. And whats more, I got a chance to be picture'd with the ???? laugh


Day2 saw talks on various kinds of topics like Android, Python, Drupal etc and I gave a Plasma Active demo to a group of volunteers. After Day1 which was kinda tiring due to the day long session, the 2nd day was quite fun with meeting friends again and chatting over lots of stuff 🙂 Not only this, we had a nice evening and dinner, thanks to Siteshwar.

(Photos courtesy Sinny Kumari, view full album here )

KDE at GNUnify 2013!

In India, KDE awesomeness never stops, and this is going to be the case even at GNUnify 2013 at Pune. GNUnify is hosted every year at Symbiosis Institute of Computer Studies & Research in Pune and composed of talks and workshops.


What kool stuff are we doing?

Coming to KDE, we have a full day track on Day1 of the event, which is on Friday 15th February. We are going to tell you about what KDE is, how we use Qt – one of the world's most powerful cross platform development framework, what kinds of applications one can contribute to in KDE. The attendees will come to know about the large variety of projects within KDE – from Photo Management to Office Suite to Learning science.

Who should attend?

Are you interested in writing cross platform native applications? Interested in participating in one of the biggest Free Software communities? Or, you'd love to work with awesome people from around the world and learn how to write effective code? If you answered yes to any of these questions, this is for you!

Also, if you are a student, there are even more reasons for you to attend – we are going to make sure that the workshop/tutorials are straightforward so that when you go back home, you'll be writing Qt apps in no time!

Want to reach the KDE India community?

The KDE India community is one of the most biggest and vibrant Free Software communities in India. You can reach us (and join us in creating awesome software)-

Got questions? suggestions on what you want to see at the event? Let us know!

FOSSMeet at NIT Warangal

Ah! It was an exciting weekend, visited National Institute of Technology, Warangal for a talk, and met with ThoughtWorkers from all over India at Goa! smiley

As you've guessed, this post is about the former, I was supposed to give a talk on how to get started with KDE and some git basics. Landed at Hyderabad at around 8PM and after having awesome Hyderabadi Biryani, I travelled to Warangal which took 3 hours. Thankfully, Harshit who came to receive me at the airport was very interesting and we talked about software, economics, to quantum mechanics (!!) laugh Just like talks I have given at other NITs, the hospitality was awesome, really loved it.

I was kinda nervous in the night as I had to cover everything that I planned to, plus some stuff that Pradeepto would've covered but he couldn't come. Decided that it should be nice if I can show the students how to begin with a simple hack, and rekonq – KDE's webkit based browser came in handy. We started with installing git on everyone's laptop, but sadly at around 11AM the whole town lost power, and there wasn't any backup indecision I shared my experiences and story on contributing to FOSS and the take-aways of spending your time on it, and the students practiced some git on their machines after we realized that power ain't gonna come back. I was really happy with the enthusiasm, that the students kept on going until their batteries almost died and even when they were sweating. You see, git ain't that confusing if you haven't used SVN wink

Session on KDE

(Thats the only photo I could get, the organizers were kinda busy with getting the power back that they couldn't click more photos)

We got some power backup from generators the event guys managed to hire, however we still had lack of Internet, so instead of having the students do some small stuff on rekonq, I did a brief interactive demo on how to browse the source to look for the place to put your code to get some functionality. The response was pretty good, and more importantly, more than half of the participants were girls, *and* they were pretty interactive.

The good part– At 4:30 PM I had to rush to the airport to catch my flight to Mumbai and eventually to Goa to join fellow TW'ers for the Away Day. Sitting at the Mumbai airport, I got an email from a girl who was trying some git stuff on her laptop but had some questions. It just feels so nice when people go back and do stuff, looks to be a good beginning.

Awesome job and my thanks to everyone that made it possible, Sarath, Shailja and Harshit – you guys are awesome 🙂

Activating Calligra, again :)

At Akademy, there were lots of suggestions on how we can improve Calligra Active so that its more usable on tablets. We finally found some success if fixing some parts of the view conversion parts that were broken, and implemented some nifty features-

Switch to page

You can instantly switch to any page in a text document using the page list at the left of the screen.

Text search for text documents

Use the little search bar at the bottom to search through your texts

Select and Copy

Just activate the selection mode using the button at the top and you can select text

Slide chooser

Simply put, go to any slide in a presentation

Flick to switch slides

Just flick sideways to goto the previous/next slides


Finally, lots of thanks to everyone that helped with suggestions and especially Sujith H for working on the page switching feature and spending hours on debugging and helping me find out what I screwed up in the view calculations laugh

Comments and suggestions are welcome smiley