Sunday, October 9, 2011

Wavelab with GNU Octave

GNU Octave is the Free Software used for mathematical computation. With an extensive support for versatile library functions, and code compatibility with Matlab, GNU Octave is a sweet treat to every engineer and researcher.

Apart from the officially supported libraries and application toolboxes, GNU Octave also has abundant support and addons from extraneous efforts.

The Signal processing toolboxes, are exhaustive enough and consist of speech processing, image processing and video processing functionalities, which provide a common, stable and evolving platform for any of these domain specific applications.


Taking signal processing to the next level, when one is looking for some advanced signal processing functions, rendezvous with Wavelet Transforms is assured.


While GNU Octave does not officially, as yet , support a Wavelet Transform toolbox, the Wavelab toolbox from the Stanford University project works like a charm. With this extensive background to the toolbox itself, I present the procedure for incorporating this Wavelab toolbox with GNU Octave.
  • Unzip the archive; A folder Wavelab850 will be created with the contents of the toolbox
  • Create a directory /usr/toolbox to dump the Wavelab toolbox
sudo mkdir /usr/toolbox
  • Copy the unzipped contents to the location /usr/toolbox 
sudo cp -r Wavelab850 /usr/toolbox
  • To link the Wavelab library to GNU Octave, open the GNU Octave interpreter in the GNU/Linux terminal, and add the path of the previously added Wavelab850 directory, so that GNU Octave can fetch the Wavelab library files when the function call is made 
octave:2> addpath /usr/toolbox/Wavelab850
  • Now, invoke the functions from Wavelab by running the Wavelab file WavePath.m in the octave terminal, by just typing WavePath in the interpreter.
octave:2> WavePath
  • If the WaveLab has been invoked a welcome message as shown below would appear  

  • Now all the amazing Wavelab functions are available in GNU Octave! 
  • To take a stroll into WaveLab, type WTBrowser. "Chapter 2 Fourier Kingdom" is something every science enthusiast must look into and understand! 

  • Further one particluar example code I was deeply impressed with is the 2-D analysis of synthetic objects ( like images). Type in toon0231 in the interpreter to have some pleasing revelations of Wavelet Transforms
octave:2> toon0231
 Happy Hacking, Happy Learning !
PS: In subsequent posts I will try to regress and give some more fundamental features of GNU Octave. 

Saturday, October 8, 2011

i-freesoftware: My eulogy to Steve Jobs

Well, it might sound abusive to add the i-tag to Free Software, I suppose.

After the demise of Steve Jobs, and the initial outpour of adulation of Steve Jobs and few trickles of criticism, I am late in getting this post up.


Steve Jobs' demise, personally to me has been the loss of an individual who showed people how to fight the odds. Like the many of you, even I too was deeply moved and inspired by his Stanford Speech. There is no denying that he was a man to look up to, and learn from at various levels.

But, when it comes to the perception of the entreprenuer Steve Jobs, there lies a deep disdain for some really important reasons I shall try to putforth in this post.

Steve Jobs: The Entreprenuer is not someone I would really be missing (I wrote this before RMS could say something on these lines); Given the fact that I am at awe with the aesthetics embedded in sleek pieces of Apple hardware, the point of contention is Steve Jobs being the grandest mascot of "Closed, Proprietary Technology" and  in this process Jobs has driven his customers into the most dreadful of the proprietary shackles.

Before a couple of years, while I was in an offline discussion with Eben Moglen, he had expressed serious bitterness towards Steve Jobs and Apple. I later realized it was about the BSD code of the UNIX which all Apple products embed, and also of the initial free software projects which today reside behind Apple's closed doors. And today, carrying on with that legacy, there is virtually nothing that ain't super proprietary and really closed when it comes to Apple.

Further, Apple products apart from being the zenith of closed source software, they are also the certain baton holders of highly closed hardware, and now into the Digital Restricted Media realms, ultimately rendering the users with zero freedom.


And as the brain behind most of the Apple decisions, these are certain moves by Steve Jobs which have made the technological world a really bad place! It might be good for technology, it certainly is not for people!

Although a person who showed courage in battling his life through odds will be missed, a ruthless entrepreneuer and mascot of unfreedom will certainly become oblivous.

People, and their freedom first, is what we believe in the Free Software Movement. 

Sunday, September 18, 2011

Software Freedom Day-2011 @ BMSIT

Software Freedom Day 2008 is when I got introduced to the movement and the awesome community attached to the Free Software. Ever since then, Free Software has been a revelatory experience on a daily basis.


The philosophy of learning, sharing and growing together has been manifesting itself regularly with opportunities of interacting with numerous other like minded individuals.

Free Software Movement Karnataka has been involved in propagating Free Software in various educational institutions. With regular efforts BMSIT in Bangalore will become a prospective Free Software hub.

And SFD, every year is something we look forward to and this year's celebration in BMSIT would undoubtedly be one of the most memorable Free Software meet ups.

This celebration comprised of the ritual of cutting a yummy chocolate cake and sharing the 'joy of freedom'. With this setting the premise I tried to invoke some background to the necessity of freedom in software using Eben Moglen's ideas of "Mathematics as property", which I think conveyed to some extent the need of freedom in software.




It was followed by a basic introduction to Python: The programming language by a couple of students from the college. We were trying to project the scalability and usability of Python.

It was followed by a demonstration of a signal processor based wrist watch by Texas Instruments, interfaced with Ubuntu executing python scripts and some aspects of the features that could be extended by writing simple scripts.




I demonstrated the 3-D module in python mayavi and the tool's super capabilities of simulating 3-dimensional surfaces and volumes. There was also a demonstration of solving second order ordinary differential equations using python, which was hopefully of some use to the students gathered there.

In all, this SFD was eventful in Bangalore, while the celebration at BMSIT was only one of the numerous other sessions we had planned to conduct.


Free Software is the future,
The future is ours.

Thursday, September 8, 2011

Migration to FOSS at BMSIT

As sprint events to Software Freedom Day, and celebrating Software Freedom the second of the sessions in BMS Institute of Technology was organized today.


After a session on FOSS approach towards Privacy and Security in the Internet for students, a full day workshop aimed at facilitating the faculty members of Electronics and Communication Department of BMS Institute of Technology to migrate onto GNU/Linux platform with equivalent tools to most of the ubiquitous tools used in the ECE academic scene were demonstrated.

The overall response was overwhelming, and very positive. Being the ECE Department the speaker for the session Mr.Prabodh and myself was preparing to brace for a colder audience with some natural hesitation. But, on the contrary we found everyone really interested in the gamut of tools with unadaunted enthusiasm till the end of the day. Numerous tools available for the various topics to be dealt in teaching the curriculum. Through the day, interaction was highly productive with proactive queries and discussions.


There is a pressing need for the academic institutions to migrate to Free and Open Source Software knowing the entire depth of positive ramifications of the tools and the philosophy behind the tools. I am glad that my alma matter has taken this step. We at FSMK are  certainly looking forward to sustained efforts to perpetuate the momentum instigated by today's sessions.


And talking specifically about Electronics related tools in the GNU/Linux domain, a special push is required to bundle these marvelous tools already available with comprehensive manuals. This way first smooth migration and prospective contributions can be hoped for.

A big shout out to all who were part of today's workshop. Cheers!

Wednesday, August 17, 2011

Right Click, Refresh Desktop in Debian/Ubuntu

Windoze users when switching to Debian/Ubuntu or any other flavours of GNU/Linux seem to have a hangover of some futile actions, that one would get used to while being desperate on the Windoze environments :D

And if you seriously are missing the "refresh desktop" options on the GNU/Linux environments, just to demonstrate the power of Free and Open Source Software, and the freedom they provide the users with, here's a small tweak which gives the "Refresh Desktop" option.

By the way, F5 on Debian/Ubuntu still perform the Refresh blink. This tweak is to add the Right Click -> Refresh Desktop option.

1.Open terminal (ctrl+alt+t)
2. Install the the nautilus (default file browser) menu configuration tool and the lineakd is the daemon that runs in the background of an X session and listens to incoming events from multimedia buttons

sudo apt-get install nautilus-actions lineakd

3. Create a directory to dump this and anymore future tweaks you might be performing to nautilus

mkdir nautilus-scripts

4. Enter the new directory,

cd nautilus-scripts

5. Create the script file,

gedit refresh-desktop

6. Copy these contents in the file (this will perform toggling of F5, and hence the refresh !)

#!/bin/bash
xsendkeycode 71 1
xsendkeycode 71 0

Save and close.

7. Make the script executable using chmod.

sudo chmod u+x refresh-desktop

8. Now, the script is ready, we need to link it to the action. And to add the right-click -> Refresh Desktop short cut, go to System -> Preferences -> Nautilus Actions configuration,

9. Create a new action


10. Change the context label to "Refresh Desktop", or "Mimic Windoze", or anything that pleases you :P

11. Check all the "Display Item options"

12. In the command tab, click on the browse option of Path, and link the refresh-desktop file in the directory "nautilus-scripts" created in step 5
13. In the conditions tab, select "Both"
14. Record all changes, or Save
15. Logout and login
16. And there you go! No more missing a futile action :P

Friday, August 12, 2011

GRUB and Reinstalling GRUB : Debian/Ubuntu

GNU GRUB is a Multiboot boot loader. It was derived from GRUB, the GRand Unified Bootloader, which was originally designed and implemented by Erich Stefan Boleyn. 

And playing around with GRUB to get multiple Operating Systems indexed and to make them available for booting is as awesome as it could get. 
The sheer scalability GRUB has to offer in terms of the number of OS'es it can index is superb. I have gone up to six different operating systems at one point of time, and currently am running five. And that doesn't still represent the number of OS'es that can be multi-booted via GRUB. It is only constrained by the space on your hard drive!

My current Grub entry
While trying the tricks of installing multiple operating systems, if care is not taken the latest OS will overwrite the GRUB and if it ain't a GRUB based bootloader (as would be the case when the last OS is M$ Windoze, or sometimes even Redhat!) the entries of other OS will be lost. 

GRUB on the top of Ubuntu/Debian are the best to retrieve and index all the installed OS. 

Here are the steps for reinstalling GRUB at the MBR for an Ubuntu/Debian distro. 

  • Get hold of a Live CD/Live USB stick with either Debian or Ubuntu
  • After entering the Live user environment, spot the ext4 partition of the Ubuntu/Debian
  • To get to know the partition where the hidden Ubuntu/Debian is installed, usually   
sudo fdisk -l
would suffice. Or gparted is another tool which could be of help
  •  Once you've got to know the ext4 partition, then mount it in the Live environment 
sudo mount /dev/sda5 /mnt (assuming that the ext4 partition of the hidden Ubuntu/Debian install is on sda5)

  • Now, reinstall GRUB :)
sudo grub-install --root-directory=/mnt /dev/sda
(GRUB will be installed on the MBR of sda)

And you're done!

  • Now, boot into your Ubuntu/Debian distro which was running on sda5 (in the example) and run  
sudo update-grub

This will generate a new grub.cfg file as shown in the image above.

Monday, August 8, 2011

War of the social networks



After the long standing browser wars and the still continuing Operating Systems war , we are now at an epochal internet phase where the Social Networks are competing vigorously with each other.

From the Myspace days of celebrity social networks, to the now almost oblivious Orkut, social networking has had its course of metamorphosis. But, the credit of making Social networking a global phenomenon undoubtedly rests with The Social Network- Facebook. With all its flaws and contentions, Facebook boasts of a humungous user base, and stands third in the global population index, only after China and India!

When such is the reach of social networks, the crucial nuances pertaining to the fangs of the Internet like privacy, security and freedom for the users are little spoken about by the mass of the users, or are at least kept obscure to the users by the major players.

Privacy and Centralised Social Networks:

Prof.Eben Moglen calls monopoly networks, or the centralised social networks like Facebook, and the recent Google Plus, as large spying machines, and so, for valid reasons. Users have voluntarily surrendered intimate and delicate data to corporations like Facebook and Google, respectively. With the increase of the un-freedom in the internet, there are high chances of misuse of this data by the corporations either for profit or for information gathering, without the full consent or understanding of the users using their services.

Looking back at the initial days of the Internet, when conceived it was an autonomous conglomeration of end user machines present at the edge of the network. It was decentralized, free (as in freedom) and neutral (as in unbiased). But this fundamental trait of the Internet has eroded substantially, rendering the Internet vulnerable to severe censorship and manipulation by the big players of the Web.

Social Networks, give a comprehensive case study of all that the Internet was supposed to do, and is somewhere failing to do.
Diaspora : The Distributed and contextual social networking, mode of online socializing has been unleashed by the Free Software community. This will hopefully try to emancipate the Social Networking aspect of the Internet.

Knowing the perils of the devils:

  1. Privacy: The privacy terms of be it Facebook or Google Plus are apart from being obscure, ultimately end up conveying the fact that the users' data will be not be given the discretion it deserves, on the contrary will be traded with third parties.
  2. Security: The fiascoes of account crackings, floods of spams and unsafe content on these networks is certainly worth severe scrutiny.
  3. Data ownership: Even when the users have deleted their account, there is no guarantee that the users' data is off the servers, and in many cases it still resides there.
  4. Mandates: Users are at the mercy of the corporations for the features and applications which flock the users' profiles, with little or no role to the users in setting up the framework of their social network. Ex: The recent chat application updation in Facebook has created a lot of disgruntle amongst the users, but there is little that the users can do about it. 
     Google Plus and its privacy policy

  1. Mad Ads: Personalized marketing of products and services using the personal data handed over by the users is a nuisance which has certainly annoyed lots of users.
An instance of a friend's personalized ad on FB!

Getting to know Diaspora:

Diaspora is the social network that puts you in control of your information. You decide what you’d like to share, and with whom. You retain full ownership of all your information, including friend lists, messages, photos, and profile details. Diaspora was kick started by four talented programmers from NYU Courant Institute, after having heard Professor Eben Moglen talk about “lack of privacy and free spying in the cloud”.

Diaspora doesn’t expose your information to advertisers, or to the games you play, or to other websites you visit. It’s inherently private.

Diaspora is not a single site — it’s a collection of different sites, with different URLs, run by different people. But they all run the same software, and they all talk to each other. Each server is called a “pod.” As the service grows, lots of these pods will join the Diaspora network.
The official pod, run by the project’s founders, is http://joindiaspora.com. Because Diaspora is a Free (as in freedom) Software, these 'Pods' can be installed and run even on a personal computer, and be made available to users on a small network for online socializing, like they would on any other centralized social networks. Also, as the source is available the users are free to tinker aroud with the features and share the modified updates!
Diaspora, by the virtue of being a Distributed Social Network, ensures privacy while still keeping the users connected and, not connectedness at the cost of privacy like in the major centralized social networks. With Diaspora, users will be reclaiming all their data, get connected on secure social connections, while sharing the data at their own terms.
Future of the Social Network Wars:

With the arrival of Google Plus, and the previous experience of failures with Google Buzz and Google Wave, Google seems to have hit the right chord this time around. Facebook-ers have been looking for an alternative and Google Plus might offer that respite.

Diaspora, although is the right antidote to the centralization of social networks, it might not well the replacement to the centralized mammoths like Facebook and the growing Google Plus. To envisage the future of Diaspora, I might concur with a Diaspora friend-Peter Rock-Lacroix, who on his blog writes the following:

Putting aside social pull and the goal of market power, I think the success of Diaspora should be measured similarly to the goals of the GNU Project. While advocates of software like the GNU/Linux operating system enjoy hearing news of market success, they see the existence of free software itself as the most important success, rather than growing popularity. Maybe there will only ever be enough capital behind Diaspora to sustain a niche market or perhaps, it will come to the mass market. Regardless of that, even if a small network of users exist who can run their own privacy-aware, free personal web server, that’s a success too.”

In the next article, a feature wise comparison between these social networks, along with the steps to install a Diaspora Pod will be presented.

Raghavendra S
(raghuarr@joindiaspora.com)

References:
http://gnuosphere.wordpress.com/2011/06/30/will-diaspora-succeed/

(My article published in the August 2011 edition of the FSMK newsletter
http://www.fsmk.org/newsletter9 )