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 )

Wednesday, July 27, 2011

DNS and DNS flushing in Ubuntu

The Domain Name System (DNS) is a hierarchical naming system built on a distributed database for computers, services, or any resource connected to the Internet or a private network. Most importantly, it translates domain names meaningful to humans into the numerical identifiers associated with networking equipment for the purpose of locating and addressing these devices worldwide. (Wikipedia)

Translating URL's to point at the IP addresses of servers is an important portion of the Internet browsing. There could be multiple levels of DNS resolutions happening to expedite the browsing experience of users.

On a GNU/Linux machine, if the user is aware of the URL and IP address of a host, he/she can make a manual DNS entry on the /etc/hosts file.


To view and add the DNS servers the host machine is using, the file to look at is
/etc/resolv.conf

Further, caching the DNS entries ( mapping of URL's to IP addresses) is a feature used to avoid the repeated Domain Name resolution iterations. But sometimes, when a single URL points to multiple servers ( like google mail etc..), and when secure sessions on different servers are established the chances that one of the servers would not resolve might occur.


During such instances, the DNS cache has to be flushed. The first and simple command which has to be manually run to flush the DNS cache is dns-clean.
It can be invoked by the following command:

raghu@fossphosis:~$ sudo /etc/init.d/dns-clean


But, repetitive invoking of this command might get on to the nerves of the users, and a daemon to automate this task is NSCD (Name Server Cache Daemon).
NSCD automates the DNS table flushing and refreshing process at the back end.
NSCD on Ubuntu can be installed by the following apt-get command.

raghu@fossphosis:~$ sudo apt-get install nscd

Fine tuning of the refresh rate and time-to-live of the DNS entries can be altered by changing the values in the configuration file /etc/nscd.conf

Wednesday, July 6, 2011

FSMK Newsletter Revamped and back!

FSMK Newsletter is back, and will get better.


Please share and spread this Newsletter to as many people as possible.
For, Sharing is Growing :)

Do send in your articles for the coming editions...

http://www.fsmk.org/node/79

http://fsmk.org/sites/default/files/FSMK_Issue8_July_2011.pdf

Tuesday, June 28, 2011

Reinstating freedom in the Internet

The Internet when conceived was an autonomous conglomeration of end user machines present at the edge of the network. These terminal machines were talking to each other using the infrastructure provided by the Internet Service Providers (ISP's). The only arbitrators in the Internet were the standards organization (like ISO, IEEE), which made the nodes on the Internet to follow universal protocols for intercommunication.
The Internet was simply 'decentralized'.
P2P networks

The Internet has been the grandest manifestation of democracy of the users. It has been free (free as in freedom ) and neutral (as in unbiased) until the late 1990's. Starting  then, the Governments, primarily of the developed countries, in the name of making the Internet safer and secure have tagged with some of the big profit seeking corporations in the world wide web to monitor and influence the way the Internet works. The Internet today is no longer neutral and/or free; From being decentralized it is steadily converging to become a Centralized infrastructure with little or no freedom to the end users.

Centralised Server based networks
The closest to what the Internet should be resembling in the current scenarios is the Peer-to-Peer mode of networking. In this architecture, every end user apart from being a client, is also a server.  This is in contrast with the rest of the services in the Internet where we have the Single Server- Multiple Client model. This model is called the Centralized model, where the online transactions occur between the mandating, giant servers and the helpless end users. This deterioration of the democracy in the Internet reflects a major invasion into the privacy of the users and more importantly infringement of the political freedom of the users as well. The case when the Internet services for Wikileaks was withdrawn by the corporations succumbing to the pressure of their Government is a direct manifestation of the impact that Centralization of the Internet can have.

As users, the point we need to be concerned about is the safety of the data we entrust to the biggies in the Internet. Every time we are online, there is almost a certain chance that either we are being spied, or our data is being used for increasing the business on the Internet.

One prospective solution to reinstate freedom in the Internet is, by the decentralization of servers, and giving the full control back to users. Decentralized Internet will comprise of not few servers where all the users will have to mortgage their data, but when fully decentralized, every user will end up having a small, cell phone charger sized Open Plug servers like the FreedomBox.
The FreedomBox again has been an initiative instigated by Prof.Eben Moglen of the Software Freedom Law Centre and now the Debian Community of Free Software developers have kick started the project to set the Internet free.

To visualize it better, consider the current model of online Social Networking: About 500 million users on one famous Centralized Social Networking site have handed over all of their data to a single bunch of servers, after endorsing heavily privacy invading terms and conditions. Statuses, chats, pictures and the private interaction between users on the network is all under the scanner of on single Corporation.

To tackle such hegemony in the Internet, a new model of social networking is being tested. Distributed or Federated Social Networks, like Diaspora will decentralize the way online social networking will happen. Instead of all the users handing over their data to a server farm belonging to a single corporation, users can now put their data on smaller, independent servers like campus servers (called Pods) and get networked with other pods. In this way, the centralization can be reduced from a single hegemonic server cluster to decentralized, independent servers. The best part of this decentralization is that this decentralization can trickle down to the last of the users.



Using the Plug servers such as FreedomBox, individual users can run their own Diaspora Pods, with all the data residing in their personal mobile servers, which will communicate with other pods. Users will have total control over the data, and the extent of its availability to other users and even to the Internet.

This model of decentralization using FreedomBox like open plug servers will not only increase the privacy and security in social networking, but in near future will be applicable to mails, voice-over-internet phone calls, making the Internet neutral and democratic, reinstating freedom back to the users.

PS: The initial writeup for the recently published article in The Hindu , which was later optimized to concentrate mainly on Diaspora*.
http://www.thehindu.com/news/cities/Bangalore/article2132236.ece



Tuesday, June 21, 2011

Swecha Free Software Workshop

Swecha does it all in the big way.

 The ongoing 15 days Free Software Summer Camp in Hyderabad is by itself the first of its kind in India. The workshop is targeting students pursuing technical education and to enable them with the gamut of Free Software technologies which are in use in Industry.  Swecha team claims to have a modest number of about 600  students gathered for the 15 days Free Software Workshop happening in CBIT-MGIT, Hyderabad.

Swecha is the senior counterpart of the Free Software Movement - Karnataka (FSMK); both being part of the Free Software Movement India(FSMI), have everything but the regional geography in common.

Free Software in the air by alone was sufficient to draw someone like me into the ambiance of the workshop, but adding to it was Swecha as the host. I did pull one of our budding activists along this time, and I'm hoping he did get motivated further to carry on his work. The warm and amicable team with my fellow activists there is always an occasion not to be missed. And it proved right yet again. By the way, the experience of organizing an event of this scale is by itself a huge learning experience.












 Comprehensive theory sessions to start the day, followed by marathon lab sessions in about 20 labs all running Debian has been the routine everyday. Although the network has been something less than an adequate one, machines have been arranged for evey participant to work on.

The fifteen days are divided into five three-day modules to enhance the focussed exposure students would be getting on the technologies.
  • Making of a Computer Suite  
  • Programming using Software Carpentry aspects 
  • Mobile Computing 
  • Multimedia 
  • Content Management Systems      
Each of the days, after the regular sessions and labs,some important complimentary sessions have been organised to enable students on the non-technical aspects of the gamut of technologies they were handling in the evening. Sessions on the philosophy, policies, licensing and social ramifications of the technology are being held on a daily basis, which are equally important when compared to the technologies.

 









On these lines, I handled a session on Distributed Social Networking, taking Diaspora as an example. The importance of Internet to become decentralised and for the users to have control over their data in the current context of Internet technologies were touched upon in my talk. The overall reception of the talk was good, and there was some good interaction about the same all through the day.
 

Apart from serious tech sessions, labs and talks, a bunch of team-events and culturals are also in the line up for the days to come. There have already been a couple of team events which got all the participants enthusiastically engaged.

My stay at the camp was for less than 48 hours, nonetheless was a very good experience. There are better and more exciting sessions,talks and interactions in the days to come. Speakers of the likes of Prabhir Purkayastha, P Sainath will be participating in the camp, and I so did not want to miss them.

Now that I'm back in Bangalore, FSMK is working on a scaled down version of a workshop of this kind. Will keep you all posted about the updates from FSMK.