Run many versions of ubuntu with lxc


I am working on a connector between Google Drive OCR and WikiSource projects.

https://github.com/tshrinivasan/OCR4wikisource

When I am developing in Ubuntu 15.04 laptop, everything works fine. But many issues were reported with the tools mutool and pdfunite.

Could not find the reasons for the issues for long time. Finally found that the users are using in Ubuntu 12.04

mutool is not available and pdfunite is older versions in ubuntu 12.04, which is working differently then ubuntu 15.04

Wanted to try ubuntu 12.04. Searched for any free VPS. But there is no free VPS to try anything quickly.

But, LXC container helped here.

We can install any ubuntu version as a mini VPS inside in our ubuntu.

sudo lxc-create -t download -n ubuntu1204  –dist ubuntu –release precise –arch amd64

sudo lxc-start -n ubuntu1204

sudo lxc-attach -n ubuntu1204

with –release  option, we can give any older version of ubuntu. It downloads that version and install a minimal version.

Using this, I checked and found the issue with the pdfunite. Changed the program to work with ubuntu 12.04

Users are happy now 🙂

Thanks for Ravi, jayantanth, Sibi, Omshivaprakash for continuous testing and giving ideas for enhancements. Realised the  importance of testing and tasting the true spirits of collaborative contributions.

See here to learn more about LXC containers.

https://www.digitalocean.com/community/tutorials/getting-started-with-lxc-on-an-ubuntu-13-04-vps

 

 

 

 

 

Announcing OCR4wikisource


There are many PDF files and DJVU files in WikiSource in various languages. In many wikisource projects, those files are splited into individual page as an Image, using proofRead extension.

Contributors see those images and type them manually.

This project helps the wikisource team to OCR the entire PDF or DJVU file, using the google drive OCR. Then it will update the relevant page in the wikisource with the text.

Grab the python code from here and run in your GNU/linux machines.

https://github.com/tshrinivasan/OCR4wikisource

It is based on
https://github.com/tshrinivasan/google-ocr-python

Reply here with your suggestions and improvements.

solution for ” too long for Unix domain socket ” with ansible and amazon ec2


fatal: [ec2-x.x.x.x.us-west-2.compute.amazonaws.com] => SSH Error: unix_listener: "/home/shrinivasan/.ansible/cp/ansible-ssh-x.x.x.x.us-west-2.compute.amazonaws.com-22-ubuntu.0wqQt0HttbVPpz9B" too long for Unix domain socket
while connecting to x.x.x.x:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

I got the above error on ansible, when used huge hostnames ( amazon ec2 names) instead of IP addresses, in hosts file for ansible.

Ansible can not log in the the machines via ssh.

To solve this, in /etc/ansible/ansible.cfg file, enable the following.
control_path = %(directory)s/%%h-%%r

After this, ansible can login to remote servers and run the scripts.

Solution for passwd: Module is unknown issue in ubuntu


I have a AWS instance with Ubuntu installed.

When I add a new user, or try to change the password, I got the following error.

# passwd
passwd: Module is unknown
passwd: password unchanged

 

Let us check the auth.log for any issues.

root@ip-172-31-9-242:~# tail -n 2 /var/log/auth.log
Jun  3 14:06:01 ip-172-31-9-242 CRON[31435]: pam_unix(cron:session): session closed for user root
Jun  3 14:08:01 ip-172-31-9-242 CRON[31490]: PAM unable to dlopen(pam_cracklib.so): /lib/security/pam_cracklib.so: cannot open shared object file: No such file or directory

 

It means that it misses the pam_cracklib. Let us search for it.

root@ip-172-31-9-242:~# apt-cache search pam | grep crack
libpam-cracklib – PAM module to enable cracklib support

 

Good. Let us try installing it.

root@ip-172-31-9-242:~# apt-get install libpam-cracklib

Let us try now to change the password.

 

Great. It works now.

 

Lesson : Look for the log files, before googling.

 

unrtf – rtf to html conversion utility


For http://FreeTamilEbooks.com project, we have to convert many Word Documents into html before converting them to epub using http://PressBooks.com

I used LibreOffice to open Word doc and to save as HTML.

Till LibreOffice 4.1, the images are extracted and stored separately along with HTML file.

But, after LibreOffice 4.2, they moved to base64 type of encoding of images, so that images are embedded into HTML files. We can not separate images from HTML files.

This was so annoying and many people are reporting this as a bug here.
https://bugs.documentfoundation.org/show_bug.cgi?id=48887

But, This seems not to be fixed.

So, I installed LibreOffice 4.1 in /opt just to use the old feature of storing images separately.

Just now, found another utility, unrtf to do the same.

http://www.gnu.org/software/unrtf/

To install it in ubuntu/debian

sudo apt-get install unrtf

If you get an word doc with images, save it as a Rich Text File using libreoffice writer.

example:

test.doc -> test.rtf

Then,

unrtf test.rtf > test.html

This gives a nice HTML file and images separately.

Thanks for the GNU team for the nice utility.

I can get rid of old LibreOffice 4.1 now.

FSFTN Summer Camp on Free Software Technologies at IIT Madras – June 8 to June 13


unnamed

http://fsftnsummercamp.org/

Free Software Foundation, Tamil Nadu (FSFTN) is an organisation that works to spread awareness about Free Software and Free Knowledge among college students of Tamil Nadu . As a part of our initiatives in taking Free Software technologies to the college students, we are holding a 6 day summer camp .This year the camp is to be held from June 8 th to June 13 th ( 6 days ) at IIT Madras.

The event would start with Introduction to Free Software Philosophy

Hands on sessions

  1. GNU/Linux introduction and installation
  2. Introduction to File system and Shell scripting
  3. Git & GitHub
  4. Blender
  5. Ruby
  6. HTML, CSS, JS
  7. Ruby On Rails
  8. Introduction to Node.js, MongoDB & Meteor

Apart from this there would be

  1. Team building excercise
  2. Showcasing of website built by students during the Ruby on Rails session

Introduction to:

  1. Cloud and containers
  2. Open Hardware
  3. From Internet to Meshnet
  4. Net Nuetrality

Short talks

  1. Wikipedia
  2. Tamil Computing & Localization
  3. Firefox OS & Contributing to Mozilla
  4. Getting started with Free Software Contribution
  5. SWIFT- Swift Women in Free Technologies

For continuous follow ups we have :

  1. How to form a GLUG and What next?

Every participant would be given a Participation certificate from FSFTN .

Please have look at the website of the Chennai edition of the 2015 summercamp. The posters for the events are attached .

About FSFTN :

Free Software Foundation, Tamil Nadu (FSFTN) is an organisation that works to spread awareness about Free Software and Free Knowledge among college students of Tamil Nadu.We are a part of Free Software Movement of India (FSMI), a social movement that has pledged to enlighten the general public with the essence of Free Software. FSFTN was founded in 2008 and is also a registered society in Tamil Nadu.

About Previous Editions and our movement

As a part of our initiatives in taking free software technologies to the college students, we have held two five days summer camps in the past two years – 18 – 22 June in 2013 and 15 – 19 June in 2014. The venue for these two summer camps were the Department of Computer Science and Engineering at IIT Madras. A total of 150 students from across Tamil Nadu participated in the summer camps for each year, where they learnt about basics of free software and innovative software packages like Python, Ruby on Rails etc. The summer camps were well received by the participating students.

The photos and videos of earlier versions can be accesed at 2008 – SSN , 2009 – SSN , 2010-SSN .

Apart from this , there have been workshops and events conducted throughout the year . Join the journey of creating a ecosystem in which Knowledge Sharing takes the front seat rather than mere studying .

How to use ibus in KDE5?


I use KDE Desktop environment for long time.

The recent KDE5 is good, sleek and beautiful.

To type in Tamil, I use ibus.
Installed it and configured Tamil99 keyboard layouts.

sudo apt-get install ibus-m17n ibus m17n-db m17n-contrib ibus-gtk ibus-qt4

This links helped to setup ibus.
https://abstract2paradox.wordpress.com/2011/06/14/typing-tamil-on-linux/
http://askubuntu.com/questions/129407/how-do-i-turn-on-phonetic-typing-for-tamil
https://www.youtube.com/watch?v=Q6fYn3OvfUE

Still in KDE5 , ibus is not working only in KDE applications. But, it works well with GTK based applications like Firefox.

In order to resolve this problem add

export QT_IM_MODULE=ibus

to ~/.xprofile and restart your X user session. ie. logout and login.

After doing this, I can type in tamil using ibus in all KDE applications.

Thanks to https://wiki.archlinux.org/index.php/IBus#Troubleshooting