Sunday, December 29, 2013

Login with 2 users in one terminal

Requirements : Ubuntu OS

1. Open terminal

2. Set root password incase you dont know
sudo passwd root

3. Create another user, say alice
sudo useradd alice

4. Assign password to alice
sudo passwd alice

5. Open another tab in the same terminal and type
su - alice

6. Likewise you can add as many users you wish on the terminal and make users interact with each other simultaneously.

7. But if you try to do any sudo command then it will give you an error
alice is not in the sudoers file.  This incident will be reported.

8. Exit alice user
ctrl c

9.  For that, open a file
sudo gedit /etc/sudoers

10. Add line in the file
alice ALL=(ALL:ALL) ALL

11. Close the file

DONE!!!

Saturday, December 28, 2013

Important Firefox Add-ons

1. QuickJava
Enables javascript/java/flash/silverlight/.... on browser.

2. Wisestamp
Enhances your webmail signature in gmail,yahoo etc.

3. Make Address Bar Font Size Bigger
Make the url address font size bigger

4. Selenium IDE
Add-on testing tool.

5. Flash and video Download
Downloads online videos
Description: After installing the add-on, restart the browser. Go to the link from which you want to download the video. Click on the top right corner gray square like with a down arrow icon on the navigation bar of the browser. You will see the name of the video playing in the dropdown. Select it and it will automatically ask for location in your system to save the video. Choose the path and click save. The video will get saved.

6. Abduction
To take screenshot of a region on webpage.


wget command

wget utility retrieves files from World Wide Web (WWW) using widely used protocols like HTTP, HTTPS and FTP. Wget utility is freely available package and license is under GNU GPL License. This utility can be installed in any Unix-like Operating system including Windows and MAC OS. It’s a non-interactive command line tool. Main feature of Wget is it’s robustness. It’s designed in such way so that it works in lethargic or unstable network connections. Wget automatically starts downloading where it was left off in case of network problem. Also downloads file recursively. It’ll keep trying until file has been retrieved completely.

Install wget in linux machine
sudo apt-get install wget 

Create a folder where you want to download files .
sudo mkdir myimages
cd myimages

If there are 20 images to download from web all at once, range starts from 0 to 19.
Right click on the first image and choose "Copy Image Location"
Type in terminal
wget http://example/img{0..19}.jpg ---that image location

If you want to convert all the downloaded images into one pdf then
convert img{0..19}.jpg slides.pdf

DONE!!!

Change Bluetooth name in Ubuntu

Requirements : Linux : Ubuntu

I have Ubuntu OS in my system(laptop). There are situations when I want to transfer files from my tab3 to my system through bluetooth in IIT. As all the systems in IIT are configured with Ubuntu OS, all system names are 'ubuntu-0'. It is quite confusing as to which system my tablet is getting connected.

So I changed my system's name. The procedure to do so is as follows:
1. Open your terminal
2. Type
cd /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/

3. sudo gedit config

4. change name 'ubuntu-0' to anything you wish.
5. close the file
6. Reboot the system


DONE!!!

Sunday, December 1, 2013

Chat Project with SVN

SVN is version control system.   


1. Install SVN on Linux 
$ sudo apt-get install subversion
 

2. Install Apache
$ sudo apt-get install apache
 

3. Now we want to configure apache to run HTTPs.
Following command will enable ssl Apache2 module with a2enmod (cryptic name for “Apache2
enable module”:
$ sudo a2enmod ssl
 

4. Now configure the SSL site. Fortunately we already have the configuration file for that, we just
need to enable it with a2ensite (cryptic name for “apache2 enable site”)
$ sudo a2ensite default-ssl


5. As we made several changes I prefer to restart apache with
following command:
$ sudo /etc/init.d/apache2 restart


6. First of all, we need to install the Subversion modules for Apache2.
$ sudo apt-get install libapache2-svn
They will be enabled by default. So you don’t need to run a2enmod.
We only need to configure a repository. Let say our project is called ‘myproject’.


7. First of all, let’s decide where our svn repositories will be created. I like /var/local/svn
$ sudo mkdir /var/local/svn/


8. Then let’s create the repository using following procedure:
$ sudo mkdir /var/local/svn/myproject
$ sudo chown www-data:www-data /var/local/svn/myproject
$ sudo -u www-data svnadmin --config-dir /etc/subversion create /var/local/svn/myproject
Above commands will ensure that the user www-data (which is the apache user) can fully access
the repository for reading and updating it.


9. edit /etc/apache2/mods-available/dav_svn.conf
using:
$ sudo gedit /etc/apache2/mods-available/dav_svn.conf
And add a section like the following one:
<Location /svn/myproject>
DAV svn
SVNPath /var/local/svn/myproject
AuthType Basic
AuthName “My Project Subversion Repository”
AuthUserFile /etc/subversion/myproject.passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
In the above file we indicated that, at the location svn our repository should respond. And for
updating the repository we want a valid user. As per above configuration anonymous consultation
is allowed; but you can disable it commenting with a leading ‘#’ the lines <LimitExcept ... and
</LimitExcept> or just removing them as in following example:
<Location /svn/myproject>
DAV svn
SVNPath /var/local/svn/myproject
AuthType Basic
AuthName “My Project Subversion Repository”
AuthUserFile /etc/subversion/myproject.passwd
#<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
#</LimitExcept>
</Location>



10. valid users need a password, and in fact we indicated a password file for our repository
called /etc/subversion/myproject.passwd. So let’s create a password file with a couple of users:
$ sudo htpasswd -c /etc/subversion/myproject.passwd foss
$ sudo htpasswd /etc/subversion/myproject.passwd trupti
The -c option indicates that the password file should be created as new; and it is only necessary for the first user. Be aware of the fact that -c overwrites the existing password file without asking
anything. 


11. Let’s reload apache configuration to make the changes effective:
$ sudo /etc/init.d/apache2 reload


12. And let’s test with the browser that our svn repository is now accessible through HTTP and HTTPs
at following urls:
http://localhost/svn/myproject/
https://localhost/svn/myproject/
Now we can download our project using svn under my home/Subversion
root@trupti-HP-630-Notebook-PC:~/subversion# svn co https://localhost/svn/myproject
Checked out revision 0.
The first time it will prompt for accepting the SSL certificate, answer to accept it permanently (p).
Then it will optionally ask you for the password, type it.
Since its a new project that i am starting so there is no file in my repositories. The word Check out
revision 0 says how many time the code is committed.
Now i am creating a new file in my local working copy
root@trupti-HP-630-Notebook-PC:~/subversion/myproject#vi sample.php
Hi this is sample testing
Now i had saved the file
svn add filename” will add the files into SVN repository.
root@trupti-HP-630-Notebook-PC:~/subversionmyproject# svn add sample.php
A
sample.php


13. Commit the added file to Repository
Until you commit, the added file will not be available in the repository.
root@trupti-HP-630-Notebook-PC:~/subversion/myproject# svn commit -m "new file added
sample.php" sample.php
Adding
sample.php
Transmitting file data .
Committed revision 1.
Now we have added the file sample.php to our repository. Now we will delete our local copy and
freshly we can download the project from the repository and make whatever changes we want.


This is how we set up the SVN Repository and Work with it.

* Now we shall use svn on a public code repository https://code.google.com/ .
* Create a demo project with a text file chat.txt
* Add content in the file example "trupti:hi"
* Tell your friend to run the command (top one) for checkout in source tab
* It will check out the project in his machine.
* Make some changes to that file example "ayesha:hows u?"
* Then do an svn commit
* When it asks for username, add the gmail id and for password go to profile->settings in the link.
Normal repo is just local to us.
Only difference to local thing and this is that our central repo is now on google code.
HAVE FUN....

Thursday, September 12, 2013

PyCon India Bengaluru

"Be cordial in open source or be on your way"
"Code solves problems created by humans"
                                          
29th August 2013, the day of Dahi Hundi festival, just came back home from Dombivli where my play(theatre) friends, Digambar Acharya and others have their rehearsals. The trip wasn't planned at all. I called my uncle and told him about the event and the location. Without a second thought he told me to book the flight tickets and forget the worries of accommodation.
I was new to Bangalore and it was my very first outing all over alone. The decision was taken in such a haste that I couldn't apprise my friends too.
It was 9pm and that time my colony guys were forming human pyramids to break 2nd Dahi Handi. It was a great time watching all pals playing music, dancing, eating, & forming human pyramids.
Vidhana Soudha
30th Aug: Next day morning, I went to office. Taking half day leave after lunch, I had my flight @4.20pm to Behngaluru. As it was cutie Yashu's(at who's place I was going to stay in Bengaluru) birthday, I got chocolate tin pack for her.
As usual Air India flight got delayed by 1 hour.

At Bengaluru, Yashu, and her parents had come to receive me. It was after 10 years I was meeting them.  They actually belonged to Hebal, Bengaluru. Reaching their place, I met another cutie, Sonu(their pet dog).

After rejuvenating ourselves, we went to meet Yashu's cousin Mangala and her family.

31st Aug: Second day of Pycon but first day of actual conference @NIMHANS, Hosur. On 31st and 1st there were conferences while on 30th there were workshops.
There are pycon in various countries. In India it happens at Bengaluru. Very well organised with proper mailing list. With one registration you can enjoy talks, free wifi, breakfast, lunch, snacks, goodies & t-shirts.  There were 3 auditoriums at NIMHANS with talks going in all 3 simultaneously as per schedule. view http://in.pycon.org/2013/

Schedule(talks in brief):
"Nanu Bengalurige Pycon attend maadalu bandiddini" was taught to me by one of my Pycon attendee. 

* Keynote talk by Kiran Jonnalagadda
Paradox:The more the less is the code, the more good is the code. Then what if no code at all?
Bootstrap developer : Twitter
Flask : everything in api and no need of doc and lightweight
Denied : the next generation python micro-web-framework

* First talk by Shrinivasan : zeromq in which client creates a socket and assumes there will be a server. Any order client first then server http://zero.mq

* plivo : graph by Kunal Kerkar
carbon : daemon
whisper : db

* Chetan Giridhar-real time communicationautomated chat

* Panel discussion: Prabhu Ramachandran, FOSSEE, IIT Bombay one of the panel member:
Q.Should there be python for non-engineers?
Panel: Depends on the need
Example of spoken tutorial which is e-learning of FOSS.
It is always important to learn simple language like python.
If not then go and learn machine language.
Teachers are only teachers not learners & python cannot change their attitude.

That evening after conference, we went to Mantri Mall where we entertained ourselves at amoeba, scary house and finally dinner at Rajdhani (36 items thali) Hotel. On the way I saw Vidhana Soudha, Lalbagh botanical garden, Kalashetra, UB city, Chinnaswami stadium & golf area in Bengaluru. I heard songs like "Krishna Ni Begane Baro" which was playing in the car on the way.

I heard Kannada version of "Kadhi tu" Marathi song from the remaked kannada movie of Mumbai-Pune-Mumbai.


1st sept:
* ulrlib2 kenneth(heroku)

* Sudar Muthu @sudarmuthu (Rasberry pi) github.com/sudar
1. Need voltage regulator
2. Combination of arduino and rasberry pi is best
3. Usage of LED in hardware is like "Hello World" program in software. 
4. Require to install python-dev

5. 3.3v max 1.7v resistance
6.Create file connect led to rpi and then run
sudo ./filename.py

Various projects with python and Rasberry pi(pi stands for python)
1. Brightness program
2. Button on off program
3. pycam : face recognition

Miscellaneous Facts discussed in PyCon:
* Difference between Raspi and Beaglebone
* What is Spider trap?
* Python + staf is used to run test case
* Use of Decorator tool-to know on which module to execute
* What is fabric module?
* What is foo bar?
For details you can watch videos on twitter.
There were also openspaces conferences. In openspaces there  were talks, seminars & contests.


That evening we went to Maiya's restaurant and shop. I bought appe midi and puliyodhara. We had Karnataki delicacy there.

2nd sept: Flight @10.20am back to Mumbai. In flight I met a GSB girl Sheetal Bhat, who works in Cleartrip. From a stranger to a good friend in one hour.
Bengaluru can be portrayed as a city with a beautiful weather. I am really missing Yashu, Mangala and everyone there. I really owe them for the care and affection they gave like my family in those three days.

Saturday, September 7, 2013

CryptoParty Mumbai





What is CryptoParty?
CryptoParty (Crypto-Party) is a grassroots global endeavour to introduce the basics of practical cryptography.A CryptoParty is a hands-on training program  where we introduce Internet users to the tools that help in protecting privacy in the online world. The training program will teach the ways in which communications and data can be encoded to prevent disclosure of their contents through eavesdropping or message interception, using codes (2), ciphers (3), and other methods, so that only certain people can see the real message.

It was my first CryptoParty. I was introduced to such a party by my buddy, Parin who had already attended it in Delhi this year. This week I read a mail on ilug-bom mailing list that they are organising in Mumbai at VJTI college on 7th Sept 10am-1pm.

I considered it a very good opportunity to meet and interact with open source enthusiasts and privacy concerned maniacs. I registered online for the party the day before. On 7th morning, the party was organised at CS lab of VJTI.
Disappointing part: 
1. Less participants as many people are unaware of such events. 
2. VJTI CS lab doesnt have Linux in all its machines.
3. There was no wifi availability for grand workshops nor there was freedom to use proxy network in the lab.
4. No proper organisation of the event although the event had good quality presentation. 

Gradually by 11am, there was atleast respectable number of participants for the party. 
The response from all the participants was great. I met a freelancer technology journalist Ms. Rohini with whom I could interact after the event too.
The volunteer who organised this event was Nikita Belavate from wikipedia-mum and Free Software Movement Maharashtra (FSMM).
The presentation was conducted by Surendran Sir surendran.info/.
Free Software Movement Maharashtra (FSMM) in association with Software Freedom Law Centre (SFLC) had organised the cryptoparty.
 

Agenda:
Introduction
Browsing Security

TOR
Browser security
Password Management

Email and IM Security

Web based email
Email clients (thunderbird)
Mail encryption
 

The contents in brief were as follows:
* Google: The Godfather who gives away your data to the advertisements. So next time if you get bugged by ads which already has your name on it, you know the culprit.

* Collusion is an addon by which you can visualize who's tracking you in real time.

* If you think you are safe and not getting tracked, take an example of my friend who was searching for a 4 slot toaster which actually comes in 2 slot in Amazon.com. He failed to get it.
Next week he got a mail from some other e-commerce site which recommended him few toasters.Do you still feel you are safe? Did'nt you experience such thing? Or you trying to be oblivious as the usage of such sites is inevitable? If its inevitable atleast you can prevent them from tracking you. Every individual is concerned about his/her privacy policy. You are booking a flight for a vacation on a site say makemytrip.com. Google, makemytrip, bank  etc. already know you are going on a vacation. When you are concerned about who encroaches your house then how can you allow someone encroach your profiles and access your data. No thing is 100% secure on internet but we atleast can do our best to be safer although can't be safest. Such encroachment is nothing but data mining.
Humor : Target corporation, a supermarket in US already knew a woman was pregnant before she declared. That supermarket tracked the products she purchased and calculated the months and date.
Did you know Twitter firehose sells tweets to advertisements?
Metadata is nothing but some sites can access your data after data by accessing just your email id.

* Best OS is TAILS https://tails.boum.org/.

* Best browser TOR.

* openpgp for encrypting your mails in thunderbird.

* Install add on https finder/everywhere for secured search.

* Use browser extension DoNotTrackMe.

* Use passwrd manager keypass.

* In chrome, if you save passwords, then in settings you will get list of passwords you have saved for sites and any one who will get access to your system can view the passwords. SO NEVER SAVE and use lastpass password manager.

* VPN : Another secured internet access.

Sunday, May 19, 2013

Debian Project News 10th issue


Thanks to Parin Sharma, organizer of the successful Debian Release Party for our course, MSc FOSS. Here is the link http://www.debian.org/News/weekly/2013/10/#wheezy for the Debian Project News 10th issue where there is a special mention of our release party in India. TOAST TO MSCFOSS!


Follow Us:
Praveen A
Parin Sharma
Trupti Rajesh Kini



 

Monday, May 6, 2013


India: MScFOSS Guest Lecture


  • When: 05.05.2013 during 1800-1900 HRS IST
  • Where: MScFOSS Guest Lecture
  • What: A virtual party in our guest lecture ( basically using BigBlueButton )
  • Provided: A real cake would be there( but you have to come to Delhi to have it :) ) and also some whistles/drums/instruments, with people in different locations....
  • Bring: A headphone with mic, webcam, and flash plugin, just try it out on http://demo.bigbluebutton.org
  • More info: If any Debian Contributor/Supporter wants to speak at this event, please let me know, mail me on parinDOTsharmaATgmailDOTcom, (and login details will be mailed to your id, please do it at least a day before party) 




    It was a Fantastic party organized by my course mate Parin Sharma on 5th May 2013.
    The party started with Cake cutting ceremony by Parin from Delhi(envy him :p). We had this virtual party through BigBlueButton which has audio video sharing capacity where our usual course lectures take place. For more info on our course visit http://cde.annauniv.edu/mscfoss/Background.html.
    Later we had Guest lecture by Praveen A.
    Praveen is involved in the Debian-IN project on Alioth, aimed at
    the maintainance of packages related to support of languages of
    India. 
    You can find him active on diaspora.
    It was a great day and never knew even a virtual party could be so much fun.
     
     

Saturday, April 6, 2013

Open Source life

It was my second year BCA, year 2010 in SNDT university. We had a seminar by Mr.Krishnakant Mane who gave a workshop on Python and Orca. It was really an alluring workshop. We were naive to FOSS and were astonished when we saw a visually impaired person using a computer with the same ease as we do. For the first time I came across one of the distros of linux called Ubuntu. I was aware of linux but never used any such stuff. In the first year I had basics of Unix so thought it might be a genre of it, that is command driven. But it was devils advocate to my thoughts. Ubuntu has a very good user interface and not at all just command driven. We were really inspired by the way Krishnakant sir presented this new(for us) technology.
That day we were introduced to this new world of open source for the very first time. This even encouraged all SNDT branches to incorporate open source in the syllabus. Thanks to Mr. Shitole, H.O.D of SNDT Juhu who transformed all the labs to Linux. He is a true evangelist and a game changer for SNDT Juhu. Whoever uses linux never shifts to windows or any proprietary OS in their life again. After that workshop, php & python became a core segment of our syllabus @SNDT Matunga.
We had a project for the last year. 95% students chose vb.net. Rest of the students chose php. Students need to be encouraged to take open source softwares as their project. It is necessary for the colleges to upgrade the syllabus for computer science courses from the IT sector point of view. Instead of teaching languages in turboC++, they must be taught programming in eclipse IDE for back end and bluefish or geany for front end.
I decided that I will aspire my career in python only. I comprehended that the interface of ubuntu is much much better than Windows.
After my graduation, in the summer vacation, there was a turning point in my life. I approached Krishnakant Sir for the project. Without a single hesitation he helped me through online interaction in dualbooting my system with ubuntu and windows. We worked at Dadar where our domain expert Mr. Arun kelkar 's office is located. Mr. Kelkar is CA by profession and helps us in making the accounts concepts clear. Krishnakant sir explained me the concept of python and mailed me “byte of python” e-book.
I started working with my first open source project in May 2012.
Our project is  backed by Comet Media, NIXI and NMEICt followed by ICFOSS and is undertaken in IIT Bombay.
But before working, I must know about GNUKhata. I was told to go through the website www.gnukhata.org. There was a link in the site to join mailing list, live demo(where we can use the project live) and download link where we can download source code. There are two types of mailing lists. Developers mailing list and users mailing list. I joined both the mailing lists. Normal users who are interested in using GNUKhata and want to stay updated on its functionality can join users mailing list and those who want to contributing source code and want to know about the technology behind the project can join developers mailing list.
Thats the freedom open source has that anyone can contribute & unlike proprietary, his name will definitely get the fame and recognition. I learnt about tickets (tasks) and commit( declare the completion of tasks) and push the changes in the repository for others to have. We even have to put mails in mailing list of the commits we make along with the changesets. We have sprint in which we do coding back to back day and night. If we encounter any problem with coding, we can ask for help in mailing lists. There are even IRC channels in which *hackers from all over the world help each other in debugging and solving errors without knowing each others personally. As the source code is always open, it is necessary to write documentation for every code so that whoever in future wants to make changes, he/she can read documentaion and know how the code works and make necessary changes. We have freedom to contribute from any part of the world. It is necessary to promote FOSS. Check for my FOSS related workshop details.
In IT sector,  you will find many python, django, postgresql related jobs. 
One day Sir told about MSc FOSS course from Anna University, Chennai. Here I am learning in detail on how FOSS people work together. For the admission one has to go to chennai personally and for the semesters. Rest all lectures are conducted every weekends which we can attend from any part of the world online through their portal. For details http://cde.annauniv.edu/MSCFOSS/.
My dad who never had any idea what is FOSS and never ever used Linux before, now does all his office work on LUbuntu with ease without a single complaint.
Soon i came across following open source technologies:
1.Pidgin is a chatting messenger which is very secured and supports yahoo,gtalk and many other chat systems. OTR(off-the -record-chat) is the private chat system in which the chat is authenticated by 2 or more concerned people and the conversation is only visible to them.
2.Creative common license is a copyright license to authenticate any of your FOSS work which applies all the license conditions of FOSS.http://creativecommons.org/choose/
3.Diaspora:Facebook lovers here is your open source version FOSSbook which you wont find of much interest although it is a very good example of social network. It is like facebook where there is wall for every user and there is private chat but page has to be refreshed manually for every message.But unlike facebook, your privacy is not harmed by diaspora. And many open source lovers are part of diaspora. There are many such open source social networking sites. We can also contribute on this diaspora project too.I am thankful to MSc FOSS for making me meet people from different parts of India during semesters and interact FOSS information with them. Diaspora is newly developed project and soon there will be many modifications in that. https://joindiaspora.com/
3.Gnukhata is an accounting software as a replacement to tally in Linux. It is  made in python language. http://www.gnukhata.org
4.Rasberry pi is the credit card sized ARM based computer board which when connected to a keyboard and monitor can function like a normal computer.
5.Spoken tutorial : I am now working on spoken tutorial.....www.spoken-tutorial.org where you can have a look at the various FOSS tutorials which IIT B has undertaken for online studying. You can learn basics of every FOSS software online by going through online videos or tutorials. Now it is necessary for our project GNUKhata to have its tutorials in order to make people aware of its functionality.

Proprietary attacks:Recently, I read, microsoft  forcing people to use only windows by restricting certain sites to open only on IE. This is like jeopardizing the freedom of the users. The people should be aware and not fall prey to these actions of Microsoft. Proprietary is no less than a corruption.

Institutes Playing with our Privacy? yes check how they force people to use certain softwares http://ssconline2.gov.in/mainmenu2.php 
Without much promotion few people have already realized the importance of FOSS.
Be a maverick .. be unique...

* hackers: often hacker is termed as a web based felonious person. But it is not so. Hackers can be a term which means one who hacks(cracks) a code and is an excellent programmer.


Mesmerizing Fortnight

This time its Sangli,Satara & Kolhapur. We hate to spend our daytime in journey so we prefer night journey. Unfortunately trains f...