linux for you 2012-07

110

Click here to load reader

Upload: obed-cortes-aburto

Post on 28-Dec-2015

100 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Linux for You 2012-07

T H E C O M P L E T E M A G A Z I N E O N O P E N S O U R C E

Volume: 10 Issue: 05 Pages: 108 Edition# 113 JULY 2012

CD Team e-m

ail: cdteam@

efyindia.com

Recommended System Requirements: P4, 1GB RAM, DVD-ROM Drive

Note: Any objectio

nable

mate

rial, i

f foun

d on t

he disc

, is unintended, and should be attributed to the complex nature of Internet data.

In ca

se th

is DV

D do

es n

ot w

ork

prop

erly,

writ

e to

us

at s

uppo

rt@ef

yind

ia.c

om fo

r a fr

ee re

plac

emen

t.

17

Volume: 10Issue: 05July 2012

Code-named Beefy Miracle, the latest version of the Fedora Linux operating system comes with updated package list and GNOME 3.4 as

desktop environment.

Installation DVDfor Intel-compatible, 64-bit computers

J

ULY

20

12

L

INU

X F

OR

YO

U

VO

LU

ME

: 10

ISS

UE

: 05

70

9 9 1 177 740 0050

India ` 100US $ 12Singapore S$ 9.5Malaysia MYR 19

FREE DVD

` 100ISSN 0974-1054

The *NIX-Hacker’s Guide To Systemd

ACHIEVE MASTERY OVER PANDABOARD

SOME USEFUL TIPS TO PREPARE FOR GSOC

“After North America, the second largest facility we opened is in India”—Anuj Kumar and Paul Cormier of Red Hat

OpenMRS: Sustainable Healthcare For The Developing World

GNU Health Streamlines

Patient And Hospital Records

Raven: A Surgical Robot

That Runs On Linux

3D Slicer: A FOSS-based Medical Imaging

Solution

SPECIAL FEATURE Leading Providers Of

Web Hosting Solutions

Check Out The Latest Products, Gadgets And Special Offers!

HEALTHCARE MANAGEMENT

TURNS FOSS FRIENDLY

Page 2: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 3: Linux for You 2012-07

CD Team e-m

ail: cdteam@

efyindia.com

Recommended System Requirements: P4, 1GB RAM, DVD-ROM Drive

Note: Any objectio

nable

mate

rial, i

f foun

d on t

he disc

, is unintended, and should be attributed to the complex nature of Internet data.

In ca

se th

is DV

D do

es n

ot w

ork

prop

erly,

writ

e to

us

at s

uppo

rt@ef

yind

ia.c

om fo

r a fr

ee re

plac

emen

t.

17

Volume: 10Issue: 05July 2012

Code-named Beefy Miracle, the latest version of the Fedora Linux operating system comes with updated package list and GNOME 3.4 as

desktop environment.

Installation DVDfor Intel-compatible, 64-bit computers

J

ULY

20

12

L

INU

X F

OR

YO

U

VO

LU

ME

: 10

ISS

UE

: 05

` 100ISSN 0974-1054

Make The Most Of IPython

DEVELOP WEBSITES WITH JQUERY

SAVE TIME BY SWITCHING TO A CMS

MICROSOFT GOES OPEN WITH AZURE

HEALTHCARE MANAGEMENT TURNS FOSS FRIENDLY

CHECK OUT

SPECIAL FEATUREThe Latest Products, Gadgets And Special Offers!

Leading Providers Of Web Hosting Solutions

OpenMRS:Sustainable Healthcare For The

Developing World

GNU Health Streamlines Patient And Hospital Records

Raven:A Surgical Robot That

Runs On Linux

3D Slicer: A FOSS-based Medical Imaging Solution

JULY 2012

FREE DVD

CD Team e-m

ail: cdteam@

efyindia.com

Recommended System Requirements: P4, 1GB RAM, DVD-ROM Drive

Note: Any objectio

nable

mate

rial, i

f foun

d on t

he disc

, is unintended, and should be attributed to the complex nature of Internet data.

In ca

se th

is DV

D do

es n

ot w

ork

prop

erly,

writ

e to

us

at s

uppo

rt@ef

yind

ia.c

om fo

r a fr

ee re

plac

emen

t.

17

Volume: 10Issue: 05July 2012

Code-named Beefy Miracle, the latest version of the Fedora Linux operating system comes with updated package list and GNOME 3.4 as

desktop environment.

Installation DVDfor Intel-compatible, 64-bit computers

WorldMags.netWorldMags.net

Page 4: Linux for You 2012-07

THE BUSINESS VALUE OF TECHNOLOGY

www.informationweek.inTHE BUSINESS VALUE OF TECHNOLOGY

www.informationweek.in

WorldMags.netWorldMags.net

Page 5: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 6: Linux for You 2012-07

CONTENTS

CO

NTE

NTS

for the Developing World

Sustainable Open Source Healthcare

Code-named Beefy Miracle, the latest version of the Fedora Linux operating system comes with updated package list and GNOME 3.4 as desktop environment.

Check out the Fedora 17 review at our website, www.linuxforu.com.

Installation DVD for Intel-compatible, 64-bit computers

LFY DVD fedora 17

CD Team e-m

ail: cdteam@

efyindia.com

Recommended System Requirements: P4, 1GB RAM, DVD-ROM Drive

Note: Any objectio

nable

mate

rial, i

f foun

d on t

he disc

, is unintended, and should be attributed to the complex nature of Internet data.

In ca

se th

is DV

D do

es n

ot w

ork

prop

erly,

writ

e to

us

at s

uppo

rt@ef

yind

ia.c

om fo

r a fr

ee re

plac

emen

t.

17

Volume: 10Issue: 05July 2012

Code-named Beefy Miracle, the latest version of the Fedora Linux operating system comes with updated package list and GNOME 3.4 as

desktop environment.

Installation DVDfor Intel-compatible, 64-bit computers

4 | july 2012 | lINuX For you | www.linuxForu.com

july 2012  •  Vol. 10  No. 05  •  ISSN  0974-1054

WorldMags.netWorldMags.net

Page 7: Linux for You 2012-07

CONTENTS

CO

NTE

NTS

FOR YOU & ME31 “Linux based Web hosting solutions are

considered more stable and reliable” P Sridhar Reddy, chairman and managing director, CtrlS Datacenters Ltd

33 Windows Gives Cloud Cover to Linux

35 “After North America, we have opened our second largest facility in the world in India” — Anuj Kumar, general manager, Red Hat India, and Paul Cormier, executive vice presi-dent and president, Products and Technolo-gies, Red Hat Inc

38 The Google Summer of Code Programme40 Mastering PandaBoard, Part-142 Raven: A Surgical Robot Powered by Linux!44 3D Slicer: An Overview48 Sustainable Open Source Healthcare for the

Developing World51 Electronic Health Record Systems:

An Overview54 Map-Making with QGIS, Part-258 Localisation: The Gettext Framework, Part-3

dEvElOpERs65 Write Modules and Save Lives, Part-1

73 IPython: The Best-in-Class Python Interac-tive Interpreter

77 System Programming in the File-System Interface, Part-1

81 Programming with jQuery84 Developing Apps on QT, Part-6

88 Device Driver: File Systems, A Semester Project-III, Part-20

OpEn gURUs67 FOSS Based Mobile Solutions: Deliver Medi-

cal Facilities to Remote Areas

68 Comparing Open Source Medical Visualisation and Imaging Software

70 All About GNU Health

AdMin91 The *NIX-hacker’s Guide to Systemd95 Cyber Attacks Explained:

Authentication Attacks, Part-9100 Deploying Java Web Applications on Cloud-

Swing Open PaaS

COlUMns57 Exploring Software:

Static to Drupal 761 The Joy of Programming: Naming Bugs63 CodeSport

06 You Said It...

10 Offers of the Month

12 Open Gadgets

14 New Products

18 FOSS Bytes

76 CodeChef

102 Tips & Tricks

104 Q&A Powered By LFY Facebook

106 FOSS Jobs

REgUlAR FEATUREs

A List of LeadingWeb Hosting

Solutions Providers26

Leading Players

Mastering PandaBoard

EditorRahul chopRa

Editorial, Subscriptions & AdvertisingDelhi (hQ)D-87/1, Okhla Industrial Area, Phase I, New Delhi 110020Phone: (011) 26810602, 26810603; Fax: 26817563E-mail: [email protected]

BeNGAlURUMs JayashreePh: (080) 25260023; Fax: 25260394E-mail: [email protected]

Customer Caree-mAil: [email protected]

Back IssuesKits ‘n’ SparesNew Delhi 110020 Phone: (011) 26371661-2E-mail: [email protected] Website: www.kitsnspares.com

AdvertisingCheNNAiVenkat CDMobile: 9742864199E-mail: [email protected]

hYDeRABADD S SunilMobile: 8977569691E-mail: [email protected]

KolKAtAGaurav AgarwalPh: (033) 22294788; Telefax: (033) 22650094Mobile: 9891741114E-mail: [email protected]

mUmBAiMs Flory D’Souza Ph: (022) 24950047, 24928520; Fax: 24954278E-mail: [email protected]

PUNeSandeep Shandilya; Mobile: 09324299081 E-mail: [email protected]

GUJARAtSandeep Roy E-mail: [email protected] Mobile: 9821267855Ph: 079-22139840; Telefax: 079-22139841

SiNGAPoReMs Peggy ThayPh: +65-6836 2272; Fax: +65-6297 7302 E-mail: [email protected], [email protected]

UNiteD StAteSMs Veronique Lamarque, E & Tech Media Phone: +1 860 536 6677 E-mail: [email protected]

ChiNAMs Terry Qin, Power Pioneer Group Inc. Shenzhen-518031 Ph: (86 755) 83729797; Fax: (86 21) 6455 2379 Mobile: (86) 13923802595, 18603055818 E-mail: [email protected], [email protected]

tAiwAN Leon Chen, J.K. Media Taipei CityPh: 886-2-87726780 ext.10; Fax: 886-2-87726787

Exclusive News-stand Distributor (India)iNDiA BooK hoUSe Pvt ltDArch No, 30, below Mahalaxmi Bridge, Mahalaxmi, Mumbai - 400034 Tel: 022- 40497401, 40497402, 40497474, 40497479, Fax: 40497434E-mail: [email protected]

Printed, published and owned by Ramesh Chopra. Printed at Tara Art Printers Pvt Ltd, A-47, Sec-5, Noida, on 28th of the previous month, and published from D-87/1, Okhla Industrial Area, Phase I, New Delhi 110020. Copyright © 2011. All articles in this issue, except for interviews, verbatim quotes, or unless otherwise explicitly mentioned, will be released under Creative Commons Attribution-Share Alike 3.0 Unported License a month after the date of publication. Refer to http://creativecommons.org/licenses/by-sa/3.0 for a copy of the licence. Although every effort is made to ensure accuracy, no responsibility whatsoever is taken for any loss due to publishing errors. Articles that cannot be used are returned to the authors if accompanied by a self-addressed and sufficiently stamped envelope. But no responsibility is taken for any loss or delay in returning the material. Disputes, if any, will be settled in a New Delhi court only.

SUBSCRIPTION RATES fOR LINUx fOR YOUPeriod News-stand price You Pay OverseasYear (`) (`)Five 6000 3600 —Three 3600 2520 —One 1200 960 US$ 120

Kindly add ` 50/- for outside Delhi cheques.Please send payments only in favour of EfY Enterprises Pvt Ltd.Non-receipt of copies may be reported to [email protected]—do mention your subscription number.

www.linuxForu.com | lINuX For you | july 2012 | 5WorldMags.netWorldMags.net

Page 8: Linux for You 2012-07

Nothing beats the print version of the magazine!I recently read the article 'Is Your Home Clouded?' in the LINUX For You January 2011 issue. I know that was almost a year-and-a-half ago but it was a good and enlightening read. Being the son of a publisher, I can tell you that books (of the paper variety) have their own value and can't be replaced by their e-versions. Though I am a tech enthusiast, I still spend hours reading a paperback rather than strain my eyes on the laptop screen.

I agree with the author that some great friendships have begun by sharing books. In my case, it’s the bonding between my sister and me.

Both of us are avid readers and like books from different genres. So whenever I come across a good book, I make sure that she reads it and she does the same. We even have our own little library in which we have stored all the books that we read through our childhood and we share them with our cousins and friends. It’s the ultimate experience – and something that cannot be had by switching to the digital versions of books.

I look forward to reading more of your articles.—Uday Mittal,

[email protected]

ED: It's great to hear from readers about older issues too! We shall certainly convey your words of appreciation to the author of the article, Niyam Bhushan.

We appreciate your sentiments regarding preferring the hard copy of the magazines to their e-versions. True, reading articles on the computer screen, online, doesn't have quite the same charm as savouring every word printed on ‘papyrus’. However, the ezine version has its own set of advantages that we can't ignore either!

Open source decoded poeticallyI am a great technology enthusiast. Programming is not only my hobby but my passion. I like to read up on a variety of topics related to technology, especially on open source. I have been reading your magazine since last year, and I found it very informative and rich in content. At the beginning of every month, I look forward to laying my hands on the latest issue of LFY. Along with programming, writing poems is my other hobby, though my poems are of different genres. Here's a sample...

Frisky LifeDeep down in a sector of a hard disk Lies a piece of code called Frisk It has been there for some time Waiting to be executed any time Sitting in its lonely sector It now reminisces about the timeWhen it wasn’t even a line.

Eureka! What an idea for the SE project. I will create software that will detect a potential threat That was the day Frisk was conceived. With a bright future it seemed.

What SE model should I follow to develop Frisk? Spiral, Waterfall, RAD or one of my own tricks? Wait! Oh wait! There’s a stage left, Use case, DFD, UML and SRS haven’t been made yet, Frisk aced through every stage but what came next was a critical phase.

It’s time to decide the architecture for Frisk. A wrong choice will be a catastrophic risk. n-Tiered, Client-Server, Blackboard, Structured, etc. Made the selection a tough task and there’s no one I could ask. After much deliberation and thought, Frisk’s future was plot.

With everything in place, Frisk entered the development phase Being a Windows’ citizen .Net was the proven choice. I developed it piece by piece to avoid a mess of files. Having done with pieces I compiled them into modules And saved it from becoming a programmer’s ridicule.

With few days left for delivery, Frisk moved to the next stage. A threefold stage of Assembly, Compilation and Execution came. Assembly of modules gave a prototype that was then set to compile. After bug elimination and successful execution, I gave a smile. I named this version as Alpha, later ones being called Beta and Gamma. The end of this stage was a relief but will the final stage turn it into grief?

The next stage was every software’s worst nightmare. As it involved putting it through a series of tests that scare. Frisk too was to be put to multiple tests; Black Box, White Box, and Stress tests were only some of them. It faced every test with strength and courage And matured into a better software package.

Alas! The time came and Frisk was unveiled. It bagged lots of praise and I felt great.Sitting in its lonely sector, It now smiles as it reminisces about those old times When it became much more than a line.

You can find more of my poems at http://genemesis.wordpress.com. This is a blog I run to post my poems whenever I get time to write.

Hope you like all of them.—Uday Mittal,

[email protected]

6 | july 2012 | lINuX For you | www.linuxForu.com

YOUSAID IT

WorldMags.netWorldMags.net

Page 9: Linux for You 2012-07

Registered Office: # 635, 6th Main Road, Hanumanthnagar, Bangalore 560019

# 2, 1st E Cross, 20th Main Road, BTM 1st Stage, Bangalore 560029.

Tel: +91.80.22428538, 26780762, 65680048

Mobile: 9845057731, 9449857731, 9343780054

Trained participants from over 42 Countries in 6 Continents

Linux OS Administration & Security Courses for Migration

LLC102: Linux Desktop Essentials

LLC033: Linux Essentials for Programmers & Administrators

LLC103: Linux System & Network Administration

LLC203: Linux Advanced Administration

LLC303: Linux System & Network Monitoring Tools

LLC403: Qmail Server Administration

LLC404: Postfix Server Administration

LLC405: Linux Firewall Solutions

LLC406: OpenLDAP Server Administration

LLC408: Samba Server Administration

LLC409: DNS Administration

LLC410: Nagios - System & Network Monitoring Software

LLC412: Apache & Secure Web Server Administration

LLC414: Web Proxy Solutions

Courses for Developers

LLC104: Linux Internals & Programming Essentials

LLC106: Device Driver Programming on Linux

LLC107: Network Programming on Linux

LLC108: Bash Shell Scripting Essentials

LLC109: CVS on Linux

LLC204: MySQL on Linux

LLC205: Programming with PHP

LLC206: Programming with Perl

LLC207: Programming with Python

LLC208: PostgreSQL on Linux

LLC504: Linux on Embedded Systems

LLC701: Android Internals

LLC702: Android Application Development

RHCE Certification Training

RH124: Red Hat System Administration - I

RH134: Red Hat System Administration - II

RH254: Red Hat System Administration - III

RH299: RHCE Rapid Track Course

RHCVA / RHCSS / RHCDS / RHCA Certification Training

RHS333: Red Hat Enterprise Security: Network Services

RH423: Red Hat Enterprise Directory Services & Authentication

RH401: Red Hat Enterprise Deployment & Systems Management

RH436: Red Hat Enterprise Clustering & Storage Management

RH442: Red Hat Enterprise System Monitoring & Performance Tuning

RHS429: Red Hat Enterprise SELinux Policy Administration

RH318: Red Hat Enterprise Virtualization

NCLA / NCLP Certification Training

Course 3101: SUSE Linux Enterprise 11 Fundamentals

Course 3102: SUSE Linux Enterprise 11 Administration

Course 3103: SUSE Linux Enterprise Server 11 Advanced Administration

For more info log on to:

www.linuxlearningcentre.com

Call: 9845057731 / 9449857731

Email: [email protected]

Microsoft Training Co-venture: CertAspire

Microsoft Certified Learning Partner

www.certaspire.com

Red Hat Linux Troubleshooting

RH242 - 16 July 2012

RH299 from 7, 14, & 21 July’12

RHCSA & RHCE Exam 13 & 27 July’12

LLC - Authorised Novell Practicum Testing Centre

NCLP Training on Courses 3101, 3102 & 3103

RH318: 9 & 14 July 2012; EX318: 19 July;

RHS333: 07 July; RH423:14 July; RHS429: 28 July;

Ex333: 20 July; RH401: 02 July; EX401: 06 July

RHCVA / RHCSS / RHCA Training - Exams

Training on Android Internals &

Android Application Development

Red Hat Super 10 Exam Offer

Two-Attempts & Free Goodies

RHCSA, RHCE, RHCVA,

RHCSS, RHCDS & RHCA

Authorised Training

& Exam Centre

Practicum

TESTING

PARTNER

Gold

TRAINING

PARTNER

WorldMags.netWorldMags.net

Page 10: Linux for You 2012-07

Nitish Bangera:This month's issue was a bit disappointing for me. When I started reading, I expected to find articles on installing Android on a touch screen phone, Android's prereq-uisites, etc, and hence for me, Android wasn't quite ‘unleashed’ at all in this issue. The articles were good but the title wasn't entirely justified.

LINUX For You: Thanks a lot for your feedback, Nitish! We are sorry we couldn't meet your expectations and that the title was a let down. We will certainly be more cautious with the content and the cover titles in our forthcoming editions. And yes, do continue sharing your suggestions with us. It would only motivate us to do better!

ED: Lovely poem Uday! You have blended technology and creativity brilliantly. Thanks for sharing it with us. We would be posting your poem on our Facebook platform, www.facebook.com/LinuxForYou, so that the larger community that is enthusiastic about open source has the pleasure of reading it as well.

And now, a request from us! You clearly have a very interesting style of writing as is evident in your poem. It would be great if you could write for our magazine. You never know, you may emerge as one of our star authors!

Regarding the DVDsThe DVD of the June 2012 issue of LFY was awesome. You finally delivered 64-bit and there were no unwanted server-editions and rescue CDs.

The LFY DVD should include certain distros at least once in a year, namely, Knoppix, Gentoo system_rescue_CD, Clonezilla, etc. Please think about these recovery distros. Recently, Mageia made it to the Top 10 in Distro-watch. It surely deserves some attention.

I have one more suggestion. Facebook has a privacy issue; hence, not everyone is comfortable with it. How about making an IRC channel? Maybe #LFY or something similar... Readers can ask questions on that channel and discuss the magazine’s content easily. It would be like involving the entire LFY family! Though

CORNER

there are channels for individual distros, readers will surely get some extra guidance and can also join in to chat. I find Facebook very restrictive.

—Gulzar Singh, [email protected]

ED: We are pleased to know that you liked the contents of the DVD this time. We have made a note of your suggestions for the forthcoming DVDs as well!

We do agree that with the current Facebook settings, there are bound to be certain restrictions, like lack of privacy, inability to chat, etc. We will consider your suggestions for a more focused social networking platform for LFY in the coming months.

An iPhone or iPad app for LFY?I am a subscriber of LFY and wanted to know if there is an LFY app for the iPhone or iPad.

—Saleem Ahmed Khan, [email protected]

ED: To read LFY on the iPad and on Android devices, we suggest that you visit: http://green.efyindia.com. We do not yet have a free iPad app for LFY subscribers. We only have the ezine service. However, we are trying to build an app that would bridge this gap.

Vivek Mishra: Thanks a lot to the LFY team! Finally I have a great LFY (June 2012) edition on Android. I would also like to make a request. Please try and include some ar-ticles on Linux/UNIX network program-ming as well.

LINUX For You: Thanks for your encouraging words Vivek! And thanks for your suggestion, as well. We shall certainly try and carry some articles on Linux/UNIX network programming in our forth-coming editions.

The June issue rocked!

Android wasn't 'unleashed' in the June issue!

Please send your comments or suggestions to:The Editor

LINUX FOR YOU MagazineD-87/1, Okhla Industrial Area, Phase I, New Delhi 110020Phone: 011-26810601/02/03, Fax: 011-26817563Email: [email protected], Website: www.linuxforu.com

8 | july 2012 | lINuX For you | www.linuxForu.com

YOUSAID IT

WorldMags.netWorldMags.net

Page 11: Linux for You 2012-07

Registered Office: # 635, 6th Main Road, Hanumanthnagar, Bangalore 560019

# 2, 1st E Cross, 20th Main Road, BTM 1st Stage, Bangalore 560029.

Tel: +91.80.22428538, 26780762, 65680048

Mobile: 9845057731, 9449857731, 9343780054

Trained participants from over 42 Countries in 6 Continents

Linux OS Administration & Security Courses for Migration

LLC102: Linux Desktop Essentials

LLC033: Linux Essentials for Programmers & Administrators

LLC103: Linux System & Network Administration

LLC203: Linux Advanced Administration

LLC303: Linux System & Network Monitoring Tools

LLC403: Qmail Server Administration

LLC404: Postfix Server Administration

LLC405: Linux Firewall Solutions

LLC406: OpenLDAP Server Administration

LLC408: Samba Server Administration

LLC409: DNS Administration

LLC410: Nagios - System & Network Monitoring Software

LLC412: Apache & Secure Web Server Administration

LLC414: Web Proxy Solutions

Courses for Developers

LLC104: Linux Internals & Programming Essentials

LLC106: Device Driver Programming on Linux

LLC107: Network Programming on Linux

LLC108: Bash Shell Scripting Essentials

LLC109: CVS on Linux

LLC204: MySQL on Linux

LLC205: Programming with PHP

LLC206: Programming with Perl

LLC207: Programming with Python

LLC208: PostgreSQL on Linux

LLC504: Linux on Embedded Systems

LLC701: Android Internals

LLC702: Android Application Development

RHCE Certification Training

RH124: Red Hat System Administration - I

RH134: Red Hat System Administration - II

RH254: Red Hat System Administration - III

RH299: RHCE Rapid Track Course

RHCVA / RHCSS / RHCDS / RHCA Certification Training

RHS333: Red Hat Enterprise Security: Network Services

RH423: Red Hat Enterprise Directory Services & Authentication

RH401: Red Hat Enterprise Deployment & Systems Management

RH436: Red Hat Enterprise Clustering & Storage Management

RH442: Red Hat Enterprise System Monitoring & Performance Tuning

RHS429: Red Hat Enterprise SELinux Policy Administration

RH318: Red Hat Enterprise Virtualization

NCLA / NCLP Certification Training

Course 3101: SUSE Linux Enterprise 11 Fundamentals

Course 3102: SUSE Linux Enterprise 11 Administration

Course 3103: SUSE Linux Enterprise Server 11 Advanced Administration

For more info log on to:

www.linuxlearningcentre.com

Call: 9845057731 / 9449857731

Email: [email protected]

Microsoft Training Co-venture: CertAspire

Microsoft Certified Learning Partner

www.certaspire.com

Red Hat Linux Troubleshooting

RH242 - 16 July 2012

RH299 from 7, 14, & 21 July’12

RHCSA & RHCE Exam 13 & 27 July’12

LLC - Authorised Novell Practicum Testing Centre

NCLP Training on Courses 3101, 3102 & 3103

RH318: 9 & 14 July 2012; EX318: 19 July;

RHS333: 07 July; RH423:14 July; RHS429: 28 July;

Ex333: 20 July; RH401: 02 July; EX401: 06 July

RHCVA / RHCSS / RHCA Training - Exams

Training on Android Internals &

Android Application Development

Red Hat Super 10 Exam Offer

Two-Attempts & Free Goodies

RHCSA, RHCE, RHCVA,

RHCSS, RHCDS & RHCA

Authorised Training

& Exam Centre

Practicum

TESTING

PARTNER

Gold

TRAINING

PARTNER

WorldMags.netWorldMags.net

Page 12: Linux for You 2012-07

offerS THE monTH

Get Deluxe 4GH Hostingfor the price of Economy.

• 150 GB Space• Unlimited Websites & Bandwidth• 500 Email Accounts• 25 MySQL Databases (1 GB ea.)• Plus FREE Extras!

Enter promo code LINUXforYOU3 for your discount.

FREEUPGRADE!

Please refer to

Page No. 27

for more details

EnterpriseDB training withcertification and coursewarein Hyderabad, Delhi & Chennai.

Enter coupon code LFYJUL2012 for your discount.

Early BirdDiscount!

Please refer to

Page No. 107

for more details

Write to [email protected] following details:Name, Location of Interest for public training,Mobile/Direct No, Email ID,Organization Name, Project Details

Add RHCSS And RHCVA BadgeTo Your Career Profile!!Get 20% discount on the followingadvance level courses:* Red Hat Certified VirtualizationAdministrator (RHCVA)* Red Hat Certified SecuritySpecialist (RHCSS).

Enter coupon code 06LFY2012 for your discount.

HURRY!LIMITED PERIOD

OFFER!

Please refer to

Page No. 17

for more details

500 Silver Passes Free!Hurry! Register Now!!Sign up before 31st Augustfor OSI Days 2012 andsave up to 10%!

Enter coupon code 06LFY2012 for your discount.

SilverPassesFree!!

Please refer to

Page No. 99

for more detailsFor more details visit:http://osidays.com/register-now

Get 35% Off on Standard BoothSpace of 3m x 3m at Nullcon4th International InformationSecurity Conference, Delhion 28th & 29th September 2012.

Enter coupon code NULLCONJUL12 for your discount.

35%OFF!!

Please refer to

Page No. 9

for more detailsHurry! Limited Period Offer!Book Your Booth Now!

Connect withIndia’s Leading ITProfessionals

500 Silver Passes Free!Hurry! Register Now!!

For more details visit:http://osidays.com/register-now

Linux Hosting features include:• 99.9% uptime (24/7 tech support)• Unlimited domains, email & disk space• Fully equipped with cPanel, Apache,

MySQL, PHP, Perl, Python & more• 30 day Money Back Guarantee

Enter coupon code BRLFY30 for your discount.

FLAT 30%discount on Linux

Hosting

Please refer to

Page No. 23

for more details

Limited period offer!Visit to avail the offer!www.bigrock.com

10 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 13: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 14: Linux for You 2012-07

LG Optimus 3D MaxOS:

Android 2.3Launch Date:

June 2012MRP:

` 28,990ESP:

` 28,990Specification: 10.9 cm TFT LCD capaci-tive touchscreen, 800x480 pixels screen resolution, 3D auto stereoscopic display, 1.2GHz dual core proces-sor, 1520mAh battery, external memory expandable upto 32GB, 1GB RAM, 5MP rear camera, 720x1280p HD video recording, 3G, WiFi, Bluetooth.

Retailer/Website:www.flipkart.com

Sony Xperia POS:

Android 2.3Launch Date:

May 2012MRP:

` 25,799ESP:

` 22,990Specification: 10.2 cm TFT display, 960x540 pixels screen resolution, 1GHz dual core processor, 1GB RAM, 16GB internal memory, 1305mAh battery, 8MP rear camera with auto focus and LED flash, 1080p HD video recording, 3G, WiFi.

Retailer/Website: www.adexmart.com

OS:

Android 2.3Launch Date:

June 2012MRP:

` 5,499ESP:

` 5,479Specification: 8.9 cm multi-touch ca-pacitive touch screen, 320x480 pixels screen resolution, 650MHz processor,1300mAh battery, 256MB RAM, external memory expandable upto

32GB, 2MP camera, Bluetooth, GPRS.

Retailer/Website: www.naaptol.com

Micromax A45 Su-perfone Punk OS:

Android 2.3Launch Date:

June 2012MRP:

` 10,000ESP:

` 10,000Specification: 10.2 cm TFT LCD capaci-tive multi-touch screen, 480x800 pixels screen resolution, 1GHz processor, 2000mAh battery, external memory expandable upto 32GB, 5MP rear camera with LED flash, 3G, WiFi, Bluetooth.

Retailer/Website: www.naaptol.com

Spice Stellar Mi-425

OS:

Android 2.3Launch Date:

June 2012MRP:

` 6,999ESP:

` 5,699Specification: 8.128 cm multi-touch screen, 1GHz processor, 1280mAh battery, external memory expandable upto 32GB, 256MB RAM, 2MP camera, 3G, WiFi, Bluetooth.

Retailer/Website:www.themobilestore.in

Micromax A52 Superfone AISHA

OS:

Android 4.0Launch Date:

June 2012MRP:

` 18,990ESP:

` 18,990Specification: 10.9 cm TFT LCD capacitive touchscreen, 800x480 pixels screen resolution, 1GHz processor, 1700mAh battery, external memory expandable upto 32GB, 5MP rear camera, Bluetooth, MP3, 3G, A-GPS.

Retailer/Website:www.flipkart.com

LG Optimus L7OS:

Android 2.3Launch Date:

June 2012MRP:

` 13,299ESP:

` 13,299Specification: 8.9 cm touchscreen, 320x480 (HVGA) pixels screen resolution, 832MHz processor, 512MB RAM, 1300mAh battery, external memory expandable upto 32GB, 5MP rear camera, 3G, WiFi, A-GPS.

Retailer/Website: www.flipkart.com

Samsung Galaxy Ace Duos (GT- S6802)

OS:

Android 4.0Launch Date:

June 2012MRP:

` 43,180ESP:

` 37,990Specification: 12.19 cm capacitive touchscreen, 720x1280 pixels screen resolution, 1.4GHz quad core processor, 2100mAh battery, 16GB RAM, external memory expandable upto 64GB, 8MP rear camera, 3G, WiFi, A-GPS.

Retailer/Website: www.adexmart.com

Samsung Galaxy SIIIOS:

Android 4.0Launch Date:

June 2012MRP:

` 14,299ESP:

` 14,299Specification: 8.9 cm HVGA display, 320x480 pixels screen resolution, 600MHz processor, 1230mAh battery, 512MB RAM, 25GB of Dropbox space, 5MP camera with LED flash, Beats Audio, GPRS, Bluetooth, WiFi, A-GPS.

Retailer/Website:www.buytheprice.com

HTC Desire C

OS:

Android 2.3Launch Date:

April 2012MRP:

` 8,150ESP:

` 6,990Specification: 7.11 cm super AMOLED display, 320X240 pixels screen resolution, 832MHz processor, 1200mAh battery, external memory expandable upto 32GB, 3.5 mm audio jack.

Retailer/Website: www.flipkart.com/ww.letsbuy.com

Samsung Galaxy Pocket

OS:

Android 2.3Launch Date:

May 2012MRP:

` 20,499ESP:

` 19,999Specification: 9.4 cm capacitive touch screen display, 854×480 pixels screen resolution, 1GHz dual core processor, 5MP rear camera with auto focus, 512MB RAM, 8GB internal memory, external memory expandable upto 32GB.

Retailer/Website: www.flipkart.com

Sony Xperia SolaOS:

Android 2.3Launch Date:

May 2012MRP:

` 9,000ESP:

` 7,599Specification: 8.1 cm TFT LCD capacitive touch display, 240×320 pixels screen resolution, 800MHz processor, 384MB RAM, 1540mAh battery, 3MP camera, MP3, 3.0 Bluetooth, A-GPS.

Retailer/Website: www.infibeam.com

LG Optimus L3 E400OS:

Android 2.3Launch Date:

May 2012MRP:

` 10,000ESP:

` 8,845Specification: 9.7 cm capacitive touchscreen, 800x480 pixels screen resolution, 1GHz processor, external memory expandable upto 32GB, 1600mAh battery, 5MP HD rear

camera with dual LED flash, FM, 3G, WiFi.Retailer/Website:www.adexmart.com

Karbonn A9OS:

Android 2.3Launch Date:

May 2012MRP:

` 17,399ESP:

` 16,499Specification: 8.9 cm scratch-resistant TFT touchscreen, 854×480 pixels screen resolution, 1GHz dual core processor, 5MP rear camera with auto focus, FM, WiFi.

Retailer/Website: www.flipkart.com

Sony Xperia U Samsung Galaxy S AdvanceOS:

Android 2.3Launch Date:

May 2012MRP:

` 26,790ESP:

` 23,749Specification: 10.2 cm capacitive super AMOLED touch screen display, 1GHz dual core processor, external memory expandable upto 32GB, 1500mAh battery, 6GB RAM, 5MP rear camera, 1.3MP front camera, WiFi, 3.0 Bluetooth.

Retailer/Website: www.letsbuy.com

OS:

Android 2.2Launch Date:

May 2012MRP:

` 7,999ESP:

` 7,999Specification: 8.9 cm TFT capaci-tive touchscreen, 600 MHz processor, 1250mAh battery, 512MB RAM, 3.2MP camera, external memory expandable upto 32GB, 3.5 mm audio jack, 3G, WiFi.

Retailer/Website: www.flipkart.com

Idea BladeOS:

Android 2.3Launch Date:

April 2012MRP:

` 4,990ESP:

` 4,990Specification: 7.1 cm ca-pacitive touchscreen, 650MHz processor, 1200mAh battery, 2MP rear camera, external memory expandable upto 32GB, 512MB RAM, 3G, Bluetooth, WiFi.

Retailer/Website: www.flipkart.com/www.letsbuy.com

Micromax A50 Ninja

OS:

Android 2.3Launch Date:

May 2012MRP:

` 32,549ESP:

` 30,999Specification: 10.9 cm TFT ca-pacitive touchscreen, 1280×720 pixels screen resolution, 1.5GHz dual core processor, 1750mAh battery, 1GB RAM, 12.1MP rear camera, 1.3MP front camera, 720p HD video recording.

Retailer/Website: www.flipkart.com

Sony Xperia SOS:

Android 2.2Launch Date:

May 2012MRP:

` 5,850ESP:

` 5,799Specification: 7.1 cm TFT capaci-tive touchscreen, 528 MHz processor, 1250mAh battery, 3.2MP primary camera, external memory expandable upto 32GB, 3G, WiFi.

Retailer/Website: www.flipkart.com

Idea ID280

SMARTPHONES

Motorola Defy XTOS:

Android 2.3Launch Date:

June 2012MRP:

` 16,190ESP:

` 16,190Specification: 9.4 cm display, 1GHz processor, 1650mAh battery, 512MB RAM, external memory ex-pandable upto 32GB, 5MP rear camera with auto focus and LED flash, 720p HD video recording, Water resistant and repellent and dust resistant.

Retailer/Website: www.flipkart.com

NEW NEW NEW NEW NEW

NEW NEW NEW NEW NEW

NEW

12 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 15: Linux for You 2012-07

OS:

Android 2.3Launch Date:

May 2012MRP:

` 3,999ESP:

` 3,999Specification: 17.8 cm TFT display, 800x480 pixels screen resolution, 512MB RAM,1GHz processor, 1450mAh battery, 0.3MP camera, 3G, WiFi.

Retailer/Website: www.mercury-tab.com

Kobian Mercury iXA Tab

OS:

Android 2.3Launch Date:

May 2012MRP:

` 11,999ESP:

` 11,999Specification: 17.8 cm capacitive TFT touchscreen, 800×480 screen resolution, 1GHz ARM Cortex A8 processor, 440mAh battery, 8GB internal memory, 32GB internal memory, 512MB RAM, 1080p HD video recording.

Retailer/Website: www.flipkart.com

iBall Slide i7218

OS:

Android 4.0Launch Date:

May 2012MRP:

` 23,250ESP:

` 19,300Specification: 17.8 cm WSVGA TFT capacitive touchscreen, 1024x600 pixels screen resolution, 1GHz dual core processor, 4000mAh battery, 1GB RAM, external memory expandable upto 32GB, 3MP rear camera, 3G, WiFi, A-GPS.

Retailer/Website: www.flipkart.com

Samsung Galaxy Tab 2 310

Zync Z919OS:

Android 2.3Launch Date:

March 2012MRP:

` 6,990ESP:

` 5,490Specification: 17.8 cm TFT resistive touch screen, 800×480 pixels screen resolution, 1.2GHz processor, 512MB RAM, 4GB internal memory, external memory expandable upto 32GB, 3600mAh battery, 0.3MP front camera, 3.5mm audio jack, 3G.

Retailer/Website: www.flipkart.com/www.letsbuy.com

OS:

Android 4.0Launch Date:

March 2012MRP:

` 8,990ESP:

` 8,500Specification: 17.8 cm TFT capacitive touch screen, 800×480 pixels screen resolution, 1.2GHz processor, 1GB RAM, 4GB internal memory storage, external memory expandable upto 32GB, 3600mAh battery, 0.3MP front camera, 3.5mm audio jack, 3G.

Retailer/Website: www.flipkart.com/www.letsbuy.com

Zync Z990

OS:

Android 2.3Launch Date:

March 2012MRP:

` 11,900ESP:

` 11,900Specification: 20.3 cm capacitive two point touch screen, 1GHz cortex A8 core processor, 5000mAh battery, 8GB internal memory, external memory expandable upto 32GB, 3.5mm audio jack, secondary camera for video calling.

Retailer/Website: www.91mobiles.com

Intex iTabOS:

Android 2.2Launch Date:

March 2012MRP:

` 5,500ESP:

` 5,500Specification: 17.8 cm capacitive touch screen, 800MHz processor, 512MB RAM, 2GB internal memory, external memory expand-able upto 32GB, 3.5mm audio jack,WiFi, 3G.

Retailer/Website: http://www.wishtel.com/estore.php

Wishtel Ira ThingOS:

Android 2.2Launch Date:

March 2012MRP:

` 4,000ESP:

` 4,000Specification: 17.8 cm resistive touch screen, 800MHz processor, 512MB RAM, 2GB internal memory, external memory expandable upto 32GB, 2800mAh battery, 3.5mm audio jack, WiFi, 3G.

Retailer/Website: http://www.wishtel.com/estore.php

Wishtel Ira

OS:

Android 3.2Launch Date:

March 2012MRP:

` 49,999ESP:

` 48,000Specification: 25.7 cm IPS+ display, 1280×800 pixels screen resolution, 1.3GHz Quad core Tegra 3 CPU, 8MP rear camera with LED flash, 25Wh Li-polymer battery.

Retailer/Website: Eurotech, Nehru Place, New Delhi, 09582052800

ASUS Eee Pad Trans-former Prime TF 201

OS:

Android 2.3Launch Date:

March 2012MRP:

` 10,999ESP:

` 10,999Specification: 17.8 cm touch screen, 1GHz processor, 512MB RAM, 4GB internal memory, external memory expandable upto 32GB, 1080p HD video, GPS, 3G, Bluetooth.

Retailer/Website: www.pantel.in

BSNL Penta T-Pad WS704C

Tablets

OS:

Android 2.3Launch Date:

May 2012MRP:

` 14,999ESP:

` 13,990Specification: 17.8 cm capacitive touchscreen display, 800x480 pixels screen resolution, 1GHz processor, 512MB RAM, 3400mAh battery, front 0.3MP camera, 1080p HD video recording, 3G, WiFi.

Retailer/Website: www.maniacstore.com

Mercury mTab Neo2OS:

Android 4.0Launch Date:

May 2012MRP:

` 7,999ESP:

` 7,290Specification: 17.8 cm capacitive 5 point multi touch screen, 1.2GHz processor, external memory expandable upto 32GB, 2MP front camera, 3D G-Sensor for Gaming Experience, 3G, WiFi.

Retailer/Website: www.infibeam.com

Karbonn Smart Tab 1

OS:

Android 4.0Launch Date:

May 2012MRP:

` 5,250ESP:

` 5,250Specification: 17.8 cm capacitive touchscreen, 800x480 pixels sceen resolution, 1.5GHz processor, 512MB RAM, 3000mAh battery, 3G, WiFi, G-Sensor

Retailer/Website: www.wickedleak.org

Wammy 7

OS:

Android 4.0Launch Date:

May 2012MRP:

` 5,399ESP:

` 5,399Specification: 17.8 cm capacitive multi touch WVGA, 800×480 pixels screen resolution, 1.2GHz ARM Cortex A8 processor, 512MB RAM, 3800mAh battery, 4GB internal memory, external memory expandable upto 32GB, 3.5 mm audio jack, WiFi.

Retailer/Website: http://www.telmoco.com/www/pre_book

Attitude DakshaOS:

Android 4.0Launch Date:

April 2012MRP:

` 10,990ESP:

` 10,200Specification: 17.8 cm multi-touch capacitive touch-screen, 800×480pix-els screen resolution, 1GHz processor, 3500mAh battery, 512MB RAM, 4GB NAND storage, external memory expandable upto 32GB, 2MP front camera.

Retailer/Website: www.letsbuy.com

HCL ME Tab X1OS:

Android 4.0Launch Date:

April 2012MRP:

` 6,499ESP:

` 6,499Specification: 17.8 cm capacitive touch screen, 800×480pixels screen resolution,1.2GHz cortex A8 processor, 2800mAh battery, 4GB NAND storage, external memory expandable upto 32GB, VGA front fac-ing camera, 2160p HD video recording.

Retailer/Website: www.flipkart.com

Micromax Fun-book

Com

pile

d by

: Ips

ita S

arka

r, LF

Y Bu

reau

Netbooks

OS:

MeeGoLaunch Date:

August 2011MRP:

` 12,290ESP:

` 11,840Specification: 25.7 cm WSVGA anti-reflective LED,1024×600 pixel screen resolution,1.33GHz Intel ATOM processor, 1GB DDR3 memory, Intel GMA 3150 graphics, 250GB HDD, 3 cell (40 W) battery, 4-in-1 card reader, 1.03kg.

Retailer/Website: Croma Store, Saket, New Delhi, +91 64643610

Samsung N100OS:

MeeGoLaunch Date:

August 2011MRP:

` 12,499ESP:

` 12,000Specification: 25.7 cm LED-backlit screen, Intel Atom processor N455 CPU, 1GB DDR3 RAM expandable upto 2GB, 220GB storage, Bluetooth 3.0, Wi-Fi 802.11 b/g/n, 17.6mm thick, 920g.

Retailer/Website: Eurotech Infosys, Nehru Place, Delhi, 9873679321

ASUS EeePC X101 Acer Aspire One HappyOS:

AndroidLaunch Date:

March 2011MRP:

` 17,999ESP:

` 15,490Specification: 25.7 cm WSVGA high-brightness display with a 16:9 aspect ratio, dual-core Intel Atom N455, 1 GB RAM, Intel graphics media accelerator 3150 and internal hard disc memory of 320 GB, Bluetooth 3.0+ HS support, Wi-Fi, built-in multi-in-one card reader.

Retailer/Website: Vijay Sales, Mumbai, 022-24216010

OS:

Android 2.3Launch Date:

June 2012MRP:

` 16,499ESP:

` 15,490Specification: 17.8 cm WVGA display, 800x480 pixels screen resolution, 1GHz processor, 4400mAh bat-tery, 8GB built-in memory, external memory expandable upto 32GB, 2MP front camera, WiFi, Bluetooth.

Retailer/Website: www.adexmart.com

iBall Slide 3G-7307

NEW NEW NEW NEW NEW

NEW

www.linuxForu.com | lINuX For you | july 2012 | 13WorldMags.netWorldMags.net

Page 16: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 17: Linux for You 2012-07

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

010101010101010101010

WorldMags.netWorldMags.net

Page 18: Linux for You 2012-07

Price: ` 23,250; Tata Docomo has a very attractive offer of a 3 GB data download that comes free over a three-month period with the Galaxy Tab 2 310. Brand managers: Ruchika Batra, Pramuch Goel Address: Samsung India Pvt Ltd, 2nd, 3rd and 4th Floors, Tower C, Vipul Tech Square, Old Golf Road, Sector-43, Gurgaon – 122002 Email: [email protected], [email protected], Ph: 0124-3030 8282, 1800 110011 Website: www.samsung.com

Samsung launches Samsung Galaxy Tab 2 310In May 2012, Samsung Electronics launched the Samsung Galaxy Tab 2 310, expanding the offerings from this popular range. Light and portable, the Galaxy Tab 2 310 is perfect for those on the go.

The 17.8 cm device is available with 3G and Wi-Fi, and is Samsung’s first Android 4.0-powered tablet featuring new and improved features from Google’s mobile OS. This includes Google Play, a new hub for more than 450,000 applications, as well as improved Web browsing, faster response time and a more intuitive UI with upgraded swipe control applications.

Samsung's ‘Readers Hub’ gives users access to more than two million e-books, 3500 magazines in 25 languages, and more than 2,000 newspapers in 51 languages. The ‘Game Hub’ instantly connects users to the latest game titles, and ‘My Movies’ gives consumers access to more than 500 full movies and over 2500 music videos. The Galaxy Tab 2 310 is powered by a 1 GHz dual core processor, and comes with a 4000 mAh battery and 16 GB storage that is expandable up to 32 GB for large-sized multimedia and digital content.

NEW PRODUCTSNEW PRODUCTSNEW PRODUCTS NEW PRODUCTS

Amkette unveils EvoTV to make TV viewing more interactiveIn June 2012, Amkette launched EvoTV, a first-of-its-kind interactive, customisable, Android-based device with an intelligent Touch Remote to redefine the television experience.

EvoTV features an endless number of customisable views that allow you to access what you want to see, with a single click; a remote that houses a microphone so that all conversations over VoIP (like Skype) are free of ambient noise; an accelerometer in the remote that takes game-playing to a new level altogether; the integration of the Home Network using DLNA (for media) and content from other media storage devices; and Evo Discover, a dynamic content discovery software that allows consumers to search and retain video content from sources such as YouTube.

The very low power consuming EvoTV is powered by the twin processors, ARM Cortex A9 and ARM Mali 400 Graphics Processor. It has 4 GB of inbuilt memory, up to 1080p full HD video and built-in Wi-Fi and Ethernet ports. The EvoTV is available in Delhi (NCR), Mumbai, Bengaluru and Kolkata. It is also expected to be available in 40 cities by the end of August 2012.

Price: ` 12,995; Street price: ` 9,995 with Evo Touch Remote Address: Amkette, C 64/4 Okhla Industrial Area, New Delhi - 110020 Website: www.amkette.com

16 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 19: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 20: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 21: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 22: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 23: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 24: Linux for You 2012-07

Linus Torvalds shares ‘Tech Nobel’ with Shinya YamanakaLinus Torvalds, the Linux kernel creator, shared the 2012 Millennium Technology Prize, also known as 'Tech Nobel', with Shinya Yamanaka, the Japanese physician and stem cell researcher. They both have received an equal cut of the €1.2 million prize.

The President of the Republic of Finland, Sauli Niinistö, presented the prize on June 14, 2012, during the ceremony at the Finnish National Opera in Helsinki in front of an audience of scientists and business leaders. This is the first time that the Grand Prize has been shared by two scientists.

Linus Torvalds, a Finnish-American citizen born in Finland, has been awarded the prize for creating the Linux kernel, which was a revolutionary new open source operating system for computers back in 1991 when it was launched. Since then, 73,000 man years have been spent fine-tuning the code. On the other hand, Dr Shinya Yamanaka, a Japanese citizen, has been awarded the prize in recognition of his discovery of a new method to develop induced pluripotent stem cells for medical research. Using his method to create stem cells, scientists all over the world are making great strides in medical drug testing and biotechnology research.

Charles H Schulz announces plans to assist MandrivaCharles H Schulz said in a post on the official Mandriva blog that he would be assisting the company as an advisor on open source strategy.

“As Mandriva is entering a new phase in its history, it has started an important conversation with the community about the future of the Mandriva Linux distribution, its governance and its goals. My name is Charles H Schulz; you may know me from other Free and Open Source Software (FOSS) projects, and I will be assisting Mandriva and its community in defining our future and how best we will serve the interests of the community, of software freedom, and of Mandriva SA,” he added.

Schulz was earlier involved in the founding of the Document Foundation. At present, he is a board member of the Document Foundation, which created the LibreOffice fork of OpenOffice.

Facebook releases Folly software components to the publicIt is a well-known fact that the social networking giant, Facebook, uses Linux to run its site. Moving closer to the open source world, the company has now released Folly, its library of C++ software components that it had so far used only internally, to the public. This will aid in making more programs open source.

This will even simplify Facebook’s internal procedures. Previously, whenever Facebook needed to make any open source releases, it had to rewrite the complete internal library functions. But this new initiative will change that. Computer engineers working in heavy production environments will find this library useful because it has many components that run faster than their equivalents. Folly primarily contains equivalents of two common C++ standard library utilities. These are std::string and std::vector. Detailed

Linux Foundation announces the 2012 Linux Scholarship ProgrammeKeeping in mind the increasing demand for Linux professionals, the Linux Foundation announced its 2012 Linux Training Scholarship Programme. It has also announced the new Enterprise Linux Training programme, which aims at preparing the next generation of enterprise architects.

The annual scholarship programme extends the reach of Linux training opportunities by awarding five scholarships to computer science students, Linux developers and architects who show incredible promise for helping to shape the future of Linux but do not otherwise have the ability to attend Linux Foundation training courses. Each scholarship will cover the expense for one course from The Linux Foundation's course catalogue, a value averaging more than $2,500.

Scholarship applicants are invited to fill out a brief submission form online at: https://training.linuxfoundation.org/2012-linux-training-scholarship-program. Winners will be selected based on demonstrated need, proven interest in working on Linux and their vision for the future of the operating system.

Submissions are due by 12:01 a.m., PT on July 11, 2012 and will be reviewed by The Linux Foundation. Recipients will be notified in early August.

The Linux Foundation will provide vendor-neutral, technically advanced training in Linux systems administration, networking, security and cloud computing. While there are a variety of enterprise Linux training programmes around, The Linux Foundation is expanding its programme to train enterprises that have technology as the core strategy of their businesses, and are optimising Linux and open source for competitive advantage.

22 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 25: Linux for You 2012-07

Features include:Features include:

ON LINUX HOSTINGON LINUX HOSTING

Starts @

per monthJ59

Starts @

per monthJ59

BRLFY30USE COUPON CODE

Domains, Websites & more...

1-800-200-7625 (India Toll Free)

[email protected]

www.bigrock.com

Features include: Features include:

ON LINUX HOSTING ON LINUX HOSTING

Starts @

per monthJ59

Starts @

per monthJ59

BRLFY30USE COUPON CODE

Domains, Websites & more...

1-800-200-7625 (India Toll Free)

[email protected]

www.bigrock.com

Features include: Features include:

ON LINUX HOSTING ON LINUX HOSTING

Starts @

per monthJ59

Starts @

per monthJ59

BRLFY30USE COUPON CODE

Domains, Websites & more...

1-800-200-7625 (India Toll Free)

[email protected]

www.bigrock.com

With most hosting plans, you have a choice to make: Do I get an advanced plan that’s complicated and expensive or settle for a plan with an early-generation server that won’t grow with my site? Now you don’t have to choose. 4GH offers superior performance and reliability for an unbelievably low price.

What makes 4th Generation Hosting (4GH) so revolutionary?

Get Deluxe 4GH Hosting for the price of Economy. • 150 GB Space • Unlimited Websites & Bandwidth • 500 Email Accounts • 25 MySQL Databases (1 GB ea.) • Plus FREE Extras!

Enter promo code LINUX4YOU2 for your discount.

GREATER RELIABILITY

with Dynamic Server Management

IMPROVED PERFORMANCEwith Dynamic Traffi c

Management

SUPERIOR SECURITY

with Dynamic Defense Management

Get Deluxe 4GH Hosting for the price of Economy. • 150 GB Space • Unlimited Websites & Bandwidth • 500 Email Accounts

FREEUPGRADE!

in.godaddy.com/hosting

*As compared to sites hosted on a single server.

This upgrade offer applies only to plans with an initial term of 12 months or longer; after initial term, the plan will renew at standard Deluxe pricing.

WorldMags.netWorldMags.net

Page 26: Linux for You 2012-07

components are being utilised for using memory efficiently, for reducing contention, for string manipulation, etc. Facebook has added the Folly library on GitHub, and the company has plans to keep updating it with new components as and when they are written.

Samsung pumps $500K into the Linux Foundation to fight iOSSamsung Electronics has invested $500,000 to join the Linux Foundation at the platinum level, which is the highest tier of membership. This will allow the electronics giant to have greater oversight on the forthcoming versions of Linux. This includes the much-awaited Tizen platform as well.

This announcement strengthens Samsung’s commitment to Linux and investing its resources in a platform will help the company sustain its global leadership position. The company will work with The Linux Foundation on streamlining its participation with the kernel community and adopting open source best practices.

Red Hat delivers cloud flexibility and agility to enterprisesRed Hat Inc, the world’s leading provider of open source solutions, today announced the next step in its delivery of open hybrid cloud solutions to enterprises with the general availability of Red Hat CloudForms. This is an open hybrid cloud management platform built to enable enterprises to create and manage Infrastructure-as-a-Service (IaaS) hybrid clouds with the ability to make self-service computing resources available to users in a managed, governed and secure way.

CloudForms delivers the flexibility and agility businesses want with the control and governance that IT needs. Organisations can build a hybrid cloud that encompasses a wide variety of infrastructure from many vendors, thus managing their cloud applications while avoiding vendor lock-in. With CloudForms, enterprises can build and manage an open enterprise hybrid cloud, providing infrastructure choices spanning multiple virtualisation platforms and extending to public cloud resources.

Thunderbird 13 debuts with ‘Filelink’Mozilla is showering us with exciting updates and the latest one is the Thunderbird 13 with ‘Filelink’ as an addition. Filelink lets you send large attachments by uploading them on an online storage service and sending the link to the file instead of those bulky attachments directly to the recipient. This would help avoid the bouncing back of emails. Till now, only the YouSendIt service was available for large attachments.

Mozilla has partnered with the domain name and email management service providers Hover.com and Gandi.net to provide the users a personalised email address within the application, which will be automatically configured to send and receive messages.

Interested in learning FOSS in your own language?IIT-Bombay is working on a project called The Spoken Tutorial, which as the name suggests, offers vocal tutorials on various Free and Open Source Software in different Indian languages. Shyama Iyer, project manager, Events - India at IIT-Bombay, said, "The objective of The Spoken Tutorial is to provide knowledge of Free and Open Source Software to the masses who do not have access to any means of learning the software. Lack of knowledge about accessibility, proper guidance, availability of infrastructure and difficulty in understanding English are the common hindrances in promoting FOSS. We have tried to deal with these issues through these tutorials."

The aim of this project is to make every Indian switch to open source software. Iyer added, “Our project is a part of the National Mission on Education through ICT, funded by the Ministry of Human Resource Development, Government of India. We're working towards our vision by training college students and faculty on software that they can use in their professional life—for example, Scilab, Python, PHP, MySQL, LaTeX and Linux. This training is also offered to corporate houses. We also offer training on Libre Office and Ubuntu to staff members of schools, colleges, government offices and companies."

IIT-Bombay also offers Faculty Development Program on LaTeX to all faculty members, thus aiming to improve educational institutions across India. It has worked on making Scilab a part of KIET (Krishna Institute of Engineering and Technology) Ghaziabad's regular curriculum for Electronics Engineering and Computer Science Engineering.

To avail any of these training programmes, all a learner needs is a computer and a basic mobile ear-phone. Learners need not leave their campus to avail the training. Spoken Tutorials reaches out to its learners through networking. This network is being spread out across the country by students and faculty who have experienced the magic of learning FOSS using the AV Instructional Methodology, i.e., 'Spoken Tutorials'. These AV tools are sent by the team in IIT-Bombay in a CD (and can also be downloaded from http://spoken-tutorial.org).

24 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 27: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 28: Linux for You 2012-07

BigRock offers a wide variety of Web hosting solutions, catering to individuals, SMBs and enterprises. These include Linux hosting, Windows hosting, WordPress hosting, CMS hosting, e-commerce hosting, and reseller hosting (Linux). Offerings in the Windows reseller hosting, Virtual Private Servers (VPS) and dedicated server space are expected to roll out soon.

Major Linux-based offerings: The company’s shared hosting product is bifurcated into single and multi-domain hosting plans to enable customers to pick packages as per their needs. BigRock bundles the cPanel control panel with its Linux hosting packages that support the entire LAMP (Linux, Apache, MySQL and PHP) stack.

With respect to Linux hosting solutions, the company has a 1-click install WordPress hosting product, which is growing increasingly popular. Additionally, BigRock offers Joomla and Drupal hosting solutions to enable its customers to manage content efficiently. With respect to hosting e-commerce sites, BigRock supports ZenCart, CubeCart and other popular shopping cart integration tools on its Linux hosting platforms. The firm’s Linux reseller hosting solutions allow customers to set up their own hosting business.

Open source tools used: BigRock offers data centre management tools (RackMonkey and Puppet), server monitoring tools (Nagios and Ganglia) and reporting tools (Graphite).

Leading clients: The company is primarily focused on SMEs, Web designers, students and individuals looking for reliable and cost-effective hosting solutions.

USP: It offers 'affordable Web hosting' for personal websites, 'business hosting' for small business websites, and 'professional hosting' for large enterprises. It claims to own the best-in-class hardware with Dual Quad Core Xeon processors backed by 24 GB of RAM and dedicated bandwidth pipes. BigRock recruits the best technical talent, along with providing a 24x7 support infrastructure. Overall, its hosting plans are backed by the following promises: 99.9 per cent uptime, dedicated 24/7 technical support, a 30-day money back guarantee, and Rs 8000 worth of Google Adwords credit, free.

Website: www.bigrock.in

CtrlS offers various types of Web hosting solutions that comprise VPS, real cloud, enterprise cloud, private cloud, dedicated servers, hosted exchange, Smarter email, SAAS and apps, disaster recovery, high availability, load balancing and clustered solutions.

Major Linux-based offerings: CentOS, RHEL, Ubuntu-based VPS, cloud and dedicated servers. It has hosted Zimbra and other Linux-based email solutions, and has control panels for Web automation like Parallels, Cpanel, etc.

Open source tools used: CtrlS uses open source tools for some auditing, virtualisation and management activities.

Leading clients: The firm has catered to 300 Web hosters, including the top 100 in India and many other reputed companies like Spicejet, Sonata Software, Satnav Technologies, Buytheprice.com, etc.

USP: Super fast provisioning, a very high level of automation, self-management portal for customers, high availability solutions including DR, and a 99.995 per cent uptime SLA or Service Level Agreement (as per Tier IV Standards).

Special mention: The company has been listed among the prestigious NASSCOM Emerge 50 companies. It is also certified for ISO 20000-1, ISO 27001 and Tier IV standards.

Website: www.ctrls.com

BigRock | Mumbai, India

CtrlS | Hyderabad, India

LEAD

ING

Drupal

WordPress

Java Tomcat

PHP hosting

Perl CGI

Linux VPS

LAMP

MySQL

PostgreSQL

Web hosting

CentOS

Linux servers

A List Of Leading Web Hosting Solutions Providers

26 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 29: Linux for You 2012-07

With most hosting plans, you have a choice to make: Do I get an advanced plan that’s complicated and expensive or settle for a plan with an early-generation server that won’t grow with my site? Now you don’t have to choose. 4GH offers superior performance and reliability for an unbelievably low price.

What makes 4th Generation Hosting (4GH) so revolutionary?

Get Deluxe 4GH Hosting for the price of Economy. • 150 GB Space • Unlimited Websites & Bandwidth • 500 Email Accounts • 25 MySQL Databases (1 GB ea.) • Plus FREE Extras!

Enter promo code LINUX4YOU2 for your discount.

GREATER RELIABILITY

with Dynamic Server Management

IMPROVED PERFORMANCEwith Dynamic Traffi c

Management

SUPERIOR SECURITY

with Dynamic Defense Management

Get Deluxe 4GH Hosting for the price of Economy. • 150 GB Space • Unlimited Websites & Bandwidth • 500 Email Accounts

FREEUPGRADE!

in.godaddy.com/hosting

*As compared to sites hosted on a single server.

This upgrade offer applies only to plans with an initial term of 12 months or longer; after initial term, the plan will renew at standard Deluxe pricing.

WorldMags.netWorldMags.net

Page 30: Linux for You 2012-07

go4hosting provides six types of Web hosting services: shared hosting, VPS (Vir tual Private Server) hosting, dedicated hosting, co-location hosting, cloud hosting and reseller hosting. Each of these is further divided into different categories under Linux and Windows with various plans.

Major Linux-based offerings: Linux shared hosting, Linux VPS hosting, Linux dedicated servers, Linux cloud hosting, Linux reseller servers and Linux cloud hosting.

Open source tools used: Nagios, Racktable, Cacti, etc.

Leading clients: Indian Oil, GAIL India, Network 18, UNICEF, Le Meridien, Kingfisher, Videocon, Manipal Group, Wipro, ICICI, etc.

USP: 8 hours service delivery/best price gurantee/high availibility solutions with SLA.

Special mention: The company has been awarded the President of India’s award for excellence in services and has received a number of other prestigious awards like the Micro, Small & Medium Enterprises (MSMEs) and Rajasthan State Award for Export Excellence. The company also recently got its ISO 27001:2005 security certification from the prestigious BSI Group.

Website: www.go4hosting.com

go4hosting | Jaipur & Noida, India

eWebGuru offers shared hosting, reseller hosting and VPS on Linux and Windows environments.

Major Linux-based offerings: The company uses the CentOS distro in all its Linux servers. For VPS, it uses OpenVZ virtualisation. It offers VPS services only on Linux servers.

Open source tools used: The company basically manages its servers through the WHM and SolusVM panels, which are paid tools. However, for server firewalls, it uses CSF (ConfigServer Security and Firewall), and for server security and hardening it uses Mod Security tools, which are open source. For the database, the MySQL community edition is used and for scripting, it is PHP.

USP: eWebGuru is one of the fastest growing companies in the Web hosting sector and it is recognised for the quality of its support. It provides 24x7 local online support and its prices are the most competitive in the market.

Website: www.ewebguru.com

eWebGuru | Noida, India

Go Daddy offers various types of Web hosting solutions. 4th Generation Hosting (4GH) is its most affordable Web hosting solution, with clusters of load-balanced servers distributing the load across several servers in a cloud environment. Other types of solutions offered include vir tual dedicated hosting, dedicated servers and managed hosting. Cloud servers, the newest offering from the company, combines convenient control panels, a strong infrastructure and frequently used features, like firewalls and load balancers.

Major Linux-based offerings: 4GH Web hosting, cloud servers and dedicated, virtual private and managed servers running CentOS, Fedora or Ubuntu.

USP: Go Daddy delivers world-class solutions and its 24/7 customer support guarantees help from a ‘real person’ when you need it.

Special mention: In 2012, Go Daddy was voted the ‘Best Web Host’ by About.com readers, capturing 90 per cent of the votes.

Website: www.godaddy.com

GoDaddy.com | Scottsdale & Arizona, USA

LEAD

ING

Drupal

WordPress

Java Tomcat

PHP hosting

Perl CGI

Linux VPS

LAMP

MySQL

PostgreSQL

Web hosting

CentOS

Linux servers

28 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 31: Linux for You 2012-07

Hostcats offers various types of Web hosting solutions including shared hosting, reseller hosting, VPS hosting, blog hosting and dedicated servers.

Major Linux-based offerings: Linux VPS, Linux shared and reseller hosting.

Open source tools used: Nagios, CentOS and Ubuntu

Leading clients: www.cosmosbank.com, www.theindianmoney.com

Special mention: The company offers 24/7 support with a 30-minute Service Level Agreement. There's a 100-day money-back guarantee for shared and reseller hosting clients. Also, the firm’s most popular plan comes loaded with daily back-ups, low prices, 99.9 per cent uptime guaranteed, McAfee anti-virus and a free website builder plan.

Website: www.hostcats.com

Hostcats.com | Bengaluru, India

IndiaLinks, an ICANN accredited domain registrar and leading managed hosting provider, offers innovative Web solutionsthat combine best-in-breed technology with a 100 per cent uptime guarantee. IndiaLinks offers shared hosting on Linux and Windows, reseller hosting, enterprise email hosting, dedicated hosting, cloud hosting and VPS. IndiaLinks' core products and services also include managed DNS, SSL cer tificates, website security solutions, email archiving, etc.

Open source tools used: All the tools used are developed in-house using open source technology.

Leading clients: IndiaLinks caters to thousands of customers from small businesses to industry leaders from over 200 countries world wide.

USP: Customised hosting environment for the stability, security and features required for business class hosting, state-of-the-ar t data centers, instant provisioning, amazing customer service – LiveSupport, automated monitoring and disaster recovery systems.

Special mention: IndiaLinks is proud of its in-house developed hosting business automation technology, which is being used by various Web hosts, ISPs, domain registrars and resellers to offer high-end Web solutions to their customers.

Website: www.indialinks.com

Net4 offers the following types of hosting services on both Linux and Windows platforms (with and without database support): shared Web hosting, dedicated hosting, cloud hosting and managed hosting.

Major Linux-based offerings: PHP hosting, Java Tomcat, Ruby on Rails, Perl CGI, Python, CMS applications such as Joomla, WordPress, Drupal, etc, and MySQL and PostgreSQL for databases.

Open source tools used: The company uses open source monitoring tools such as MRTG and Cacti for leased lines, routers, switches, servers and network utilisation monitoring. The firm also uses Zabbix, an open source NMS to monitor its servers’ health, checking the following parameters—CPU, RAM, space, I/O, etc, to ensure a proactive aler ts system. Additionally, the company uses Linux-based software load balancers and open source software inventory management, i.e., OCS inventory, the open source version of the Xen/VMware server for vir tualisation at testing and lab environments, the open source helpdesk ORTS, which is an ITIL compliant helpdesk system and the CentOS Yum repository for patch management for all CentOS Linux systems.

Leading clients: obcindia.com and psbindia.com in the banking sector; Alkem Industries, Glenmark Pharmacy, Apollo Hospitals and GTB Hospital in the health sector; Air India Express and the Air Force Association among the airlines; the Air Force Bal Bharati School, the CRPF School, and the Punjab State Board of Technical Education and Industrial Training (PSBTE & IT) in the educational domain. Its clients include several other leading companies like Daikin, Nirula, Pantaloon Retail India Ltd, Cellcast, JIL Information Technology Ltd, Aircel Ltd, Uniglobe, Parsvnath Developers Ltd, the Jaypee Group, DPLI ( DLF Primer Life insurance), Religare, ICICI Foundation, the Azim Premji Foundation, the Handicrafts & Handlooms Expor ts Corporation of India, Punjab Heritage and Tourism, etc.

USP: Net4 is the largest Web hosting company with over 90,000 websites hosted. Servers hosted are self-owned and managed in ISO 270001-cer tified data centres, with 99.99 per cent uptime guaranteed. The company also has truly unlimited data transfer and free usage repor ts, virus-free website hosting and 24x7 email and telephone support.

Special mention: The company received the ‘Emerging India Award’ from ICICI CNBCTV18 for the most promising IT company in India.

Website: www.net4.in

IndiaLinks | Mumbai, India

Net4 India Ltd | Noida, India

LEAD

ING

Drupal

WordPress

Java Tomcat

PHP hosting

Perl CGI

Linux VPS

LAMP

MySQL

PostgreSQL

Web hosting

CentOS

Linux servers

www.linuxForu.com | lINuX For you | july 2012 | 29WorldMags.netWorldMags.net

Page 32: Linux for You 2012-07

Tell Me More AboutAdvertising Opportunitiesin LFY Magazine

D-87/1, Okhla Industrial Area, Phase-1, New Delhi 110020Tel: 011-26810601/2/3; Fax: 011-26817563

Email: [email protected], Website: www.efyindia.com

LFY

I am aware that LFY Magazine presents umpteen advertising opportunities. I too would like to explore the various options available for my organisation, so that I can help it grow it terms of sales and brand presence. My details are mentioned below:

T H E C O M P L E T E M A G A Z I N E O N O P E N S O U R C E

Volume: 10 Issue: 04 Pages: 108 Edition# 112 JUNE 2012

JU

NE

2012

LIN

UX

FO

R Y

OU

VO

LU

ME

: 10 IS

SU

E: 0

4

6

9105001

770974

0

India ` 100

US $ 12

Singapore S$ 9.5

Malaysia MYR 19

FREE DVD

` 100ISSN 0974-1054

UNLEASHEDANDROID

Create Your Web

Server In 5 Minutes!

Running Android On Your PC

Know What’s Hot In

Ice Cream Sandwich

Power Your Phone With

Custom ROMs for Android

The Best Android Apps

For Scientists

Optimise Your Android

Apps With ZipalignDevelop Android WebApps

Using HTML5 Technologies

LEADING VIRTUALISATION

SOLUTIONS’ PROVIDERS IN INDIA!

Meet The Young Winners

Of The Google Coding ContestSuccesfully Secure

Your First JobGOOGLE

CODE-IN2011

V2web deals in shared hosting, VPS and dedicated server hosting systems.Major Linux-based offerings: The firm offers VPS and dedicated hosting on Linux servers.Leading clients: CII, PNB Investment Services Ltd, Polar Group, Securitrans India Pvt Ltd, Delhi Management Association, Consultancy Development Centre, the Ministry of Science and Technology, Government of India, Sir Ganga Ram Hospital.USP: V2web actively works on its motto “Customer's Victory (V) is our Victory (V) through Web Technology.”Special mention: The firm has retained its customers over the past eight years because of its prompt support and technical exper tise.Website: www.v2web.biz

ZNetLive offers complete Web hosting solutions star ting from shared hosting, reseller hosting, VPS, dedicated servers, cloud solutions, V-ready servers to high availability solutions.Major Linux-based offerings: The firm offers Vir tuozzo powered Linux servers along with shared, reseller and dedicated server hosting.Open source tools used: The company uses NagiOS to monitor the servers.Leading clients: ZNetLive works with various reputed brands including Symbiosis Institute of Management Studies (SIMS), ZEN Mobile, Sulekha, Ramada, Makemytrip.com, NSE, The Denim Story, JK Papers, IICA, SBI Cards, etc. USP: The firm offers a choice of data centers (in India or the US) to its customers, with 24x7 technical support through live-chat and a ticket system. It also ensures that the customers’ websites and applications enjoy 99.9 per cent uptime.Special mention: The company was selected by the HostReview’s editorial staff as one of the Top 10 Hosts in the ‘Best Affordable Hosting’ category for April 2012. It was also ranked as the best hosting company for April 2012 by bestwebdesignagencies.com based on the following parameters—commitment to excellence, excellent customer satisfaction, great depth of knowledge and for having unique advantages over its competitors. It was also recognised as the ‘Top Web Host of 2011’ by WebHostingSearch. ZNetLive was selected by HostReview’s award panel as one of the best Web hosting companies of 2011 in the ‘Readers’ Choice Award’ category. The firm even received the Deloitte Technology Fast 50 India and Fast 500 Asia Pacific Award for two consecutive years—2010 and 2011.Website: www.znetlive.in

V2web Hosting Pvt Ltd | Noida, India

ZNet Technologies Pvt Ltd (ZNetLive) | Jaipur, India

LEAD

ING

Drupal

WordPress

Java Tomcat

PHP hosting

Perl CGI

Linux VPS

LAMP

MySQL

PostgreSQL

Web hosting

CentOS

Linux servers

30 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 33: Linux for You 2012-07

Interv iew For U & Me

Linux based Web hosting solutions are gradually taking the lion's share in the global market. Apart from being economical, they are considered more flexible and scalable compared to their proprietary counterparts. The market share of Linux based Web hosting solutions ranged between 20 to 40 per cent in 2009 but has now increased to about 60 per cent, globally. In the Indian market, Linux based Web hosting solutions seem to rule the roost. According to P Sridhar Reddy, chairman and managing director, CtrlS Datacenters Ltd, Linux solutions make up for about 60-70 per cent of the Indian market. Diksha P Gupta from LINUX For You spoke exclusively to Reddy on this topic. Excerpts:

“Linux based Web hosting solutions are preferred for their stability and reliability”

P Sridhar Reddy, chairman and managing director,

CtrlS Datacenters Ltd

www.LinuxForU.com | LINUX For YoU | JULY 2012 | 31WorldMags.netWorldMags.net

Page 34: Linux for You 2012-07

For U & Me Interv iew

QWhat is the share of Linux in the server market? Why is it turning into a popular choice in the Web hosting domain?

Linux always has and will continue to enjoy the largest market share both globally and in India. The share of Linux-based Web hosting solutions is about 60-70 per cent in India. This kind of market share has been achieved because there are very usable control panels available for Web hosting, which allow the hosting clients to access the typical applications for mail, Web databases and for programming. The licensing costs of Linux-based Web hosting solutions are obviously low when compared to any proprietary solution, which makes them a cost-effective option. Moreover, the availability of operating systems that can be deployed instantly, without a licence, result in them being deployed at a much faster pace. I think Linux-based Web hosting solutions are considered more stable and reliable, and are able to fulfill the requirements of clients efficiently.

QWhat are the reasons behind the increasing popularity of cloud-based hosting services?

One main reason for the popularity is instant deployment. Also, these solutions are highly scalable, which includes upgrades and downgrades. Of course, the pay-per-use model also helps because people like to pay only for what they use on an hourly model and can keep their cloud server in switched off mode when they don't need it. This also means that clients have to pay for what they use only. This leads to a considerable cost saving. This means that clients have to worry only about their opex and not about the capex. The availability of freeware and open source software in the cloud space is another factor that accounts for this popularity. Organisations now have to come up with an hourly model for cloud services, as that is in demand.

QHow do Linux-based Web hosting solutions fare in India?Linux-based Web hosting solutions have one of the largest

markets in India. They are becoming increasingly popular amongst Indian companies primarily because of the cost factor. Yet another reason is the availability of hosting panels like the Parallels Plesk and Cpanel, and a lot of mail platforms are also built for Linux. In the initial days, mail was a major application that the hosting providers had been selling. The availability of the LAMP stack-based servers has made it easier for companies to deploy their applications faster. Indian service providers like to program in languages like MySQL, PHP, etc. So LAMP stack-based servers have been very popular in India from the very beginning.

QWhy are Linux-based Web hosting solutions considered scalable and flexible, compared to the proprietary options?

Linux-based Web hosting solutions have the advantage of being open source. Since they are developed by the community, the development is much faster as compared

to the proprietary model. Whether it is the bug fixes, the security upgrades or releasing patches, the community is prompt and quick. Also, because it is a community-shared platform, a lot of innovation happens and one can see a lot of creativity. The platform ends up becoming more robust and scalable as opposed to the applications developed by a single company.

QDo you also provide dedicated managed Linux servers?Yes, we do provide both managed and unmanaged

dedicated linux servers. These are branded and brand new servers. We provide Linux-based servers on a variety of platforms. We have made about 127 images available for the dedicated platforms. We have a dedicated Center of Excellence for 24x7 customer support, which is also continuously engaged in R&D.

QWhat are the advantages of having your own Tier IV data centre?

A Tier IV data centre has N+N redundancy across power, back-up and cooling. This allows us to provide an uptime SLA of 99.995 per cent. The power is taken from two different sources and both are in Active+Active configuration, which makes the data centre fault-tolerant and eliminates the requirement of any scheduled downtime for maintenance, unlike in the case of Tier III or Tier II data centres. CtrlS is Asia's largest Tier IV data centre and the only certified one in India.

QDo you have any special strategy or special offers for SMBs in India?

We have been targeting the SMB segment for the past two years, because there are no automated hosting ecommerce-based sites that are available in India for SMBs. The SMB segment prefers things that are based on a do-it-yourself kind of a model. Most of them like to go online and buy dedicated servers, virtual private servers or cloud-based services. None of the service portals currently available have instantly deployable or scalable solutions. SMB customers want instantly deployable solutions and want to pay only for their usage. So, we cater to these needs through our website ctrls.com, which is a completely automated e-commerce based website where the customers of Web hosting solutions can buy and deploy instantly. This site enables them to come online and just pay, using any payment method amongst the choices available. They can get that deployment quickly. They want them managed as well, because they do not have the kind of IT infrastructure and support teams that can do that. Keeping this in mind, we provide a 24X7 support team that helps them with all these applications. I would like to say that we are one of the most successful e-commerce websites in the cloud and dedicated servers space.

32 | JULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 35: Linux for You 2012-07

Insight For U & Me

Let's have a look at what Microsoft is offering. Bill Laing, corporate VP, Server and Cloud, made the announcement by saying...

“Hybrid cloud, which involves the use and building of applications that connect to data and services across a mix of data centers, is the reality for cloud computing today. Businesses and applications will move to the cloud in their own unique way, at their own unique speed. Supporting this change requires a cloud solution that provides the necessary flexibility for the different ways you will architect, develop and deploy your applications and IT solutions—be it on-premises, in the cloud, or a mix of both.”

The new Windows Azure services simplify building applications that span cloud and on-premises servers. By combining infrastructure and platform services, these new capabilities of Windows Azure give greater flexibility in how to build or bring applications to the cloud. Some of the highlights of the new enhancements include: � Windows Azure virtual machines (VMs): VMs give you

application mobility, allowing you to move your virtual hard disks (VHDs) back and forth between on-premises and the cloud. Users can migrate existing workloads such as Microsoft SQL Server or Microsoft SharePoint to the cloud, bring their own customised Windows Server or Linux images, or select from a gallery. As a common virtualisation file format, VHD has been adopted by hundreds of vendors and is a freely available specification covered under the Microsoft Open Specification Promise.

� Windows Azure virtual network: This lets you provision and manage virtual private networks (VPNs)

in Windows Azure as well as securely extend on-premises networks into the cloud. It provides control over network topology, including configuration of IP addresses, routing tables and security policies, and uses the industry-standard IPSEC protocol to provide a secure connection between your corporate VPN gateway and Windows Azure. � Windows Azure websites: You

can build websites and applications with this highly elastic solution supporting .NET, Node.js and PHP, while using common deployment techniques like Git and FTP. Windows Azure websites will also allow easy deployment to the cloud of open source applications like WordPress, Joomla!, DotNetNuke, Umbraco and Drupal—with just a few clicks.

� New tools, language support, and SDK: The Windows Azure SDK June 2012 includes new developer capabilities for writing code against the latest service improvements, with updated support for Java, PHP and .NET, and the addition of Python as a supported language on Windows Azure. Additionally, the SDK now provides 100 per cent command line support for both Windows and the Mac OS. With this initiative, Microsoft, which was earlier

considered a threat to open source, has demonstrated that it is now warming up to Linux. By involving developers in Azure, Microsoft sees an inevitable opportunity. Mandar Naik, director, Platform Strategy, Microsoft, said, “In the cloud, openness is paramount. We are committed to taking

Windows Gives Cloud Cover to LinuxAfter launching an open source subsidiary, Microsoft has taken another step towards openness. In its latest move, Microsoft is offering Linux-based operating systems on its Azure cloud service. The company’s Azure portal comes with a variety of Linux distributions, which include SUSE Linux Enterprise Server 11 SP2, OpenSUSE 12.01, CentOS 6.2 and Canonical Ubuntu 12.04. Users are free to select and install any of these distros from the Microsoft Windows Azure Image Gallery.

Mandar Naik, director, Platform Strategy, Microsoft India

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 33WorldMags.netWorldMags.net

Page 36: Linux for You 2012-07

For U & Me Insight

an open approach in the cloud—supporting open standards and enabling open source on our cloud platforms. Support for Linux on Azure is a key part of this commitment towards openness. We aim to have broad and rich support for open source on our cloud platforms, and deliver great value for every IT dollar our customers spend.”

This initiative will also benefit Linux distributions that have joined hands with Microsoft. Naik explains, “For our partners, this clearly provides an expanded reach for their platforms through Windows Azure. And for Microsoft, these partnerships are invaluable in making the Linux experience we provide on Windows Azure today first class in every regard, in line with our commitment to openness. As part of the technical preview for Windows Azure Virtual Machines, key partners Canonical, OpenLogic and SUSE are expanding Windows Azure's infrastructure-as-a-service capabilities by enabling Linux running on persistent virtual machines. Compatible operating systems and images available through the online gallery currently include: OpenLogic CentOS, openSUSE, SUSE Linux Enterprise Server and Ubuntu.” The kind of partnerships Microsoft has been able to strike clearly shows that its efforts have been well received by the Linux vendors.

It is worth mentioning here that the company had recently advertised an opportunity for a senior software engineer with hardcore Linux credentials. Commenting on it, Naik said, “Microsoft has worked hard to become even more open. We will continue down the path of openness by investing in open and emerging standards, and partnering with open source communities. Our partnership and investments in Linux are a core part of this effort towards being more open.”

By: Diksha P Gupta

The author is assistant editor at EFY.

34 | jULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 37: Linux for You 2012-07

Interv iew For U & Me

“After North America, we have opened our second largest facility in the world in India”If you thought India was lagging behind other countries in adopting open source technology, think again! When Red Hat made its expansion plans, it considered India the place where it could find the ‘appropriate’ talent. Besides, Evans Data’s Global Developer Population and Demographic Survey conducted in 2011 reveals that India is among the rising technology powerhouses and by 2015, this country will surpass the United States with more than 3.5 million professional software developers.

Red Hat recently announced the expansion and launch of two ‘Engineering Centres of Excellence’ in Bengaluru and Pune. The Pune centre, spread over 4645 sq m (50,000 sq ft), is Red Hat’s second largest engineering facility in the world, the largest being in North America.

Located at two of India’s most prominent IT hubs, the newly inaugurated facilities reflect Red Hat’s increased investments in the country. With its expansion in India, Red Hat hopes to incubate, sustain and support local talent and maintain the high quality of contributions to the open source community, both locally and internationally.

Diksha P Gupta of Linux For You spoke to Anuj Kumar, general manager, Red Hat India, and Paul Cormier, executive vice president and president, Products and Technologies, Red Hat inc, about the two new centres, their upcoming products and Microsoft’s new open source subsidiary. Read on...

QRed Hat has recently announced the expansion and launch of two ‘Engineering Centres of Excellence’ in

Bengaluru and Pune. Any reasons for choosing India for its expanding operations?Anuj: After North America, we have opened our second largest facility in the world in India. Now, there are essentially two facilities in India. One with services like support and an R&D centre, which is at Pune and an R&D centre in Bengaluru, the latter being the new one. These are part of the global R&D centres, so they are not specific to the Indian geography. 2012 is the ‘Year of the Developer’ for Red Hat. With our new facilities, we hope to continue showing our commitment to developers throughout the APAC region.

QWhat kind of manpower do you plan to employ in these R&D centres?

Anuj: We cannot specify the number of people we will hire in each of these facilities, but the most we can say is that it is the second largest expansion for Red Hat, in the world. Essentially there are four engineering centres across the world. The first is in Boston, there’s another at Brno in the Czech Republic, and we have a couple in India.

QAny reasons for choosing India for the second largest centre?

Anuj: To be honest, it is just part of our natural expansion. The Pune facility was set up a long time ago and has provided support and engineering operations since 2002-2003. So this is not a new facility. In fact, most of the front line support services for home support, documentation and support tools are all developed and maintained from the Pune facility. So this is just part of the natural process by which Red Hat has grown over time. That’s the case with Pune. For Bengaluru, it is a different case. We have acquired a storage company about five-six months ago. And most of engineering in that company was done in Bengaluru. So it was natural for us to consolidate and have our storage business unit, essentially the engineering, be based out of Bengaluru.

www.LinuxForU.com | LINUX For YoU | JULY 2012 | 35WorldMags.netWorldMags.net

Page 38: Linux for You 2012-07

For U & Me Interv iew

QWas it as natural as this or was there any particular strategy behind it?

Anuj: Yes, there is obviously a strategy around it, which is to continue to expand Red Hat support and services in engineering. Like I said, these two Indian centres are a part of our global network of centres. It’s not that we are servicing only the India geographies. The way Red Hat expands is, where we find good talent, we expand in those geographies. If we find good talent in India to help us in support and in developing certain parts of our tools, we will expand in India. We got good talent for storage when we made an acquisition. We have done similar things in Boston and Brno. So that is broadly how we decide on where and which geography to look at for any expansion or acquisition.

QSo does that mean India is now on par with nations like US in terms of the talent Red Hat is looking for?

Anuj: At Red Hat, it’s not that we compare the talent in the

US with that of India. We try to source the best talent and the beauty with the open source development model is that talent is pretty much everywhere. We don’t have to move people out of geographies to work in certain R&D centres just because we open a facility and then need to fill it up. We actually go to the places where we see brighter and brighter talent, if possible. In this scenario, open source development resulted in having a set of people and processes that we find extremely useful here, so we have expanded here.

QWhat kind of R&D initiatives will we see in the two new R&D centres in India?

Anuj: The Pune centre is a little bit more weighted towards support tools, products and front line support, as well as engineering around Red Hat Enterprise Linux. That's Red Hat's bread and butter business. There are plenty of parts within the operating system that we do out of the Pune facility. For Bengaluru, it is primarily storage. That’s the centre for engineering for the storage business.

QSo what can we expect in Red Hat Enterprise Linux 6.3?Anuj: I think RHEL 6 has been a major release and the biggest

shift in this version has been around virtualisation and embedding virtualisation full line and centre, as a part of RHEL 6. What we have done is essentially moved the scalability chart within RHEL 6 to ensure that you can increase the memory to several gigabytes, giving a lot more scalability around IO as well as across the portfolio of the hardware. So you can actually take a lot more density in terms of the virtualisation. The amount of virtual machines that you could actually run on top of RHEL 6 with the latest firmware and hardware is about four to six times more than before. When people ask me what is in the next edition of RHEL, I tell them to look at the current version of Fedora.

QDoes that mean you have increased the virtual CPUs too?Anuj: Yes.

QWhat other kinds of features can we expect to see in future releases of Red Hat?

Paul: We are working on RHEL 7 right now. We would want to focus on more connectivity in the Windows world with RHEL 7. There are two operating systems in the data centre right now-- RHEL and Windows. What we can ask for is more connectivity with an active directory. What you will see is more interaction with the Windows world as we take market share from Windows. In the past, it was UNIX-to-Linux migration as people going in for new projects opted for Linux instead of Windows. But now we are actually taking market share from Windows.

Another thing that you will see is more features, more high performing and more manageable guest operating systems in a virtualised environment. You will see tighter integration, and more security features around the guest to make it a more secure, better performing and more manageable guest operating system. You will also see RHEL as a part of other platform-as-

"We try to source the best talent and the beauty with the open source development model is that talent is pretty much everywhere. We

don’t have to move people out of geographies to work in certain R&D

centres just because we open a facility and then need to fill it up."

Anuj Kumar, general manager, Red Hat India

36 | JULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 39: Linux for You 2012-07

Interv iew For U & Me

a-service products. For example, OpenShift is a platform-as-a-service offering, and what it does is that people move to cloud computing and make almost an appliance of their applications. RHEL is used in a lot more situations like that with other tools like OpenShift. After that, if the customers run their application either in a virtualised environment or the cloud, they get a common operating system because they are using RHEL. So those are some of the things that we are working on. The beauty of the RHEL of the future really is the foundation of cloud computing as customers build private clouds and want to move to the public cloud in a hybrid situation—RHEL will be the foundation to do that.

QSince you just mentioned Microsoft’s market share, how do you view Microsoft’s open source subsidiary?

Paul: From what I know of Microsoft’s open source subsidiary, I don’t think it has anything to do with markets here. What I know is that they are enabling a wholly owned subsidiary to focus on connectivity with open source projects. Frankly, I think that is a good thing. I think Microsoft is now acknowledging that open source is here to stay. It has said that it will focus on interoperability between open source and its own projects. That’s a really good thing because what our customers are also asking is more connectivity with Microsoft. So, I think that it is a very good initiative.

QHow do you view your competition?Paul: If you talk about the pure virtualisation environment, I

think we are in a very good spot. In terms of the cloud, we have all the pieces. It takes multiple pieces to build a cloud. Clouds have been built from open source technologies. People build clouds out of virtualisation layers, out of operating systems, out of middleware or management components and manage all of that. We have all those pieces; in fact, we have established products in place with applications running in all those pieces. So, I think we are in a very good shape to build clouds on top of our products. VMware has Hypervisor. Applications don’t run on Hypervisor. They run on operating systems and app services and VMware does not have either of those. So as we move to the cloud environment, I think VMware has some very serious holes in its product portfolio, as it tries to enable its customers moving to the cloud environment.

QWhat does Red Hat do to increase the participation of the community?

Anuj: You need to look at the profile of Red Hat in two parts. One part is how we build and develop software and the second part is how we sell and go about our business. The development piece is a continuous engine and that’s the open source part of what Red Hat does. For that, we need a community. We need to have a two-way dialogue. What we believe in is that those in the community between 14 years and 30 years are really the ones building the next generation of software and we have to involve them and we have to get close to them.

Paul: You cannot look at it as the American open source community or the Indian open source community, because that’s what makes open source what it is. You get viewpoints from all over the world. It’s not about the Indian viewpoint or the American viewpoint, it's about the best technical solution. The best technical solution could come from someone sitting in California or in Pune. So that is the beauty of open source. The development models that Microsoft and VMware use is that you get one person sitting in one company who gets to decide what goes in and what doesn’t, what parts to fix and what not to. With this community, the whole world gets to see what is being worked on and anyone across the world with the best idea can get it done. That’s why open source is so strong and why the technology here advances so much faster than with a traditional model. So, I wouldn’t say that there is an Indian, American or any other open source community. It is the technology that people are interested in.

"You cannot look at it as the American open source community or the Indian

open source community, because that’s what makes open source what it is. You get viewpoints from all over the world. It’s not about the Indian

viewpoint or the American viewpoint, it's about the best technical solution."

Paul Cormier, executive vice president and president, Products and Technologies, Red Hat Inc

www.LinuxForU.com | LINUX For YoU | JULY 2012 | 37WorldMags.netWorldMags.net

Page 40: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 41: Linux for You 2012-07

Insight For U & Me

4. The students’ application period begins by end of March. This is perhaps the most crucial time. After an initial round of discussion with mentors, students start working on a proposal and submit it online at Melange. The application should incorporate feedback, and depending on the organisation, mentors might ask you to work on your proposal on a public wiki or submit it privately. We’ll talk about writing a good proposal and other important things to keep in mind while applying.

5. The submission of application deadline is the first week of April. This is usually ten days after the application period has begun.

6. The interim period is a two-week period after the deadline for accepting applications. The organisations rank the proposals and might ask students further questions to clarify their doubts about the proposal. Before the results are announced, students who successfully qualify for multiple projects are allotted a single project by an official committee of administrators from different organisations and Google staff members.

7. The results are declared on the programme’s website (around April 25).Read the entire FAQ at http://www.google-melange.com/

gsoc/document/show/gsoc_program/google/gsoc2012/faqs.

Things to keep in mind while applying1. Start early and communicate effectively. It is very important

to get in touch with mentors early and grab their attention. Communication is the key. Let the community know that you are interested in a particular idea. Hang out on the IRC and talk to fellow students. A decent proposal submitted on the final day, without any prior conversation, will most likely be rejected.

2. Show plenty of enthusiasm! Mentors are looking for enthusiastic and committed people who they are sure will dedicate their entire summer faithfully to the project. There is no substitute for enthusiasm.

3. Choose a project you’re passionate about. Students usually apply for projects they use in day-to-day life and are passionate about. If not, they select something that intrigues them and falls within their level of expertise.

4. Do a small task for the community. A great way to prove your competency during the proposal period is to submit trivial bug fixes or minor feature enhancements.

5. Have a nice github/<your choice of code hosting> profile. Many organisations want to look at the past open source code you have written. In the popular hacker culture, everyone firmly believes ‘Github is your resume’!There are some must-read official student guidelines from

Google at http://code.google.com/p/google-summer-of-code/wiki/AdviceforStudents.

Writing a great proposalMost students find writing a proposal a daunting task. Quite a lot of applications submitted by students are bad and regarded as spam. Here are some basic guidelines for writing a great proposal:1. Focus on quality, not quantity. Submitting a large number

of copy-pasted proposals to a number of organisations will hardly be helpful. Focus on two proposals at the most.

2. Follow the format. Most organisations provide an ‘ideal proposal’ format. Try to strictly adhere to it and fill in all the required details. It makes work easy for the organisation and mentors.

3. Get an unofficial review of your proposal. A very good idea is to make your mentor go through the proposal once before submission. The changes incorporated from feedback can drastically improve the quality of your proposal.

4. Chalk out a rough timeline. It is recommended that you include a rough timeline as to how you plan to complete the project. You could break it up module by module, or in any other fashion that seems appropriate. A lot of organisations have a ‘Timeline’ sub-heading as a part of the proposal format.

5. Compose a detailed proposal and advertise yourself. Describe in depth the challenges involved in the project, previous work done (if any), and how you will work on solving the problem and implementing the project. Write briefly about yourself, answering the question ‘Why are you the most suitable candidate for the project’? To persuade the community, refer to your past experience in similar projects, and prior experience with the platform and technology.

The post-selection timetableThere are four major milestones in the programme, once the students have been selected:1. The community bonding period (the month of May). Students

interact with the community, and get to know the projects and people. This is to facilitate interactions and hopefully make GSoC students long-term contributors to the project.

2. Beginning of coding (end of May). Students receive their initial payment (US$ 500) and start coding!

3. Mid-term evaluation (mid-July). Each mentor evaluates the student’s work and sends an official progress report to Google. If the students’ work is satisfactory up to that point, they receive another part-payment (US$ 2250).

4. Final pencil-down deadline (end August). Mentors finally evaluate the entire work and submit a report. Students are issued the final payment (US$ 2250) upon positive feedback and the results of GSoC are announced. The students submit their code to Google.

Winding up!GSoC is a truly amazing platform to learn, code and contribute to open source. Hope to see more students and LFY readers participating from Asia next year! Happy hacking!

By: Nitish Upreti

The author is a 2012 GSoCer working with the 'Berkman Center for Internet and Society, Harvard' as his mentor organisation. A Rubyist by heart, a technology start-up enthusiast and a classic rock fan, he tweets as @nitish.

www.LinuxForu.com | LINuX For You | juLY 2012 | 39WorldMags.netWorldMags.net

Page 42: Linux for You 2012-07

For U & Me Let's Try

PandaBoard (Figure 1) is a low-cost, open, OMAP 4-based mobile software development platform that can serve as a fast ARM-based single-board computer.

In short, you can do some awesome stuff with it. Amazed? Yes, this small board, weighing less than 100g, is packed with powerful features such as: � The OMAP4430 application processor consisting of a

dual-core 1 GHz ARM Cortex-A9 MPCore CPU, 304 MHz PowerVR SGX540 GPU and a C64x DSP

� 1 GB low-power DDR2 � Display HDMI v1.3 connector (Type A) to drive HD

displays and a DVI-D connector � 3.5 mm audio in/out and HDMI audio out � Full-size SD/MMC card � Built-in 802.11 and Bluetooth v2.1+EDR � On-board 10/100 Ethernet � Expansion: 1xUSB OTG, 2xUSB HS host ports and

general-purpose expansion header � Size: 100 × 110 mm (4 × 4.5 inches)

PandaBoard is such a powerful mobile computing platform that one can port various OSs to it. Already supported are Ubuntu, Xubuntu, Android, Angstrom, Meego, Fedora, etc.

Where to buy itThere are a lot of distributors, but I recommend buying from SVTronics (http://www.svtronics.com/ecommerce/panda), the manufacturers of PandaBoard. The current cost is $174.

AccessoriesI would also suggest that interested readers buy the following accessories, which I used: � A HDMI/DVI cable to see the output on a monitor

� A 8/16 GB SDHC or micro SD card (then use it with a converter)

� A 5V power supply � A USB hub � A serial-to-USB cable � The keyboard � The mouse � A laptop cooler (so that PandaBoard does not heat up)

Install imageIn this article, we will try to install Ubuntu 12.04 LTS; please visit http://cdimage.ubuntu.com/releases/12.04/release/ and download the Texas Instruments OMAP4 (Hard-Float) pre-installed desktop image.

Prepare the SD cardI'm using Ubuntu 11.10 on a 64-bit (desktop) machine; I suggest you use the Ubuntu environment too, if possible. If you are not familiar with Ubuntu, don't worry—watch my video 'Getting Started With Ubuntu' at http://www.youtube.com/watch?v=6Cb-227Ogzw.

Now insert your SD card into the desktop, but make sure that it is not mounted. Identify the correct raw device name—for the card, not the partition (like /dev/sdb and not /dev/sdb1). You could use the Ubuntu disk utility and select the SD card. In a terminal, navigate to the folder containing the downloaded Ubuntu image, and to write it to the SD card, run the following commands:

zcat ./ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz |sudo

dd bs=4M of=/dev/sdb

sudo sync

Mastering PandaBoardOver the next couple of months, this series of articles aims to make a novice well-versed with PandaBoard. We will cover various topics such as porting different OSs to PandaBoard, image processing with it, and so on. This first article gives a brief overview of PandaBoard and how to install Xubuntu on it.

Part—1

40 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 43: Linux for You 2012-07

Let's Try For U & Me

This will take some time. If the process is successful, you will have a new command prompt, and you can now eject the SD card.

Booting PandaBoardInstall minicom or Gtkterm (I personally prefer minicom) on the desktop—in the terminal, run sudo apt-get install minicom. Launch it—for example, sudo minicom -s. To configure it, select the correct USB port, set the baud rate to 115200, stop bits to 1 and parity bits, software control and hardware control to ‘NONE’.

Now insert the SD card into PandaBoard. Connect the HDMI/DVI cable to the monitor and PandaBoard. Attach the USB hub to PandaBoard, and connect your mouse and keyboard to the hub. Connect the serial cable to your laptop or desktop. Now power up PandaBoard. If all went well, you should see a familiar Ubuntu installation screen.

Installing Ubuntu 12.04The installation procedure is quite simple—just follow the on-screen instructions. Mind you, this process will take a very long time, so be patient.

Speeding up PandaBoardThere are a few tweaks you can do to increase the performance of Ubuntu on PandaBoard. First, disable swap, which is nothing but virtual RAM. So, edit /etc/fstab and put a '#' in front of the line that creates a swap file. Now, for transient data, use the tmpfs filesystem, which uses RAM, and hence provides much faster response compared to the SD card. Edit /etc/fstab and add the following lines:

tmpfs /tmp tmpfs nodev,nosuid 0 0

tmpfs /var/log tmpfs nodev,nosuid 0 0

By: Jayneil Dalal

The author is a FOSS advocate, and loves to explore different open source technologies. His areas of interest include OpenCV, Python, Android, Linux, Human Computer Interaction, BeagleBoard, PandaBoard, Arduino and other open source hardware platforms. In his spare time, he likes to make video tutorials on various open source technologies, which can be found on YouTube. He is also a regular writer for the LINUX For You, Linux Pro and Full Circle magazines. He is a big time Arsenal fan and can be reached at [email protected].

Figure 1: The board

Figure 2: My hack area

I would really like to thank my colleague Jatin Bhikadiya for his help and support. I would also like to thank Prof N P Gajjar and Prof Dhaval Shah for their guidance. A ‘thank you’ to SVTronics for sponsoring the PandaBoard for my research.

Acknowledgements

[1] http://omappedia.org/wiki/PandaBoard_Ubuntu_How-tos/[2] http://pandaboard.org/[3] https://wiki.ubuntu.com/ARM/OmapDesktopInstall[4] http://www.svtronics.com/ecommerce/panda

Reference links

Installing XubuntuYou'll find Ubuntu 12.04 on PandaBoard quite slow. We need a lightweight desktop environment. Now Xubuntu is a derivative of Ubuntu, but with Xfce as the desktop environment plus some other applications. Let's install Xubuntu on top of Ubuntu. In a terminal, run the following:

sudo apt-get update

sudo apt-get install xubuntu-desktop

Now, this process will take very long. Once it's done, restart the system and while logging in, select the 'Xubuntu Desktop' to see the new desktop. You can also update your Xubuntu desktop; in a while you will have a faster-running system on the small but powerful PandaBoard.

If you'd like to see this hacker's workspace, take a look at Figure 2, which shows my set-up, with PandaBoard atop the laptop cooling pad and connected as mentioned above.

In the forthcoming articles in this series, I will discuss how to port other OSs to PandaBoard, how to do image processing on PandaBoard, and various other interesting topics.

TroubleshootingIt is quite possible that you will face some errors while installing Ubuntu or Xubuntu on PandaBoard. In case you face an error you cannot solve, post your problem on the PandaBoard Google Group (http://groups.google.com/group/pandaboard). The community behind this group is very nice and friendly and will help you out— they also reply very quickly.

www.LinuxForu.com | LINuX For You | juLY 2012 | 41WorldMags.netWorldMags.net

Page 44: Linux for You 2012-07

For U & Me

Raven A Surgical Robot Powered by Linux!Currently undergoing tests at six different locations, this amazing robot is being developed for surgeries without human intervention!

For U & Me Overview

If I were to tell you that soon enough, robots will be assisting doctors in heart surgery, you'll probably think I've watched too many Hollywood movies. However,

this is indeed true. So let me introduce you to Raven, a surgical robot that runs on Linux.

Generally, no matter how good, experienced, and talented the surgeon is, heart surgery (or any other major surgery, for that matter) is a complex and risky procedure. To tackle this, researchers at the Universities of Washington and California have collaborated to develop a surgical robot named Raven.

What is it?To begin with, Raven was initially developed for military use. However, it is already being tested for general surgical usage (tested, but not yet approved). Currently, it comes with two surgical robotic arms, a video camera, and an interface with which surgeons can control it. Such functionality makes it ideal for tele-surgery. Raven is not a new concept—it has been

42 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 45: Linux for You 2012-07

Overview For U & Me

under development for quite some time now, and as a matter of fact, Raven II is already in existence. Future plans for this surgical robot include the ability to perform heart surgery by moving the robotic arms in sync with the heartbeats, and even act autonomously without any intervention from surgeons. Sounds cool? The best part is yet to come.

Raven is a completely open source project, and the robot itself runs ROS, a flavour of Linux dedicated especially to robots. Plus, you can even get the source code of Raven by writing in to the development team.

What can it do?To quote the development team behind Raven II, “The aim of Raven II is to develop a robot that can perform superhuman surgery, operate with dexterity and offer proper assistance to the surgeons.”

To begin with, Raven can sync its motions with the beating heart, such that when its surgical arm comes in contact with the heart tissue, it alters its movements to synchronise with the heart beats, thereby providing precision and control that no human hand can achieve by itself. In fact, when operating using Raven, the surgeon feels as if the heart is stationary and not beating—Raven does the rest.

Another function that Raven can perform is to temporarily pump or circulate blood during surgeries, in cases where the heart has stopped working. Lifesaving indeed, but this procedure is still not fool-proof, and needs a lot of work before it can be implemented on a wide scale.

Also, since nerves, muscles and bleeding can obstruct the surgeon's view at times, Raven's video camera comes in handy, as it can provide a decent 3D view of the body’s tissues.

Who is involved?Well, as already mentioned, Raven is being developed by the Universities of California and Washington. Apart from that, it also owes a good deal to Berkeley and John Hopkins University.

The project runs Robot Operating System, a version of Linux that comes with libraries and tools primarily meant for robotic applications. The OS comes with a BSD licence, and provides hardware abstraction, device drivers, libraries, and many more features. Raven is currently being tested at six different locations, and once the bugs have been fixed, we can perhaps look forward to seeing it in hospitals.

If you are interested in knowing more, visit the links given below. Alternatively, if you wish to get your hands on the source code of Raven II, simply shoot an email to the University of Washington BioRobotics Lab.

Note: All images courtesy of University of Washington BioRobotics Lab.

Sufyan bin Uzayr is a 21-year old freelance writer, graphics/Web designer, programmer and photographer. His prime areas of interest include FOSS, Web/mobile development, Web CMSs and vector art. He is also the editor of an e-journal named Brave New World (http://www.bravenewworld.in/). You can visit his website at http://www.sufyan.co.nr/ or find him on Facebook at http://facebook.com/sufyanism.

By: Sufyan bin Uzayr

The Raven surgical robot

Raven's robotic arms tying the first knot prior to a surgical procedure (June 2006)

[1] Raven Surgical Robot info page at University of Washington, BioRobotics Lab: http://brl.ee.washington.edu/laboratory/node/26

[2] Raven Development Video: http://youtu.be/Rg2xIu38PLg[3] Robot Operating System: http://www.ros.org/wiki/[4] Raven Developers' Blog: http://r2db.tumblr.com/

References

www.LinuxForu.com | LINuX For You | juLY 2012 | 43WorldMags.netWorldMags.net

Page 46: Linux for You 2012-07

For U & Me Overview

The computer has become an integral part of our lives and the medical field is no different. All the data collected by MRI scanners and instruments for endoscopy,

thermography, etc, is analysed by software that employs heavy digital-signal-processing algorithms. Many open source tools have now begun to replace their proprietary counterparts in this domain, reducing the overall cost of operations to some extent.

3D Slicer is one such open source tool that is used for 3D image analysis and visualisation of the data collected by medical imaging instruments. Slicer provides a GUI with the data. Besides creating 3D surface models for conventional MRI scanned data, it has been used for non-rigid image segmentation and to incorporate models of neuro-vascular bundles (nerves, arteries, veins and lymphatics that run together in the body).

The origins of Slicer go back to 1998, when it was started just as a post-graduate thesis project between the Surgical Planning Laboratory at the Brigham and Women's Hospital, and the MIT Artificial Intelligence Laboratory. The latest release is Slicer 4, which is a Qt enabled version. Slicer is a cross-platform tool and can run on Linux, Windows, Mac, etc. It is intended to work with tomographic data of all types, particularly CT and MRI.

I remember the early days of the CT revolution, when the equipment was expensive, requiring $10,000 worth of software and around $4,000 for hardware. 3D Slicer, being open source, is completely free and has cut down a big chunk of that expense.

RequirementsThe basic requirements to run Slicer on your PC are:1) Windows XP or more recent, Linux (x86 or x86_64),

Mac OS X (PPC or Intel)2) 2 GB RAM (minimum)3) At least 128 MB of on-board graphic memory

Mac OS X will need X11 or XQuartz to be installed prior to Slicer’s installation.

Starting upAt the time of writing this article, I used release 3.6.3 and I ran it on Fedora 16 with no problems. You can get it from http://www.slicer.org/pages/Special:SlicerDownloads. As the root user, extract the zip file to /opt, go to the directory where it has been extracted and fire up Slicer as follows:

tar -xvzf Slicer3-3.6.3-2011-03-04-linux-x86.tar.gz -C /opt

cd /opt/Slicer3-3.6.3-2011-03-04-linux-x86

./Slicer3

Try it out!So, that’s enough of talk! Let's try out an example of this amazing tool. First, you'll need raw data. Don't panic! You don't have to get an MRI scanner. For mere practice, you can easily download an example data set from: http://bit.ly/MfYmnc

Extract the downloaded zip file to any suitable location and give it a name like ‘CT Data’. In Slicer, click File → Add Volume and then select the first file from ‘CT Data’. You will see your data. It may take some time if your system is slow. Slicer automatically loads the three orthogonal slices.

The fourth last button on the toolbar (located at the top) can be used to re-size the image. Click on it and select ‘Four-up layout’ and the orientation will change as shown in Figure

This article gives an overview of the open source medical imaging tool called 3D Slicer, which has been released under a BSD-style licence, and is a tool for visualisation and image analysis.

44 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 47: Linux for You 2012-07

Overview For U & Me

3. Now click on the same menu and click on ‘Green slice only layout’, and the third image will be shown, filling up the whole window.

Let's modify the three images. The tool-bar at the top left contains a drop-down menu next to Modules. Select Volumes. You'll find various parameters to adjust the image rendering, but to put it simply, just use the slider in the display part of the volume accordion to obtain a sharp image, as shown in Figure 5.

You can move the slider above the CT image, and move back and forth through the skull. The number at the right (in mm) tells you how much of the image you have gone through.

SegmentationYou may even want to analyse some special part of the scanned image. The process by which you select useful parts of the data for further analysis is called segmentation. In Slicer, use a colour-coded label to indicate what is being segmented. For example, you may use blue for bones and green for tissue, as I've done here for this demonstration. Now go to the same drop-down menu next to Modules and select Editor, which will appear in the left panel. From the Edit Selected Label Map accordion choose from various labels. I selected green which represents tissue. Now we are ready for segmentation. There are various other ways to do this, but for beginners, let’s use Threshold, as it is a quick method. On the left column, you

Figure 1: The Slicer welcome GUI Figure 3: Changed orientation in 'Four-up Layout'

Figure 2: Scanned data of a Euoplocephalus’ skull (an ankylosaur dinosaur) Figure 4: ‘Green slice only’ layout

Figure 5: Obtaining a sharp image of the skull

will find a series of buttons. All have mouse hints; hover over them to find the button called Threshold. Click on it and you'll see a green pulsating image all over the CT scan monitor. Keep adjusting the slider bars until you get the skull part highlighted with green. Then hit Apply. The image is now segmented!

This is called scene creation. You can save it as a scene, and later load the scene directly for further analysis or to create a 3D model of the skull.

Now, from the fourth last button on the tool-bar, select Conventional layout. From the drop-down menu next to Modules, select All Modules and then Model Maker from this sub-menu. A new panel will pop up on the left. Set the

www.LinuxForu.com | LINuX For You | juLY 2012 | 45WorldMags.netWorldMags.net

Page 48: Linux for You 2012-07

For U & Me Overview

parameter label to 1 for tissue, as done earlier. Enter the name of the scene saved previously in the Input Volume box.

Now you are done! Hit Apply and wait for a few minutes while Slicer creates the 3D model of the scanned segmented image. You can zoom in or out by scrolling the mouse, and even rotate around the three axes. You can then save your model in the VTK format.

Applications

Imaging and analysisSlicer integrates several facets of scanned image, and provides automatic registration, i.e., aligning of data sets or semi-automatic segmentation by which you can analyse the body structure for tumours and vessels. This part has been demonstrated in the above section. You can do qualitative analysis of various 3D models of the scanned image, like the one generated above, which includes measuring angles, distances, surface areas and volumes.

Diffusion Tensor Imaging (DTI)When neural axons of white matter in the brain or muscle fibres in the heart acquire an internal fibrous structure, leading to unbalanced diffusion of water through the tissue, DTI is done. Simply put, DTI is a Magnetic Resonance Imaging technique that enables the measurement of restricted water in the tissue. 3D Slicer can take the DTI data and perform the analysis in a few steps.

Neurosurgical planningThis deals with the generation of fibre tracts in the vicinity of a tumour. Here we export the same DTI scanned image and explore it with Slicer to perform neurosurgical planning.

ROI seedingThis is a tractography implementation that allows a user to seed tracts from a region of interest (ROI). The ROI is defined as a labelmap and has to be provided by the user. By using the editor module of Slicer described above, this can be implemented easily.

BiopsiesA recent application includes the robot-assisted MRI-guided prostate biopsy using 3D Slicer. This technique calibrates a robot to the MR coordinate system (as a digital device, a robot is ideally suited to accurately align an instrument to any point in the three-dimensional coordinate system of the magnetic resonance(MR) image) to guide it through the targeting volume and collect the scanned data to locate the tumour. The link below gives a brief overview of this magnificent technique, which interfaces with the robot through 3D Slicer: http://www.slicer.org/slicerWiki/images/0/06/ProstateNav_TutorialContestSummer2010.pdf

B-spline registrationB-spline registration in Slicer 3.6 allows for non-rigid registration between pre-procedure MRI and intra-procedure CT images during CT-guided tumour ablation in the liver. It provides increased tumour visualisation during the planning, targeting and monitoring phases of the ablation procedure.

Instrument trackingConventional image-guided surgery systems present the surgeon with data that was gathered prior to surgery, apart from tracking surgical instruments within the operating field and rendering the tracked devices along with the data. As a tracked surgical instrument is moved within the surgical field, it is rendered in the 3D view, and the reformatted slice planes follow its position, sweeping through the volumes as

Figure 6: Segmented image

Figure 7: Model maker module

Figure 8: 3D model of skull

46 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 49: Linux for You 2012-07

Overview For U & Me

a form of virtual real-time imaging.

Non-surgical applications3D Slicer is used in areas other than surgery for quantitative studies that require making measurements on source images and 3D models simultaneously. Applications to date include modelling the female pelvic floor, taking quantitative measurements of muscle mass, and conducting orthopaedic ‘range of motion’ studies.

Practical deployment of SlicerAs the Slicer website says, “3D Slicer does not impose restrictions on its uses, but is not FDA approved. It's the sole responsibility of the user to ensure compliance with applied rules and regulations.” Most of the applications discussed above are being currently used by the Surgical Planning Laboratory at Brigham and Women's Hospital, and at the MIT AI lab.

3D Slicer is not for clinical use. This is intended for educational, research and informational purposes only. It has also been declared that 3D Slicer copyright holders and contributors, Brigham and Women's Hospital, and all affiliated organisations shall not be liable for any damages arising out of the use of 3D Slicer by any party for any purpose. In a nutshell, Slicer is not approved for clinical purposes.

By: Rahul Gupta

The author graduated from BVCOE, New Delhi, and is a software enthusiast. He likes to play around with Web technology. He loves rock music and enjoys playing the guitar. He would like to hear from you at [email protected].

[1] http://www.slicer.org/[2] http://en.wikipedia.org/wiki/3DSlicer

References

The developersSlicer is mostly written in C++ and is based on the NA-MIC kit. It is built on top of VTK. Other components include ITK, CMake, Qt and Python. It is an open source package and is available for easy modular expansion by developers who want to be a part of this research. Visit the link below for more detailed information: http://www.slicer.org/slicerWiki/index.php/Slicer3:Developers

Although Slicer is not approved for clinical use, it has varied applications and a lot more is expected from upcoming releases. Recently, it has also been used for dental health. As the research continues, many more applications will be developed.

#401,Prashanthiram Towers,Ad j Chaitanya Techno school Sarathi studio lane, Ameerpet, Hyd - 29.

Tel. 27733174/66334399/9393733174

Special OfferAvail

844/1, Mahendra Hills, East Marredpally, Secunderabad - 500026.

www.LinuxForu.com | LINuX For You | juLY 2012 | 47WorldMags.netWorldMags.net

Page 50: Linux for You 2012-07

For U & Me

Electronic Medical Records, or EMRs, play a vital role in the field of healthcare. The act of moving patient records from traditional paper-based filing

systems to a computer-based medical record system has led to a wide range of benefits for physicians and patients alike. These benefits include better quality of healthcare, improved management of patient information and treatment services, as well as more efficient access to patient data for analysis and prediction during research.

There is a perception that EMRs are a luxury only developed nations can afford. This is not true. EMRs play a critical role in improving the quality of care in any country, developed or not. In fact, they are essential for improving treatment facilities in underdeveloped nations. Therefore, EMRs should be considered a mandatory requirement for underdeveloped nations and not merely as a ‘non-essential’ tool to improve luxury standards.

Developing FOSS software is no easy task. And developing open source healthcare systems is even harder. The problem in developing FOSS healthcare software (such as EMRs) is two-fold. First, EMRs are safety-critical applications, which must adhere to the most stringent quality standards. Second, they require thorough inputs from medical practitioners and healthcare providers who are expected to use the final product. A successful EMR application should provide user friendliness

as well as quality. It should represent the collaborative efforts of both software engineers and healthcare professionals.

However, getting such resources and commitment can be extremely difficult for a start-up. Unfortunately, many open source start-ups are led by moonlighting FOSS enthusiasts, who lack both time and resources to devote to their projects. A majority of these projects will ultimately fail, despite their best efforts. Therefore, it is very rare to see an open source healthcare product such as OpenMRS become a leader in its field, and go on to become the preferred solution for healthcare facilities across the developing world.

The history of OpenMRS: A five-minute guideOpenMRS was launched in 2004 as an open source medical record system for the developing world. OpenMRS is a global non-profit community with individual an organisational volunteers from around the world. It was founded by two US-based organisations—Regenstrief Institute, a long-time leader in medical informatics research, and Partners In Health, a philantrophic organisation.

The very first OpenMRS implementation was launched in Kenya by the Academic Model Providing Access To Healthcare (AMPATH). This implementation was launched at Eldoret, Kenya in February 2006. PIH introduced OpenMRS to Rwanda in August 2006, while the South

Sustainable Open Source Healthcare for the Developing World

This article offers a glimpse into OpenMRS, its origins, ideology and its recipe for success. It should interest open source enthusiasts, healthcare workers, students, aid

workers, apart from Google Summer of Code interns and aspirants.

For U & Me Overview

48 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 51: Linux for You 2012-07

Overview For U & Me

African Medical Research Council also adopted the system by the end of 2006. The growth or OpenMRS has been both consistent and phenomenal. It is now used in Lesotho, Zimbabwe, Mozambique, Uganda, Tanzania, Haiti, India, China, the United States, Pakistan, the Philippines, Chile, Nicaragua, Japan, Peru, Haiti and many other countries.

Today, OpenMRS is supported by a host of renowned organisations, including the Canadian International Development Research Centre (IDRC), the Center for Disease Control (CDC), the Fogarty International Centre, Google, The Millennium Villages Project of the Earth Institute, Columbia University, The Rockefeller Foundation, ThoughtWorks Inc. and the World Health Organisation. The OpenMRS is built by volunteer developers from many backgrounds, including students, independent open source volunteers, and professional software engineers. They play a major role in nurturing a growing network of volunteers and implementers who are dedicated to building better medical record systems for the world.

The OpenMRS recipe for successThe OpenMRS project achieved great success due to the following reasons: � OpenMRS is an attempt to solve a problem. It is a much

needed answer to a serious healthcare crisis affecting the underdeveloped world.

� OpenMRS was launched by two industry leaders, both of whom made serious commitments to the success of the project. A FOSS project would never have been able to come so far if not for the sponsorship of such esteemed institutions.

� OpenMRS was not an attempt to reinvent the wheel. It was an attempt to redesign the wheel, based on prior experience. OpenMRS was designed on top of an extensive knowledge-base gathered by Regenstrief and PIH over the course of many other EMR implementations.

� OpenMRS is the result of a fruitful collaboration between developers and end implementers. Engineers proactively seek feedback from implementers and medical practitioners. Implementers are encouraged to provide feedback, to join mailing lists and to be part of the community. Much effort is taken to learn from the limitations reported by other EMRs. Even more efforts are taken to ensure that OpenMRS does not suffer from these same restrictions.

What attracts the developing world to OpenMRS?A wide majority of existing EMR solutions were planned and built for the developed world. Developers of these systems inadvertently ended up making the following assumptions during design and development: � That the system would never be constrained by limited

resources. � That the system would be used by well-trained and

qualified staff. � The system would be maintained by capable developers. � Implementers would be well-funded and in a position to

face any eventuality. In most cases, a product designed for the developed world

is ‘handed down’ to the third world almost as an afterthought. The general assumption is that a product that works well in the developed world would work as well in the developing world. However, the ground reality is very different. Unfortunately, many third world implementations lack a few (if not all) of the above criteria. Also, healthcare centres of the developing world play a more important role than those of developed nations. After all, citizens of the developed world enjoy a wide range of healthcare facilities. Therefore, a fault in a single or a few hospitals would not majorly impact patients in wealthy nations. However, implementations in the developing world are often few in number (yet cater to the needs of a very large number of people) and are the only safeguards against any epidemic disaster; hence, the need to ensure that they function well.

However, OpenMRS was designed and built specifically for the developing world, and this is why it has been such a success. Let us consider the key features that have led to the success of OpenMRS: � First, its modular architecture allows implementers to plug in

and use the modules within minutes. Adding and removing modules is so easy that it can be done with no development skills at all.

� OpenMRS supports internationalisation. The application already supports six languages. Adding support for your own language is as easy as adding a single message file to the system.

� Other features include flexible reporting tools, adherence to proper medical standards and convenient data entry/export features. These features ensure that maintaining or using an OpenMRS implementation requires a minimal amount of skills.OpenMRS has also stepped in to tackle the lack of resources

in a multitude of other ways. It has developed a synchronisation module that allows systems to synchronise their data offline. This tool is a godsend for implementers who suffer because of slow Internet speeds.

Another issue affecting the developing world is the limited number of trained professionals, and the distance between patients and hospital sites. OpenMRS’ solution to this problem was to support SMS integration, so that community health workers can interact with OpenMRS via their cell phones. These features have contributed greatly to making OpenMRS a more attractive solution for the developing world.

The OpenMRS community: Attracting and keeping volunteersDespite enjoying the support of several donor organisations, OpenMRS still relies heavily on volunteer contributors. The OpenMRS developer community is extensive, and is quite active in improving the OpenMRS core, supporting implementations and building external modules. The project has been able to attract (and keep) such a large number of volunteers largely due to the professionalism, enthusiasm and fair treatment meted out to all.

www.LinuxForu.com | LINuX For You | juLY 2012 | 49WorldMags.netWorldMags.net

Page 52: Linux for You 2012-07

For U & Me Overview

www.electronicsforu.com www.ffymag.comwww.linuxforu.com www.efyindia.comwww.eb.efyindia.com

Looking aheadThe growth of OpenMRS has been both consistent and rapid. Each year has brought with it more and more good news and the past year has certainly been no exception. The OpenMRS community is approximately 2,000 members strong as of late 2011. This year, it called for applications for a total of 20 potential GSoC projects, its largest ever since the programme started in 2007. The past year is also noteworthy because of the number of endorsements OpenMRS won from various governments and the international community. OpenMRS has weathered the passage of time well, and stands strong as a mature and capable organisation. It embodies the values of both the open source community and voluntarism. The organisation’s efforts have brought benefits to millions the world over. One can only hope that the world will learn from the difference OpenMRS has made in many disaster-ravaged nations, and support it in its bid to provide better healthcare for all.

As an open source community, OpenMRS maintains mailing lists, a blog and other social media groups. It also manages a massive wiki website with extensive documentation on everything from coding conventions to installation guides for newcomers. Potential volunteers are encouraged to contact the core group via mailing lists or post to the OpenMRS Answers resource. They can also talk to the team via its IRC channel, or join a regional community group. JIRA and Crucible are also used to maintain the OpenMRS code-base. This improves the efficiency of the bug-fixing and review process. And it ensures newcomers are not deterred by the inadvertent ignoring of their patches or the failure to provide timely feedback. OpenMRS also encourages long-term volunteers to find paid opportunities by working on OpenMRS implementations. This prevents ‘brain drain’ from the community and encourages newbies to commit themselves to OpenMRS.

OpenMRS also attracts volunteers through the Google Summer of Code program. I first participated in GSoC back in 2007. Since then, OpenMRS has grown rapidly to become one of the largest mentor organisations to take part in the event. It is also noteworthy that many of the GSoC interns are from developing countries and are in a position to help with any local implementations. Several of them have gone on to find paid opportunities in the OpenMRS core team and other related projects. All these aspects have helped OpenMRS retain talented volunteers for longer.

The author is an active OpenMRS core contributor. He is a former GSoC 2011 student and also a mentor for GSoC 2012. He is also featured in the Google Open Source blog for his active post-GSoC contributions to the community: http://google-opensource.blogspot.in/2011/12/students-write-code-and-save-lives-with.html.

By: Suranga Nath Kasthurirathne

50 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 53: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 54: Linux for You 2012-07

For U & Me Overview

including CPOE (Computerised Physician Order Entry). � Compounded communications: Electronic

documentation, prescription and information exchange allow more efficient communication, and create an audit of all clinical activity at the point of care, and enable internationalisation and language translation (for example, Spanish, French, German, etc).

� Increased efficiency: A single repository for clinical information, based on an integrated architecture, provides real-time access to information, eliminating redundant documentation and many manual tasks.

� Quality improvement: Technological support for best practices enhances the ability of health centres to comply with performance measures and other health-promotion and disease prevention guidelines.

� Reduced costs: Health centres save time and money by curtailing medical errors, eliminating duplicate tests and procedures, automating clinical processes, and limiting the use of paper.

Open MRS � Central Concept Dictionary: All data is stored and

defined in a particular format for discrete data, in a centralised dictionary.

� Patient repository: Patient data, including demographics, clinical observations, encounter data, orders, etc, is automatically created and maintained.

� Modular architecture: An OpenMRS module can extend and add any type of functionality to the existing API and Web app.

� Localisation/internationalisation: It has support for multiple languages, extensible to many other languages.

� Support for complex data: Supports various unstructured data like radiology images, sound files, etc, which can be stored as ‘complex’ observations.

Open EMR � Electronic billing and insurance: This increases flexibility

and is more convenient for customers, which translates into a greater likelihood of bills being paid on time. With an electronic system, there is no chance of paper cheques getting lost in transit. Thus, payment compliance increases, and late payments are reduced.

� View and manage patient history: One can view the patient's record and fix the time for consulting doctors. Health centres can also manage medical insurance claims or generate reports, etc.

� Electronic prescription: Prescriptions for medicine can be made on the computer, so paper overheads are reduced.

� Multi-language support: The multilingual system makes it easy for patients from different countries to comprehend the facilities and rules.

� Insurance tracking: Information on insurance claims

includes MR (Medical Records), DS (Discharge Summary), prescriptions, invoices and other lab test records. It becomes easy to track and assemble all documents within the system itself.Open EMR supports ANSI X12 EDI billing and two

clearing houses: ProxyMed (handles healthcare transactions in real-time, such as processing, pre-certifications, eligibility verification and rapid electronic payments) and ZirMed (responsible for medical insurance claims).

Design and architecture

OpenVistaIt was developed using M—the MUMPS or Massachusetts General Hospital Utility Multi-Programming System—language/database. It currently runs a majority of VistA systems on the proprietary Intersystem Cache version of MUMPS, and an open source MUMPS database engine, called GT.M for Linux. The OpenVista stack is as follows: � Client: CareVue (C#, VB, Delphi) � Network: Web Service (Java) � Server: OpenVista (M or MUMPS) � Database Management: MSC Fileman (M) and OVID

MEDLINE (Java) � Application Server: Cache/GT.M (M) and OVID

MEDLINE (Java) � Operating System: Linux � Hardware: Intel

Open MRSThe top-level architecture of the system consists of: � The Web layer: With Web applications providing UI

(HTML, Javascript) � The service layer: For business logic and APIs (Java) � The data access layer: For functions or stored procedures in

the database, as well as for access of data (Hibernate, Sql) � Database: Any relational database � Modular architecture: It uses a modular architecture to extend

the functionality of the system, so that the developer can write new extensions and plug them into the core system.This project uses many open source tools and technology

such as Java, Spring Framework, Spring MVC, Hibernate, MySQL, JQuery, and development tools such as Eclipse, BIRT, Ant, Bamboo and JIRA.

Open EMRThe Open EMR architecture, which uses Linux, Apache, MySQL, PHP or LAMP, consists of four layers: � The presentation layer: A Web UI for patients (PHP) � The process layer: For patient admission, scheduling,

billing logic (PHP), etc � The data layer: To operate patient data and for document

management (MySQL)

52 | jULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 55: Linux for You 2012-07

Overview For U & Me

medical facilities where they are generated. Permission for access must be granted by each facility included in an analysis. Access to identifiable patient-level data must also be approved by each local Institutional Review Board (IRB). For multi-site studies, gaining access can be a complex, time-consuming process. The second challenge is whether to keep the current MUMPS database, or migrate to a relational or object oriented database. Migration presents additional challenges. Local VistA implementations store data in MUMPS volume sets on pre-allocated disk sections. When volume sets exceed 16 GB, performance degrades, due to accelerated data accumulation, and growing number of physicians demanding availability of all records. Nevertheless, not all data elements necessary to an investigation may be available from the same file. Besides, some may exist only as text, not in a convenient, computable format. Therefore, the complexity of, and the site-to-site variations in OpenVista files make local technical assistance a necessity. One further complication is the variability of bandwidth and network reliability.

Open MRSThis health record system can not only handle thousands of patients and hundreds of thousands of observations, but is also scalable to tens of thousands of patients and millions of observations. This uses a lot of Update and Read operations. Tomcat and the JVM allocate memory to a Web app each time one uses Update or Read functions in the Web Application Manager. When the app is destroyed or recreated, some of this memory may not be released or lead to memory leakage. If you update or read the Web app too many times, Tomcat may run out of allocated memory, and will stop responding. Note the following error in the Tomcat logs:

java.lang.OutOfMemoryError: PermGen space

You can sort this out by allowing Tomcat to use more memory, or by restarting the Tomcat server at intervals, if you have to repeatedly update or read from the database.

Open EMRInstallation can be problematic if the instructions are not carefully followed. The system works on all known distributions of Linux, Mac Os X, Windows 2003 server and Windows XP Professional. The installation on Windows 2000, Windows XP Home Edition, FreeBSD and OpenBSD are less friendly and usually take quite a bit of troubleshooting. Its somehow less user friendly, thats the challenge users generally face using it.

� The integration layer: The HL7 engine

Deployment and use in various fields

OpenVistaOpenVista has been deployed at about 1500 care sites. OpenVista (R) source code is freely available, and it could be as effective and low-cost an option for even non-Veterans Affairs hospitals that are seeking to implement a complete hospital information system, but have been held back due to cost. OpenVista is the largest medical record system in the US, serving nearly 700 hospitals and nursing homes.

OpenVista (R) can be customised for large hospitals as well as small medical practices, and can be used across the continuum of acute, ambulatory and long-term care environments. It is suitable for use in multi-facility, multi-specialty healthcare organisations. NewCreationIT can customise, install, run and support OpenVista (R) for small clinics/medical practices or large hospitals, and can include Web and mobile add-ons. OpenVista (R) is a registered trademark of Medsphere Systems Corporation. NewCreationIT deploys, customises and supports the open source OpenVista software for medical practices and hospitals, globally. NewCreationIT is not affiliated with, or approved by, Medsphere Systems Corporation.

Open MRSCountries like Kenya, Rwanda, Tanzania, South Africa, Lesotho, Zimbabwe, Uganda and Pakistan have the most number of Open MRS deployments. It is used for HIV treatment in Kenya, Rwanda and Tanzania. Each site has requirements that are different from the base system. It is a Herculean task for the designers to satisfy the diverse requirements, so they built the system with extensibility in mind. Thus, whenever deploying Open MRS to record data for different diseases, a new version is not released—instead, implementers use the extensible data model and modules to build a custom MRS system atop the base system.

Open EMROpen EMR has been extensively used in the US. It is notably the best EHR for small healthcare units. However, practitioners from countries like Kenya, Puerto Rico, Australia, India, Pakistan, Bermuda and Nepal are getting savvy and adopting this system.

Challenges faced while using these software

OpenVistaThe main challenge is the decentralised structure of the OpenVista system. VistA files are maintained locally at the VA

The author is an open source developer. His area of expertise is teradata databases.

By: Debasree Panda

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 53WorldMags.netWorldMags.net

Page 56: Linux for You 2012-07

For U & Me Let 's Try

In Part I of this tutorial, we looked at how to visualise a shapefile, add styles and query the attribute table. In this part, let us explore how to perform geoprocessing, plot custom data and prepare a map for publishing.

We will continue to use QGIS version 1.7.3 (http://download.qgis.org) and the Alaska dataset (http://download.osgeo.org/qgis/data/

qgis_sample_data.zip).

Geometrical operationsQGIS has a number of tools for geoprocessing and data management, like nearest-neighbour analysis, buffers, union, polygon centroids, split vector layer, merge shapefiles, etc. Let’s perform some of the most commonly used operations.

The intersection of two layersFirst, let’s try to find out all the airports that lie in the tundra region:1. Open tundra.shp and airports.shp as vector layers.2. From the menu, select Vector > Geoprocessing Tools >

Intersect.3. In the Intersect dialogue box (Figure 1), select the

Map-Making with QGIS

Figure 1: Intersection dialogue box Figure 2: Polygon centroid dialogue

Part—2

airports as the Input vector layer and tundra as the Intersect layer.

4. Give a name to the output file, e.g., airports_in_tundra.5. Hit OK and click Yes on the resultant dialogue box to add

the output layer to the map canvas.

Polygon centroidsA layer with polygon geometry can be converted to a point layer, each point representing the centroid of the polygon:1. Click Vector > Geometry Tools > Polygon Centroids.

54 | JULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 57: Linux for You 2012-07

Let 's Try For U & Me

Figure 3: Split vector layer dialogue

Figure 4: Merge files dialogue

Figure 5: New vector layer dialogue

Merge shapefiles into oneDifferent shapefiles can be merged into one, provided they are of the same geometry type:1. Click Vector > Data Management Tools.2. Tick the check-box ‘Select by layers in the folder’. (See

Figure 4.)3. Browse to the source folder, select majrivers.shp and

rivers.shp files.4. Browse to the target folder and enter the name of the

shapefile (alaska_rivers_combined.shp).5. Mark the ‘Add result to map canvas’ to directly add the

result to the map canvas, and click OK.

Plotting custom featuresQGIS allows us to create new layers by plotting geometries and entering attribute data. In a shapefile, one map layer can contain only one type of geometry—point, line or polygon.

Now, let’s learn to draw a new point layer by assuming you want to plot sites for new airports. Let this layer have two attributes: id, name. The id attribute is a unique identifier—an integer and added by default.1. Go to the menu Layer > New > New Shapefile Layer.2. Select Point as the geometry (see Figure 5).3. In the New attribute section:

i. Add text (e.g., name) to the Name field.ii. Select Text data from the Type drop-down.iii. Set Width to 100.

2. In the dialogue box (Figure 2), select the polygon layer to be converted (in our case, add regions.shp and select it as the Input polygon vector layer).

3. Enter the path and name (e.g., regions_centroid) of the new point file.

4. Hit OK and click Yes on the resultant dialogue box to add the output layer to the map canvas.

Split vector layerThis feature allows you to split a vector file into a number of separate shapefiles, based on some attribute value:1. Click Vector > Data Management Tools > Split Vector Layer.2. Select the Input vector layer (see Figure 3) and the

attributes to be used to split the layer (in our case, airports and the Unique ID field, respectively).

3. Browse to the folder to save output files (ours is airport_split_by_name) and click OK.

www.LinuxForU.com | LINUX For YoU | JULY 2012 | 55WorldMags.netWorldMags.net

Page 58: Linux for You 2012-07

For U & Me Let 's Try

You will see the new point on the map canvas.For plotting roads, rivers and mountain ranges,

you could choose line as the geometry, while polygon geometry is chosen for closed entities like lakes, parks, parcels of land, etc.

Map publishingA map ready for publishing should contain the following details: the title, legend, data source, date, projection information, distribution licence, scale, north arrow and information about the creator. Let us now publish a map with the regions, major rivers, and trees layers. The map composer in QGIS provides a canvas to structure the map and add these data fields. � Click File > New Print Composer. � Use the General tab on the right to modify parameters

like the size of the paper, orientation, the quality and the grid style.

� To add a map to the composer, click Layout > Add Map and then draw the canvas in the white area of the screen. The layout will display the layers as seen in the map canvas of the QGIS.

� Click the Move item content icon to pan across the map. � To add a label, click Layout > Add a label. Click on the

map canvas where you want to place the label. Use the Item tab on the right to style the text.Elements like the title, publisher’s name, data source

and the date of publishing can be added as labels.Other elements like the legend, north arrow and scale-

bar can be added using the controls in the menu. These can be styled using the fields on the Item tab.

Exporting the mapClick File > Export as image to export the map as an image. The map can also be exported as a PDF or an SVG file.

Figure 6: Attributes dialogue

Figure 7: Sample map

4. Click the Add to Attribute List button.5. Click OK.6. Save the layer as new_airports.shp.7. Right-click New Airports in the Layers window.8. Select Toggle Editing on the pop-up. Now you are ready

to plot new points.9. Go to Edit > Capture Point. Click on those places in the

map where you want to plot new airports. In the Attributes pop-up (Figure 6), type in the desired values, and hit OK.

The authors are researchers at the Center for Study of Science, Technology and Policy (CSTEP), Bengaluru. They work in the fields of GIS and Agent-Based Simulation. At CSTEP they have built a web-based GIS framework to simulate and visualise disaster impact. They love working with open source tools and are active contributors to Openstreetmaps.

By: Sagar Arlekar & Niket Narang

Your favourite Linux Magazine is now on the Web, too.

LinuxForU.comFollow us on Twitter@LinuxForYou

THE COMPLETE M AGAZINE ON OPEN SOURCE

BETA

56 | JULY 2012 | LINUX For YoU | www.LinuxForU.comWorldMags.netWorldMags.net

Page 59: Linux for You 2012-07

Guest Column Exploring Software

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 57

Save time, impress colleagues, switch to a CMS in days!

Static to Drupal 7

At some point in the life of a static site, you will wish that you had used a CMS. The reasons could be varied:

� You may be suffering from the acute pain of changing the look and feel of the site.

� You may need to make the site look good on smart mobile devices, netbooks, tablets, or even extra-wide desktop screens.

� Your organisation may finally realise that supporting IE 5 and 6 is not enough. You no longer can keep ignoring the growing tribe of Google Chrome and Firefox users.

� You may need to modify the content and keep it current.It is surprising how often the implications of the last

point are underestimated. The department complaining about the content being incorrect, and the department responsible for providing the correct information, are not necessarily the same. It is very hard to delegate the responsibility for modifying static content. You, as the person accountable for maintaining the site, are stuck in the middle, and it can be a very frustrating experience.

Switching to a CMSAs you explore the option of switching to a CMS, you will probably try to estimate the effort of transferring the existing content into the new site. It is not an easy decision. Should you modify the content during the migration? Obviously, the advantages of a CMS will be minimal, unless you reorganise the content based on the organisation's needs and the capabilities of the CMS. This activity takes a long time—most of which is spent in getting everybody to agree on a suitable design. Multiple models may need to be explored. Meanwhile, the backlog on the existing site continues to grow.

It would be great if you could transfer the existing content painlessly into the CMS structure. Then you could replace the pages as and when required, into the ideal or appropriate structure. You could then shorten the period for which you need to maintain both the existing site and the new site being created. The stakeholders would get a better feel of what the site would be like with their own content. The theme and the colour schemes can be decided on while you build the new site. Switching a theme is not hard— if you haven't customised a theme substantially.

Import HTML and Drupal to the rescueDrupal comes with an Import HTML module, which allows you to import an existing HTML site—see http://drupal.org/project/import_html. It provides a couple of sample templates for you to get started—and the best part is, it is now available for Drupal 7. Try a few pages first. Chances are that your imported content will look like such a mess that you’ll think it's hopeless and want to give up.

Don't give up too soon! The templates for transferring the content are in XSLT. It is bad enough to write XML by hand, and very few people I know are comfortable writing XSLT scripts. But persist; it is not as hard as it looks. The samples are sufficient to get started with, and you may need to make only some common changes.

Typically, a page will consist of a header, footer, sidebars and content. You will probably want to manage the first three using Drupal 7. Hence, you can transfer the content from the static pages into content in Drupal 7 pages. Import_HTML will create reasonable menu links and preserve the existing page names. It will also import content like PDF files and images into a suitable folder.

Menu-editing features are very nice in Drupal 7, and you can easily reorganise the menus once the content is meaningfully imported.

Unless your site is absolutely chaotic, you will find patterns. At worst, there may be a couple of sub-sites, and you may need to create separate templates for each of them. Start with the simplehtml2simplehtml.xsl. Here, you will find the template 'get-content'. Just below it, notice the following lines:

<xsl:template match="xhtml:h1">

<!-- Remove the found H1 from the flow altogether. -->

</xsl:template>

This will match the HTML <h1> tag; ignore it in the conversion. You will soon understand why H1 content is excluded.

So, the idea is simple. You need to identify elements to ignore, retaining only the desired content. Here’s an example:

Anil Seth

( Continued On Page 62....)

WorldMags.netWorldMags.net

Page 60: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 61: Linux for You 2012-07

Overview For U & Me

#define _(String) gettext (String)

int main() {

setlocale (LC_ALL, "");

bindtextdomain ("helloi18n", "/usr/share/locale");

textdomain ("helloi18n");

printf (_("Hello World\n"));

}

The internationalisation instrumentation consists of adding header files (libintl.h and locale.h), and calling three functions at the start of the program. The setlocale function signals to the runtime that the locale as defined in the user environment needs to be used. The bindtextdomain function takes a package name and directory name as arguments. For a typical software project, there will be many source files that need to be compiled as a group, to build a package. Since we are compiling just one file, I have just used the name of the source file. The directory refers to the path where the message catalogues (the set of translated messages for the program) are available. The textdomain function is used to associate the filename for messages used in the program. The printf call is modified by placing the format string inside a function _(). The preprocessor will generate the gettext function calls. The localisation software xgettext (explained later) uses this as a keyword to extract translatable messages.

Now, let us compile and run the program:

$ gcc -o helloi18n helloi8n.c

Hello world

LocalisationLet us extract the strings, translate them, and prepare a binary so that the program can use another locale, using the Gettext library programs.

$ xgettext -k_ --package-name=helloi18n --package-version=1.0 -o

helloi18n.pot helloi18n.c

The parameter -k_ specifies that we are interested in messages that are part of the function call with the underscore name. The package and version names are used in the header information. Usually, these are specified as part of the build files. As our example is fairly simple, I have used command-line arguments to pass these names. The option -o helps specify the file type as portable object template (pot) rather than the default portable object (po).

Listing 3: helloi18n.pot

# SOME DESCRIPTIVE TITLE.

# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER

# This file is distributed under the same license as the PACKAGE

package.

# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.

#

#, fuzzy

msgid ""

msgstr ""

"Project-Id-Version: helloi18n 1.0\n"

"Report-Msgid-Bugs-To: \n"

"POT-Creation-Date: 2012-06-04 22:43+0530\n"

"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"

"Language-Team: LANGUAGE <[email protected]>\n"

"Language: \n"

"MIME-Version: 1.0\n"

"Content-Type: text/plain; charset=CHARSET\n"

"Content-Transfer-Encoding: 8bit\n"

#: helloi18n.c:15

#, c-format

msgid "Hello World\n"

msgstr ""

Listing 3 shows the pot file for our example program. It consists of a few header lines of information, followed by the source string and translated string, prefixed with msgid and msgstr, respectively. The first message is designed to give general information about the translation, such as the date, the name of the translator and team, etc. The subsequent lines provide messages used in the program. Each message follows the syntax as given in Listing 4.

Listing 4: Syntax for messages in a .po file.

white-space

# translator-comments

#. extracted-comments

#: reference...

#, flag...

#| msgid previous-untranslated-string

msgid untranslated-string

msgstr translated-string

As the meaning of a word could be different based on the context, the above format provides options for the translator and programmer to provide additional context information. The file name and line number at which the message appears is provided as part of the reference. The flag is used to indicate the status or specific nature of translation. If it is fuzzy, it means that the translator needs to confirm the translation, as it was guessed from previous translation data. If it is obsolete, it could mean that it can be removed from the file. If it is C-format, it is an alert to the translator that this message is used in input or output statements, and follows the C language format and can have format information, newline information, etc. The previous-untranslated-string is updated by the msgmerge program (not described in this article), when creating a new pot file using previous translation files. Let’s use helloi18n.pot and a version for the Telugu language with blank translations.

www.LinuxForu.com | LINuX For You | juLY 2012 | 59WorldMags.netWorldMags.net

Page 62: Linux for You 2012-07

For U & Me Overview

$ msgfmt -o te.mo -v te.po

$ cp te.mo /usr/share/locale/te/LC_MESSAGES/helloi18n.mo

ResultsLet’s run the program with the default English locale, and then change the locale to Telugu. After which, let’s run the program again, and then change the locale back to English. Note that the Telugu text rendering will not be perfect in a typical terminal, due to limitations in rendering the complex script of the language. You can direct the output to a file, and view the properly rendered message by opening that file in an editor. You can also use Terminator software (from software.jessies.org) which can display complex scripts properly. If you are using an older system, you can use LANG in place of LANGUAGE for the proper operation of the following code. Alternatively, you can change your language settings to the desired language, log out, and log in with the new set-up, and try the code.

$ echo $LANGUAGE

en_US.utf8

$ ./helloi18n

Hello World

$ export LANGUAGE=te_IN:te

$ ./helloi18n

$export LANGUAGE=en_IN:en

That concludes our primer on Gettext. We looked at how a typical ‘C’ language source can be instrumented to support internationalisation. We also looked at how the messages are extracted using xgettext, translated using msginit, and placed in the proper location, so that the run-time library can use them.

Several tool-kits, Web-based tools and standalone software were developed to allow the localiser to focus on translation without worrying about the nitty-gritty of files and formats. We will cover a few popular tools in forthcoming articles.

• Introduction to Internationalisation Programming, Issue 103, November 2002, By Olexiy Ye Tykhomyrov in the Linux Journal,http://www.linuxjournal.com/article/6176?page=0,0

• Gettext manual:http://www.gnu.org/software/gettext/manual/gettext.html

• Terminator Cross platform GPL Terminal emulator with complex text rendering support.http://software.jessies.org/terminator/

Resources

The author is an independent consultant in the areas of IT, program/engineering management and open source. He is also the president of Wikimedia India and the WG Chair for IEEE-SA project P1908.1 “Virtual keyboard standard for Indic languages”. He can be reached through his website http://arjunaraoc.blogspot.in and Twitter id @arjunaraoc.

By: Arjuna Rao Chavala

$ msginit -l te_IN -o te.po -i helloi18n.pot

This program will ask for the email of the user (given as [email protected] in this example), and use it as the contact address in the header. Now open the file in an editor (for example, gedit), and type in the translation for the string "Hello World\n" as " \n" in the target language Telugu, and save the file. The resultant file is shown in Listing 5.

Listing 5: te.po corresponding to helloi18n.pot

# Telugu translations for helloi18n package.

# Copyright (C) 2012 THE helloi18n'S COPYRIGHT HOLDER

# This file is distributed under the same license as the helloi18n

package.

# arjun <[email protected]>, 2012.

#

msgid ""

msgstr ""

"Project-Id-Version: helloi18n 1.0\n"

"Report-Msgid-Bugs-To: \n"

"POT-Creation-Date: 2012-06-04 22:43+0530\n"

"PO-Revision-Date: 2012-06-04 22:54+0530\n"

"Last-Translator: arjun <[email protected]>\n"

"Language-Team: Telugu\n"

"Language: te\n"

"MIME-Version: 1.0\n"

"Content-Type: text/plain; charset=UTF-8\n"

"Content-Transfer-Encoding: 8bit\n"

#: helloi18n.c:15

#, c-format

msgid "Hello World\n"

msgstr " \n"

Let’s use the po file to build machine object (.mo)version, which is also called as message catalogue and store it in a specified location, with the filename changed to the package name. To do this, you may need superuser access as the standard location for storing such files has restricted access. If you do not have this, you can use your home directory, with appropriate replacements in the bindtextdomain function call of source code. The message catalogues are placed in a directory structure consisting of language code/LC_MESSAGES in the designated path. For example, Telugu messages are placed in /usr/share/locale/te/LC_MESSAGES/helloi18n.mo and Hindi messages are placed in /usr/share/locale/hi/LC_MESSAGES/helloi18n.mo.

This allows supporting additional locales by placing the localised message catalog files, without the need for recompiling the source, as the run-time library will automatically check for the translated message catalogues, and if it does not find any, will use the default messages. This also provides flexibility for the translation to progress independently.

60 | juLY 2012 | LINuX For You | www.LinuxForu.comWorldMags.netWorldMags.net

Page 63: Linux for You 2012-07

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 61

Guest Column Joy of Programming

Ken Thompson, the co-creator of UNIX, was asked what he would do differently if he had to do it all over again. He replied that

he would add the missing ‘e’ in the ‘creat()’ system call! There are many interpretations of this curt answer. One is that UNIX is so perfect that, except for spelling mistakes like ‘creat’, everything else is fine so there is no need to do anything different, even if it were to be done all over again. Whatever the interpretation of the answer might be, UNIX programmers have to ‘learn’ to misspell ‘create’ as ‘creat’ to get their program to work!

Most programmers consider naming variables a trivial issue, and do not give it the attention that it deserves. One reason is that they think variable names are just, well, names, and have no impact on the executable program. However, this notion is wrong. The main reason is that the code is not written for the machine to read—it is for other programmers to read. Further, variable names can cause bugs, and hence they do have an impact on the executable program! I refer to confusing, misleading or just wrong variable names as ‘naming bugs’. This is an unusual notion, and I’ll explain this with a few examples.

First, let’s look at confusing names. Consider the example of these three interrupt-related methods in the Thread class in Java: ‘interrupt()’, ‘interrupted() ’ and ‘isInterrupted() ’. By just reading these method names, can you tell what these methods mean, and what they do? It’s difficult, even if you’re an experienced Java programmer. So, here is the explanation. The method ‘interrupt()’ interrupts the current thread; ‘interrupted()’ checks whether the current thread has been interrupted, while also clearing the interrupted status of the thread! And the method ‘isInterrupted()’ just checks whether the current thread has been interrupted (but doesn’t touch the interrupted status flag). As you can see, the method name ‘interrupted()’ is unintuitive and not self-descriptive—you need to read the documentation

to understand what it does. So, it is a naming mistake (or bug). To add to the confusion between these similar-looking methods, ‘interrupted()’ is a static method, whereas the other two are instance methods.

Confusing names like these often lead to bugs. For example, if you see a call ‘t1.interrupted();’ where t1 is of type Thread, it might be because of a programming mistake: the programmer might have intended to call the instance method ‘isInterrupted()’ instead of the ‘Thread.interrupted()’ method. This problem is so common that there is even a static analyser rule that checks for this (see the CodePro AnalytiX warning: ‘Improper use of Thread.interrupted()’ )! This confusion arises because of two reasons: one is that the names ‘interrupted’ and ‘isInterrupted’ are confusing, and have different semantics; and the other is that Java allows calling static methods from instance variables.

When method names or API names are similar-looking, or differ only by capitalisation or a single character, it is easy to use them interchangeably, by mistake. The problem is compounded if the functionality is identical or similar. A good example is mistyping ‘wait’ instead of ‘await’ in the context of multi-threaded programming in Java. Again, this mistake appears to be common, and hence there is a static analyser rule to warn you of this potential bug (see CodePro AnalytiX warning: “wait() invoked instead of await()” ) .

Confusion in the spelling of names can cause bugs. For example, mistyping the name of an overriding method is a very common bug; in our context on naming bugs, this problem can arise because of cultural differences in spelling. For example, consider the method ‘finalize()’ in Java. A British or Indian programmer might mistakenly attempt to override the ‘finalise’ method instead of ‘finalize’ in Java! In this case, the derivation will have both the inherited ‘finalize’ method as well as a programmer-provided ‘finalise’ method, which

Naming BugsSo, what’s in a name? A lot, apparently, including potential bugs! In this column, let us look at how errors in naming or spelling can lead to bugs.

S.G.Ganesh

WorldMags.netWorldMags.net

Page 64: Linux for You 2012-07

62 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Joy of Programming Guest Column

is not what the programmer intended. This results in a subtle bug. There is no ‘universal English’, and hence it is impossible to give variable names that are universally acceptable. Further, what is considered ‘correct’ spelling depends on where you live, and who your target audience is. For example, I follow American English and my copy editor (who does an excellent job of making editorial improvements to my article every month) corrects my Joy of Programming articles and makes changes to consistently use British (or Indian) English spelling instead. This is the right thing to do, because LFY readers are mainly from India. However, for code, there are no national boundaries. So, what the ‘right spelling’ is (even within the same dialect of English) is not clear. In other words, there are no simple answers to certain types of ‘naming bugs’; consistent usage is perhaps the only acceptable solution.

Sometimes, writing variable names and comments in languages other than English can render the

By: S G Ganesh

The author works for Siemens (Corporate Research & Technologies), Bengaluru. You can reach him at sgganesh at gmail dot com.

code unreadable. Unicode has become popular and programming languages have also adopted it. So, programmers can now write comments and variable names using their native language. Looks like a great idea, right? Except, of course, if you have to read the code, and you don’t know that language! In my experience, while working with software developed in Germany, I had a tough time trying to figure out what the code was doing—because, except for the language keywords, all the code was in German! So, the code would compile perfectly and execute flawlessly but I couldn't touch the code, let alone change it, because I had no clue what the source code meant!

The author is currently a visiting faculty member at IIT-Ropar, prior to which he was a professor at Padre Conceicao College of Engineering (PCCE) in Goa. He has managed IT and imaging solutions for Phil Corporation (Goa), and worked for Tata Burroughs/TIL. You can find him online at http://sethanil.com and reach him via email at [email protected].

By: Anil Seth

<xsl:template match="xhtml:div[@id = 'header']">

<!-- remove header from the flow altogether -->

</xsl:template>

<xsl:template match="xhtml:p[@id = 'breadcrumb']">

<!-- remove breadcrumb from the flow altogether -->

</xsl:template>

<xsl:template match="xhtml:ul[@class = 'navigation']">

<!-- remove navigation from the flow altogether -->

</xsl:template>

You can select an HTML tag, e.g., a div, a paragraph, or a list, and narrow them by matching, say, the id or class. As you can see, it is pretty simple to skip any blocks in the original that are not a part of the core content. This matching has to be targeted at your specific site. Understandably, if you include all the blocks, the resulting site will show it all as a part of the main content, and it will be a mess.

Finally, why did the default template skip the header element, which is probably what you want to do as well? The reason is that the header is likely to be the title of your page. You may now look at the 'get-title' template in the XSL file; it is pretty readable:

<xsl:template name="get-title">

<!-- Returns the H1, or if unavailable, the <title> -->

<xsl:choose>

<xsl:when test="//xhtml:h1">

<xsl:value-of select="normalize-space(//xhtml:h1)" />

</xsl:when>

<xsl:otherwise>

<xsl:value-of select="normalize-space(//xhtml:title)" />

</xsl:otherwise>

</xsl:choose>

</xsl:template>

If an H1 element is present, the title of the page is set to the text content associated with that. If not, it sets the title to the text associated with the title tag in the header. It is possible that your site may have the site header as the H1 element. In that case, you may need to suitably modify the get-title template. Looking at the code above, this should not be hard to do.

Ideally, you should design the site afresh. However, websites are now a critical resource for an organisation. Time is a luxury. ‘Good enough’, and not perfection, has to be your goal. There is a very high likelihood that by using Import_HTML, you can obtain a 'good enough' site in a very short time, which makes it a module well worth exploring.

( Continued from Page 57....)

WorldMags.netWorldMags.net

Page 65: Linux for You 2012-07

Sandya Mannarswamy

CODESPORT

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 63

For the last couple of months, we have been discussing dynamic languages such as JavaScript, and how they differ from

traditional statically compiled languages like C or C++. I have received a few emails from our readers in response to these columns. As you know, CodeSport has tended to mainly focus on C or C++ over the last few years. Hence, there have been questions from our readers as to why this column’s focus has shifted to Web languages, and whether I see it as more of an industry trend—with the usual question on whether C or C++ is dying.

These emails made me take a second look at some of the common questions most software developers face, as we meander through our careers. While my first thought was to do a serious discussion of this topic, my common sense asserted itself in time, and I thought that since there are so many self-help books for software developers that presumably do that, let us take a lighter look at this question, in this month's column.

So, what does it take to succeed as a software developer?Well, I obviously don't claim to know the entire answer to that question, so I invite our readers to send in their thoughts on this subject. Drop me a mail at [email protected], with the subject line 'Success recipes for a software developer'. I

plan to summarise the inputs and share them with LFY readers in next month's column.

Software development as a career is complex, and does not have an established recipe for success. This is, of course, true for most complex human development activities, whether it is in the field of arts or sciences. However, let us try to explore some practices that can help you along the path to success.

Missing Manual Notes for Software Developers (MMNSD)There are certain truths that no college curriculum for software programmers spells out. We call these the 'Missing Manual Notes for Software Developers'.

Note 0: The only thing you can be certain will not change is change itself.

While this is true for life in general, it is more glaringly evident in a software developer’s career. If you start by learning Language 'X' as the universal language that guarantees you success as a software developer—well, by the time you finish mastering X, the world has gone on to 'Y' and so on, ad infinitum. All of us have been bitten by this one. For instance, I started learning JavaScript a few months back. By the time I could reasonably grapple with prototypical inheritance, function objects and closures, the JavaScript world has gone ahead to 'Node.js', server-side JavaScript and CoffeeScript.

In this month’s column, let’s take a break from technical topics and instead have a humorous shot at, "What does it take to succeed in a software career?"

WorldMags.netWorldMags.net

Page 66: Linux for You 2012-07

64 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

CodeSport Guest Column

Corollary 1: However, Note 0 does not mean that you can perpetually postpone learning anything new in programming languages. That would just leave you with a failing grade in college and no job prospects ever.

Corollary 2: Hopefully, what you learnt about Language 'X' would speed up your learning of Language 'Y'. At this point, it is not clear whether this is actually true, or just a myth in the software developer universe. At least, you can console yourself that learning Language 'X' enabled you to appreciate and understand Language 'Y' better.

Note 1: No software developer curriculum can be complete and sound.

The very fact that a curriculum has been designed and implemented for a novice programmer, and has been followed by 'wannabe' software developers implies that much of the course material has become outdated by the existence of Note 0.

Note 2: The existence of Note 1 does not preclude the existence of certain essential topics in every developer’s curriculum.

Note 2 has been a maxim that all our college professors tried to instil in us. They just called it, "Getting your fundamentals right." The fundamentals for computer science are typically discrete mathematics, data structures, algorithms, operating systems and computer architecture. Every software developer curriculum tries to give a bird's-eye view of these wide and complex topics, and mostly succeeds in making students hate these topics.

Note 3: Curiosity never killed the software developer.The most important quality for a successful software

developer, certainly never mentioned in any software developer curriculum, is CURIOSITY. While it may have been fatal to the cat, it is necessary for a software developer to always remain curious. After all, it may help you find a lurking bug in your code, detect a Trojan horse, or spot the next Big Thing in Technology.

Note 4: Connections count!As in any other human industry, your network

matters; not just the Ethernet or Wi-Fi, but the one you establish with other software developers. Most of your professional learning comes from what you can pick up from another software developer, rather than from what you get out of a text book. 'Wannabe' software developers need to know and internalise the concept of 'six degrees of separation', which refers to the idea that a chain of statements about being a friend of a friend can be made to connect any two people, on an average in six steps or fewer. Your online connections, such as those on LinkedIn, would in most cases be the best bet for your introduction to a new job or new technology.

Note 5: No one in the software industry knows the Next Big Thing.

While Note 5 sounds highly pessimistic, there is comfort in the fact that it is universally true for everyone in the software industry. Therefore, your home-grown invention in software stands an equal chance of becoming the next Facebook, as the multi-million dollar effort from a major MNC. Therefore spend your spare time (provided you get some) on your pet software project. And if anyone in your family objects to your maniacal tendency to stay online, tell them that you are destined to make the College DropOut Billionaires list alongside Mark Zuckerberg, Bill Gates, and of course, the legendary Steve Jobs.

Note 6: The Missing Manual Notes for Software Developers are always evolving!

So no one knows how big the Missing Manual is, since it is obviously missing! This is a big comfort, because whether you know less or more of it does not really matter in the long run.

My ‘must-read book’ for this monthThis month’s must-read book suggestion comes from me. In keeping with the non-technical nature of this month's column, I wanted to highlight a favourite of mine, ‘The Hitch-Hiker's Guide to the Galaxy’ by Douglas Adams. While the plot is nonsensical, it lends itself to imagination. Some of the qualities that we need as software developers are qualities brought forth in the book: unceasing curiosity, the ability to cope (or pretend to cope) with change, and an inherent ability to laugh at one's own foolishness, always.

If you have a favourite programming book or article that you think is a must-read for every programmer, please do send me a note with the book’s name, and a short write-up on why you think it is useful, so I can mention it in this column. It would help many readers who want to improve their coding skills.

If you have any favourite programming puzzles that you would like to discuss on this forum, please send them to me, along with your solutions and feedback, at [email protected]. Till we meet again next month, happy programming, and here’s wishing you the very best!

The author is an expert in systems software and is currently in the happy period between jobs. Her interests include compilers, multi-core technologies and software development tools. If you are preparing for systems software interviews, you may find it useful to visit Sandya's LinkedIn group, ‘Computer Science Interview Training India’ at http://www.linkedin.com/groups?home=&gid=2339182

By: Sandya Mannarswamy

WorldMags.netWorldMags.net

Page 67: Linux for You 2012-07

Part—1

OpenMRS, a widely used Electronic Medical Record system, is a community-developed, open source and enterprise grade platform. Its core is very thin, and almost every

functionality is provided through pluggable modules. It is robust enough for a nationwide healthcare system and nimble enough for a field-based clinic. This article series will cover OpenMRS module development; it is aimed at J2EE developers and those who

want to contribute to OpenMRS.

and Save LivesWrite M dules

and Hibernate stack and uses MySQL as the database.

Basic architectureThe components are: � Spring: An application development framework for

developing MVC architecture applications � POJO: Plain Old Java Object � Hibernate: The Java persistence framework project, which

performs powerful object-relational mapping, and queries databases using HQL and SQL

� DAO: Direct Access Object � Liquibase: Database-independent library for tracking,

managing and applying database changesAn interesting fact about OpenMRS modules is that they

are like mini subsystems that can not only communicate with OpenMRS core services, but can also have their own services and schema that can be used by other modules. This makes modules flexible enough to be independent of the system, and robust enough to be dependent on each other, if required.

Module installation

Note: Installing modules through the Web interface is disabled by default (for security purposes). To enable it, set the 'module.allow_web_admin' runtime property to true and restart the application.

1. Download the module to the local filesystem.

There are a lot of OpenMRS modules and the list is constantly increasing. A detailed list is available at https://modules.openmrs.org. OpenMRS offers the

functionality to directly install or update modules through a Web interface—on the fly, without restarting Tomcat.

This article will cover the basics of the OpenMRS architecture and how to install, update, stop and start a module in OpenMRS. The OpenMRS is built on the Spring

Developers

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 65

Let ’s Try

WorldMags.netWorldMags.net

Page 68: Linux for You 2012-07

Figure 1: Typical architecture of the OpenMRS stack

By: Gaurav Paliwal

The author is a FOSS lover. His area of expertise includes academic infrastructure using FOSS. He can be reached at [email protected]. Read more about him at: http://gauravpaliwal.com/.

[1] List of OpenMRS sites: http://openmrs.org/about/locations/[2] OpenMRS module repository: http://modules.openmrs.org/[3] Most downloaded modules: https://modules.openmrs.org/

modules/stats.jsp

References

2. Go to the Manage Module page on the administration page and click Add or Upgrade Module.

3. After this, select the .omod module file you downloaded, and click Upload.

4. The module will be installed without restarting the server. Note that each time an action is taken on a module, the OpenMRS context is restarted. When a module is loaded, the database changes that it requires in Liquibase, if any, are applied to the database.The module is now accessible to everyone privileged to

use it. Modules can have granular privileges, i.e., any specific set of roles as required by the module.

Note: There are other ways of installing modules, like directly searching the OpenMRS modules repository and installing directly from the repository—or dropping the .omod file in the defined module repository folder.

Starting and stopping the moduleGo to the OpenMRS module management page and click the red button to stop it, or the green button to start it. While doing this, no database changes made by the module are lost; only the OpenMRS context is restarted, and the module is started or stopped.

Module updatesYou can check for updates to modules by clicking the Check For Update button on the Manage Modules page. You can also upload a newer version of the module through the Web interface, or directly dump the module file to the OpenMRS module repository.

On an update, first the old module is removed. After that, database changes from the previous version to the newer version (i.e., with different IDs) are applied to the database. Then the module is loaded.

Module deletionTo delete a module, in the module management page, click

the grey icon next to the module you want to delete. Any database changes done by the module are not deleted. The OpenMRS context will be restarted after removal of the module from the module repository folder.

Spring

Manager (Services)

DAO (Direct Access Object)

Hibernate (Persistence API)

Liquibase

Database (MySQL)

PO

JO

Month theMe Featured List

May 2012 Virtualisation Certification & Training Solution Providers

June 2012 Android Virtualisation Solution Providers

July 2012 Open Source in Medicine Web Hosting Providers

August 2012 Open Source on Windows Top Tablets

September 2012 Open Source on Mac Top Smart Phones

October 2012 Kernel Development CLOUD Solution Providers

November 2012 Open Source Businesses Android Solution Providers

December 2012 Linux & Open Source Powered Network Security Network Security Solutions Providers

January 2013 Linux & Open Source Powered Data Storage Network Storage Solutions Providers

February 2013 Top 10 of Everything on Open Source IPv6 Solution Providers

LFY Magazine attractions during 2012-13

66 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 69: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 70: Linux for You 2012-07

In the medical software domain, constant improvements are required to find out new imaging analysis techniques and to develop custom applications.

These types of software are often developed as public collaborations, and are then made available for use, alteration and redistribution. The overall intent in this article is to show the benefits of open source libraries for the rapid development of biomedical applications, and also to compare the different software.

Insight Toolkit (ITK)In 1999, the National Library of Medicine (USA) was awarded a three-year contract to develop an open source registration and segmentation toolkit, which came to be known as Insight Toolkit (ITK). Segmentation is performed for the recognition and categorisation of data coming from medical instruments such as CT and MRI scans; images gained from these can be used to get yet more information, by the registration process. The kit has innovative algorithms to support multi-dimensional views.

ITK can run on multiple computer platforms; its cross-compilation is handled by CMake software. ITK was coded using C++, which also allows it to interact with other languages like Python and Java. Developers followed generic programming concepts and efficient memory management techniques. Smart pointers were used to increase memory efficiency. ITK supports many file formats like DICOM, PNG, VTK, BMP, JPEG, Siemens, Tiff, RAW, GE4x, and others. It can be downloaded from http://www.itk.org/HTML/Download.php.

The Concurrent Version System (CVS) tool is also used to access ITK. It should be only accessed when the status of the code is shown as stable in the ITK Quality Dashboard.

This article, aimed at doctors or those interested in writing open source healthcare applications, focuses on the two most significant open source software toolkits available for medical imaging processing and visualisation—Insight Segmentation and Registration Toolkit (ITK) as well as Visualization Toolkit (VTK). These have been the backbone of popular software like OsiriX, ITK-SNAP, ParaView and so on. Readers can learn more about these two toolkits, the differences between them and how to use or contribute to these projects.

Detailed descriptions of the ITK modules can be found at http://www.itk.org/Doxygen/html/modules.html.

Visualisation ToolkitWhether to generate 3D computer graphics and image processing, or for scientific visualisation or even volume rendering, Visualization Toolkit (VTK) is widely used and quite popular. Initially, the core of this open source software was written by three researchers, Will Schroeder, Ken Martin and Bill Lorensen (with the permission of GE), as companion software for the book, ‘The Visualization Toolkit: An Object-Oriented Approach to 3D Graphics’ published by Prentice-Hall. After gaining world wide attention, Kitware Inc was formed to support the software community. Now VTK has become a permanent feature in academic, commercial and R&D sectors. Its framework is the backbone of several other visualisation applications like ParaView, MayaVi and OsiriX.

Like ITK, VTK is implemented in C++ and is cross-platform. It can be expanded in other languages like Python and Java, as it is possible to wrap those languages' interpreters. VTK can be downloaded from http://www.vtk.org/VTK/resources/software.html.

ITK vs VTKApart from both being implemented in C++, and having the same pipeline architecture, ITK and VTK are quite different. First, ITK is an image-processing software; VTK has only visualisation capabilities. The algorithms supported also differ. ITK worships segmentation and registration algorithms, whereas VTK follows various visualisation algorithms, which also include scalar, vector and other methods. Besides this, VTK provides users the ability to wrap other interpreters like Python.

Medical Visualisation and Imaging Software

Comparing

pen Source

68 | july 2012 | lINuX For you | www.linuxForu.com

Open Gurus Overview

WorldMags.netWorldMags.net

Page 71: Linux for You 2012-07

How to use ITK and VTKAs both toolkits consist of C++ libraries, a suitable compiler is required, depending on the platform you use. ITK uses the CMake open source build system, which you can get from: http://www.cmake.org/.

To write a simple program using ITK or VTK: � Make a directory for your program. � A file named CmakeLists.txt has to be made to generate

the Makefile (if you are using UNIX) or Visual Studio Workspace (if you are using MS-Windows).

� Now create a source file of the extension .cxx. � Configure CMake for make for the target directory that

contains your code. If you are in the target directory, just use ".", else specify the directory name.

� Build the program you made, and… � Execute the program.

Contributing to ITKThere can be several levels at which you can contribute to ITK, like new classes, internal modules, bridge modules, etc. Each level has its own method; the details are at http://www.itk.org/Wiki/ITK_Release_4/New_Code_Contribution_Process.

Contributing to VTKThe simplest way to contribute is to report bugs via the bug tracker (http://www.vtk.org/Bug/my_view_page.php). Before writing and submitting code, one must be well aware of VTK's Quality Dashboard (http://open.cdash.org/index.php?project=VTK). To subscribe to the VTK developer mailing list, visit http://public.kitware.com/mailman/listinfo/VTK-developers. To subscribe to the VTK user mailing list, visit http://www.vtk.org/VTK/help/vtkusers.html. You can find information about VTK coding standards at http://www.vtk.org/Wiki/VTK_Coding_Standards.

By: Rumela Roy

This author is an open source software developer. She can be reached at [email protected]. Her work can be viewed at https://github.com/rrumelaroy.

[1] ITK: http://www.itk.org/[2] VTK: http://www.vtk.org/

References

UshahidiUshahidi is an open source crowd-sourcing platform that can be used to collate and map information gathered from the public, via email, SMS, Twitter, etc. It has been used around the world to map or monitor incidents such as election violence, earthquakes, and several crisis situations.

The Ushahidi platform is built on the Kohana Web framework. It includes built-in support for the Nexmo wholesale SMS API and Clickatell SMS gateways. Ushahidi provides the option of using OpenStreetMap maps in its user interface, but requires the Google Maps API for geo-coding.

Ushahidi currently has an Android and Windows Mobile app, and plans on releasing an iPhone app later this year. Although apps aren’t required for crowd-mapping (SMS makes most sense in places such as Haiti), smartphones make the use of Ushahidi significantly more powerful, allowing automatic loading of GPS coordinates and pictures.Ushahidi enables information to be gathered from the public through a variety of channels. It can be set up relatively quickly, and supports several languages. Once an Ushahidi instance (a running Ushahidi software) is set up, messages can be sent in via email, SMS, Twitter, or directly on the instance website. The messages are verified by an administrator, and once approved, are published—and the location of the incident is displayed on a map. Incidents can be categorised, enabling a visual display of incidents and categories.

The SwiftRiver API and platformSwiftRiver is a platform comprising APIs for data gathering and extracting useful information. It helps people make sense of a lot of information in a short interval of time. In practice, SwiftRiver enables the filtering and verification of real-time data from channels like Twitter, SMS, email and RSS feeds. It is an API ecosystem. It helps to curate real-time data and analysis on any topic of interest to you or your organisation. It helps users discover nascent relationships and trends in data sets that may appear to be unrelated. It can be used to set up streams that search for mentions of your brand or product online and manage social media campaigns after disasters (e.g., via Twitter, SMS or email) from one dashboard. SwiftRiver adds context to content, using semantic analysis. It auto-categorises and classifies email, Twitter, text messages or news articles based on keywords.

By: Gaurav Paliwal

The author is a FOSS lover. His area of expertise includes academic infrastructure using FOSS. He can be reached at [email protected]. You can find more about him at http://gauravpaliwal.com.

[1] SMS for Life: http://www.rollbackmalaria.org/psm/ smsWhatIsIt.html[2] Ushahidi: http://ushahidi.com/products/ushahidi-platform[3] SwiftRiver: http://ushahidi.com/products/swiftriver-platform

References

( Continued from Page 67....)

www.linuxForu.com | lINuX For you | july 2012 | 69

Open GurusOverview

WorldMags.netWorldMags.net

Page 72: Linux for You 2012-07

GNU Health is a complete hospital management system developed and backed by the GNU Solidario Foundation. It is platform-agnostic software built

on top of Python, Tryton and the PostgreSQL database. This provides a solid foundation for the software, essentially making it easy to upgrade, vendor-independent, and of course, easy to customise according to a particular use case. Its module-based approach pertains to genetics, gynaecology, paediatrics, socio-economics, surgery, inpatient hospitalisation, laboratory reports, etc. In short, it is intended to help in managing the resources of hospitals as well as in their daily functions, by digitising all the medical processes of laboratory reports, prescriptions, medical histories, etc.

One of the features of GNU Health that you’re unlikely to find in other software is the decision support system that helps while operating the software. For example, while writing prescriptions, based on the patient’s medical history, it determines if the medicine prescribed is potentially risky. It will then prompt the doctors for verification, and confirm if they really want to proceed with prescribing that particular medicine. It also provides various colour-coded visual aids, which help doctors in making an informed decision regarding the health of the patient.

Features and modulesThe most important features of GNU Health are listed below: � Financial management and billing: Surprisingly, GNU

Health has a list of almost all available currencies, and can do billing in any currency that you choose.

� Hospitalisation: This includes modules like admissions,

GNU Health is software that includes Electronic Medical Records (EMR), a Hospital Information System and a Health Information System. The fact that it is developed on top of the Tryton framework makes it even easier to deploy and use.

appointments, bed administration, etc. � Standardisation: GNU Health complies with WHO’s

ICD-10 medical standards, and contains a list of the WHO essential medicines to aid physicians, so that they can choose from a huge database of already listed diseases and medicines.

� Imaging and reports: GNU Health allows pathologists to attach various images related to the laboratory reports of the patient, like X-rays, etc, and also allows exporting them to various LibreOffice formats for external use (see Figure 1).

� Security: GNU Health’s dependence on Tryton results in better security, because it uses Tryton’s own security module for access control to the underlying software and data.There are, of course, many other modules and features

(Figure 2) and this is not an exhaustive list; rather, just an overview of the software's capabilities.

Installing and configuringSince GNU Health is broadly dependent on the following software, we need to install them before we proceed further:

All About GNU Health

70 | july 2012 | lINuX For you | www.linuxForu.com

Open Gurus Overview

WorldMags.netWorldMags.net

Page 73: Linux for You 2012-07

� PostgreSQL � Python � Tryton

In Ubuntu, for example, I issued the following command to get these set up:

sudo apt-get install python-pip python-lxml python-relatorio

python-dateutil python-psycopg2 python-tz python-polib python-

ldap python-vobject postgresql

You can check the corresponding packages for your particular distribution. After this is done, you should be adding a new operating system user dedicated for gnuhealth installation and use. This is not compulsory, but is recommended.

adduser gnuhealth

su – postgres

createuser gnuhealth

The above commands add the new user and grant that person the necessary permissions for administration. Now, we have two options for installing GNU Health itself, either by using the pip utility, or the configure script. In our case, I used pip; it is certainly much easier, and I would recommend it over the other. To install with pip, run the following command, as the gnuhealth user:

pip install –user trytond_health_profile

pip install --user tryton==2.4

This will install the Tryton server daemon and the Tryton client on your machine, in the .local directory in the home directory of your user. When this is done, you can boot the Tryton server and start the client with the following commands from the $HOME/.local/bin directory:

./trytond &

./tryton

If this goes well, you will hopefully see the screen shown in Figure 3.

Now, you should be creating a new database to store information and interact with the GNU Health modules. To do that, click on File > Database > New database and choose the database host and port, before entering the database name, along with the Tryton server password and the admin password for the database. After the database, you can skip the user creation which Tryton prompts you for, and move on to installing the necessary modules—click the ‘Modules’ section in the left column, which opens a tab with a list of all the available modules. Double-click on the health_profile module and mark it for installation, then click on the ‘Perform pending installation’ button. There are several other modules available for installation; it depends

Figure 1: Lab report generated by GNU Health (Source : Wikibooks - Link 1)

Figure 2: The various modules in GNU Health (Source : Wikibooks - Link 1)

on whether you want to install them or not. This process should get you up and running for your basic needs.

Using the interfaceThe interface for the GNU Health software is fairly simple; just like any other Resource Management System, it looks like a detailed set of forms that can be filled, manipulated, and show data. But under the hood, it is a lot more. In the left-hand column, you can see a menu of the different modules of the software. The right screen displays a tabbed view of the various module elements you want to see (Figure 4). The overall interface of each screen consists of text fields, selection fields, relational fields, etc. The menu on the left makes the software easy to explore, though you do need time to play around with the demo database to

GNU Health Modular Design

Epidemiology

Genetics

Hospital

Pediatrics

Surgery

Radiology

Hemato

OncologyLocalizations(Brazil, Germany,

India...)Family

GNU Health(core module)

Laboratory Socioeconomics

www.linuxForu.com | lINuX For you | july 2012 | 71

Open GurusOverview

WorldMags.netWorldMags.net

Page 74: Linux for You 2012-07

learn the actual functioning of each module, and how each of these are inter-linked. The demo database can be installed as explained on the wiki.

After you are able to work with the software efficiently, you need to deploy it by inserting information related to your medical infrastructure, like the

details of the centres, buildings, beds, operating rooms, physicians, etc, in order to make the software actually useful. Make sure you don’t do that in the demo database itself—create a new database for this purpose.

Snapshot reviewGetting the hang of the software does take a little time, due to the apparent lack of good documentation. Also, the software can be very productive and beneficial to the work-flow of the health centre where it is deployed. But frankly, a good review of the software can only be done by the people who use it and for whom it is intended—the medical practitioners.

However, I believe that this is a complete software package that can handle all the digitisation needs of a medical centre—right from appointments, hospitalisation and lab reports, down to the very last process, i.e., billing. It has the potential to optimise and centralise all the medical information, and makes it much easier to share, analyse, study and collaborate on.

By: Ankit Mathur

The author has a crush on Java, and also loves flirting with almost all other stuff related to databases, cloud computing and Web technologies. Feel free to poke fun at this article, and direct your feedback to [email protected].

[1] http://en.wikibooks.org/wiki/GNU_Health/First_Steps[2] http://bit.ly/LYVg3H

Links

Figure 3: The start screen when the Tryton client is started

Figure 5: The Lab Test Results

Figure 6: A list of all the patients

Figure 7: The Prescription sub-dialog

Figure 4: The user interface including tabs, menu, etc.

If you’re looking for a third-party vendor to provide support, training and implementation of GNU Health in India, the website lists many organisations that do so.

72 | july 2012 | lINuX For you | www.linuxForu.com

Open Gurus Overview

WorldMags.netWorldMags.net

Page 75: Linux for You 2012-07

Python's object-oriented approach, apart from its robustness, clear syntax, developer friendliness and dynamic nature, has made it a very successful programming language. Though the standard Python interactive interpreter is unquestionably useful, Fernando Perez has gone a step further by creating IPython, an enhanced interactive Python shell, which has added history caching, object information, magic functions, tab completion and debugging to the basic interactive interpreter. IPython can also act as a system-cum-Python interactive shell. Interested? Let's roll!

Released under a BSD licence, IPython is packaged by many Linux distributions. Install it on Ubuntu using sudo apt-get install ipython. You can also download

the latest version from http://ipython.org/download.html. Untar or unzip the archive and install it with python setup.py install. To check the version, run ipython -Version.

The IPython interactive shellTo start IPython, just run ipython in the terminal. An example of a session is shown in Figure 1. You may wonder what 'In' and 'Out' are. The beauty of this shell is that it keeps a list of your input and output operations; 'In' is a list, and 'Out' is a dict, as you'll see if you run type(In) and type(Out). In IPython, the 'print' statement is considered as a raw type, and its output is not saved to the 'Out' dictionary—as you can see in Figure 1.

Note: While the latest version of IPython is 0.12, I'm using 0.10 on Ubuntu 10.04 32-bit. The information in this article is based on this configuration.

Tab completion and shell commandsUnlike the normal Python interpreter, you get syntax tab completion, as well as common shell key-bindings like <Ctrl-A> (start of line), <Ctrl-K> (delete line), etc. You can

also mix Python code with system shell commands—just prefix shell commands with a '!' (the exclamation mark). You can store the output of shell commands in Python variables, and then manipulate them with built-in functions like 'grep', 'fields', etc, as in Figure 2. Here I assigned the output of 'ps aux' to a 'test' variable, and then used grep to get a particular process' data, and 'fields' to display the second column of the output (index starts from zero).

What if you want to use Python variables in shell commands? Easy—use the '$' sign, like as follows:

user='ankur'

!ps aux|grep $user

Magic functionsIPython's incredible power includes a set of built-in ‘magic’ functions, whose names begin with '%'. Example: %alias, %cd, etc. Parameters to these are given without parentheses or quotes. To list the available magic functions, use lsmagic, like in Figure 3. The Automagic setting, if ON (it's ON by default), removes the need to prefix the '%'. You can make changes in the config file in the ~/.ipython folder. I can't explain every magic function, but will cover a few in the table below.

You can get details about a magic function by using '?' with it; for example, %alias ? will show its package, base

IPythonThe Best-in-Class Python Interactive Interpreter

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 73

DevelopersLet ’s Try

WorldMags.netWorldMags.net

Page 76: Linux for You 2012-07

Figure 1: Starting IPython

Figure 3: A list of magic functions

Figure 2: IPython with shell commands

Figure 4: Output of %alias ?

Magic function Description Example

%alias Creates an IPython short-cut for a shell command.

%alias l ls -lh (Now l is an alias for ls -lh. Simply run ‘l’ from here on.)

%unalias Removes an exist-ing alias.

%unalias l

%bookmark Bookmarks the path. Bookmarks are saved even across IPython sessions.

%bookmark test /home/ankur/Desk-top The ‘-l’ option dis-plays a bookmarks list.

%dhist Shows the direc-tories you have visited.

%dhist

%hist Shows command history.

%hist Magic commands will be encoded with _ip.magic syntax.

%who Lists Python vari-ables.

%who

%whos Shows extra information about Python variables.

%whos

%upgrade Upgrades your IPy-thon installation.

%upgrade

%run Is used to run an external file in the shell.

%run filename.ipy

%cd Changes the work-ing directory.

%cd directoryname

%magic Provides an overview of magic functions.

%magic

By: Ankur Aggarwal

The author loves to explore open source technologies and enjoys programming. He has learned Python, PHP, C, C++. He loves rock and metal music and plays the guitar too. He runs a blog related to Linux at www.flossstuff.wordpress.com and can be contacted via [email protected] or on Twitter as @ankurtwi.

class, description, usage, etc, as you can see in Figure 4.

Running external filesSooner or later, you will want to run large Python scripts; with IPython, you can run files with the '.ipy' extension, in one of two ways: � From the shell (Bash, usually), invoke IPython, passing

the script file name as a parameter. For example, ipython dateTest.ipy (here, dateTest.ipy is a simple script with a for loop, which displays the system date 10 times).

� From inside an IPython interactive shell, use the %run magic function—for example, %run dateTest.ipy achieves the same result.

There's a lot, lot more to IPythonWhat I have described in this article is a very small part of IPython. Its power is incredible. It is the only interactive Python shell with built-in compatibility with Qt, WxWidgets and GTK—

and it can manage parallel computing clusters too! There is documentation, video tutorials and presentations on the website, http://www.ipython.org/. Explore them and enjoy IPython!

Queries and suggestions are always welcome.

74 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 77: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 78: Linux for You 2012-07

Developers Contest DevelopersContest

The CodeChef.com Challenge, your monthly dose of coding puzzles from India’s biggest coding contest, is now in print!

About CodeChef: CodeChef.com is India’s first, non-commercial, online programming competition, featuring monthly contests in more than 35 different programming languages. Log on to CodeChef.com for the July Challenge that takes place from the 1st to the 11th of every month to win cash prizes of up to Rs

20,000. Also keep visiting CodeChef and participate in the multiple programming contests that take place on the website throughout the month!

Hello and welcome to the CodeChef Puzzle Challenge sponsored by LINUX For You and Directi! Solve this month’s puzzle, and you could be one of the three lucky people to win a

cash prize of Rs 1,000 each! The June edition’s puzzle:A boy lives on the third floor of a building at a height of 12 metres from the ground. He spots a hot air balloon in the sky at an inclination of 45°. At the same time, a man standing at the bottom of the building spots it at an inclination of 60°. The boy runs to his mother to tell her about it. After 10 seconds, his mother comes out to have a look at the balloon. The angle of inclination of the balloon remains the same, i.e., 45°. Can you find the altitude of the balloon from the ground when the mother sees it? Consider the horizontal speed of balloon to be 3 m/sec. Also find the vertical speed of the balloon.

The Solution:Using figure (1)At position Q, let PO = X m Since the angle of inclination is 45º from A, and tan 45º=1,the vertical distance from the 3rd floor is the same, i.e., QT=X m.Hence, from the ground, PQ = (X+ 12) m … (1)Since the angle of inclination is 60º from O, and tan 60º= √3, then,PQ/PO = √3PO =PQ/ √3√3X= X+12 X= 12/(√3-1)

X= 16.39… (2) using √3= 1.732Now after the mother comes out to look at the balloon, it has travelled to position R, yet the angle of inclination remains the same, i.e., 45º. Since tan 45º=1, the vertical distance is equal to the horizontal distance, i.e., RS=SA … (3) SA = (X+30) m … (4)Now, H = (X+30) + 12 … (5) using (3) and (4)H= 16.39+30+12 using (2). Hence, the height of the balloon = 58.39 m. The vertical speed of the balloon = 3 m/sec since it remained at the same angle from A.[Note: The ‘√ ‘ sign is used for square root.]

And the winners this month are:• Gunjan Gupta• Priyadarshini Parida• B N Singh

Here’s your CodeChef Puzzle of the Month: Our chef planned to open a new restaurant. He went to the market and bought some plates and bowls. He hired a person to take the plates and bowls to the restaurant. Unfortunately, the man broke some of them on the way and managed to only deliver exactly 2/3rd of the bowls and 3/4th of the plates safely. If an equal number of bowls and plates were found to be intact, what fraction of the total items got damaged?

Looking for a little extra cash?Solve this month’s CodeChef Challenge puzzle and send in your answer to [email protected] or [email protected] by July 15, 2012. Three lucky winners will get some awesome prizes both in cash and merchandise! You can also participate in the contest by visiting the online space for the article at https://www.facebook.com/LinuxForYou.

3rd Floor

Figure (1)

A

GroundO

X m

X m

M

P

TSH=?

30 m 45º

30 m

R

Q

12m

76 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 79: Linux for You 2012-07

In this series of articles, let us explore some important systems programming concepts in Linux, like file-system interaction, process concepts, IPC, threads and socket programming. I believe this series will be useful for computer science or IT students, freshers joining the industry and for professionals who have done this on other systems. I assume that readers are familiar with the C language and the GCC compiler on Linux, and have some basic general OS knowledge.

In this article, we will look at some important file-system interaction-related concepts in Linux. Two types of interactions are very common—accessing or

manipulating file contents through an editor, for instance; and accessing or manipulating file attributes, like listing files with the ls command. So here’s an overview of inodes, hard and soft links, and some system call interfaces for files and directories, related to the two aspects mentioned. I will also relate these concepts to C standard library functions, so that you get an idea of how functions like fopen, fclose, fgets, etc, are implemented by library vendors for a particular OS.

Files, directories, inodes and linksEvery file or directory in Linux has a unique number called the inode number. To view it, use ls –li (l is long listing format; i is for the inode number) at the command prompt.

The first column lists the inode number of the file/directory.The inode number is an index to a very large array of

inode structures. Individual elements store the file’s attributes (like the type of file, access permissions, the owner, number of hard links, the file size, time stamps, etc) and the addresses of the file's data blocks.

Directories have entries called directory entries, which typically have a file or a directory name, and the inode number. For example, if you create a file called file1 in your current working directory, a free inode (say i1) will be allocated for it. Thus, a new directory entry of the form (file1, i1) will be created in the current directory.

Hard links (we'll come to soft links soon) are references to a particular inode. Now, if we have another directory entry (say file2, i1) that points to the same inode i1, then file2 is referred to as a hard link to file1; both entries point to the same inode structure, and refer to the

System Programming inThe File-system Interface

Part—1

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 77

DevelopersOverview

WorldMags.netWorldMags.net

Page 80: Linux for You 2012-07

same data. Links are usually created with the ln command; to create the file2 hard link to file1, the command would be ln file1 file2. After this, let us list the directory contents, with inodes, as shown below:

bash-3.00$ ls -li

total 2

2889771 -rw-r--r-- 2 user1 grp1 5 Apr 27 2012 file1

2889771 -rw-r--r-- 2 user1 grp1 5 Apr 27 2012 file2

You can see that both files have the same inode number 2889771. The third column shows the number of hard links—in the above case, it's two for both, since the one inode has two directory entries referencing it.

To notice something different, create a sub-directory, dir1. Do a listing again; you'll see that the link count of the directory is 2, and not 1, as for a regular file:

2889767 drwxr-xr-x 2 user1 grp1 512 Apr 26 2012 dir1

Why does even an ‘empty’ new directory have a link count of 2? Because of the following reasons: � Its parent directory contains a directory entry for the

name-to-inode mapping—that's one reference. � In the directory itself, there is always created a . (dot)

entry signifying the current directory, referencing the same inode for the directory—that's the second.Now, there's also a default .. (dot-dot, parent directory)

entry created, and so obviously the parent directory's link count also increases by 1.

Now let’s look at soft links, also called symbolic links. These are actually files containing the path to a target (linked file) and are created by adding the -s parameter to the ln command. For example:

bash-3.00$ ln -s file1 file3

bash-3.00$ ls -ltri

total 3

2889771 -rw-r--r-- 2 user1 grp1 5 Apr 27 2012 file2

2889771 -rw-r--r-- 2 user1 grp1 5 Apr 27 2012 file1

2889769 lrwxrwxrwx 1 user1 grp1 5 Apr 27 2012 file3 -> file1

Here, file3 is a soft link to file1; it's a separate file, with its own inode number. Note that if we try to open file3 with an editor, file1's content is what we'll actually see—most programs follow symbolic links to get at the target files. To view the actual contents of the link file, not the target, use a command like readlink, as follows:

bash-3.00$ readlink file3

file1

Symbolic links are more flexible than hard links: you

cannot create a hard link on one file-system to a file on another file-system (say, a different HDD partition mounted by the OS). You can, however, create symbolic links across file-systems.

Accessing file attributes with CHere is an example of accessing file/directory attributes, which is called my_dirtraverse.c:

#include<stdio.h>

#include<string.h>

#include<unistd.h>

#include<dirent.h>

#include<sys/stat.h>

#include<sys/types.h>

void traversedir (char *);

int main () {

char cdir[1024];

/*get the path of current working directory using getcwd*/

getcwd(cdir,1024);

traversedir(cdir);

return 0;

}

void traversedir( char *dir) {

struct dirent *dp; /*dp is a pointer to a

structure representing directory Entry*/

struct stat sbuf; /*This a structure, which contains the

attributes

of a file or directory*/

char temppath [1024];

DIR *dfd; /* DIR - Assume it is a structure which contains the file

descriptor for a open directory and the directory entry*/

printf("Directory %s\n",dir);

/*Trying to open a directory using opendir function, which

returns

a pointer to DIR structure*/

if ((dfd=opendir (dir))==NULL) {

printf ("Cannot open %s",dir);

return;

}

/*In a while Loop read the Directory Entries using

readdir*/

while ((dp=readdir (dfd))!=NULL) {

/*every Directory is having the dot & dot dot

entries*/

if (strcmp (dp->d_name,".")==0) {

continue;

}

else if (strcmp(dp->d_name,"..")==0) {

continue;

}

else {

/*checking whether it a directory*/

78 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Developers Overview

WorldMags.netWorldMags.net

Page 81: Linux for You 2012-07

/*before Stat make a absolute path name*/

strcpy (temppath,dir);

strcat (temppath, "/");

strcat (temppath, dp->d_name);

/*stat - populates the structure with the

attributes of the file/directory passed as the

first argument*/

stat (temppath,&sbuf);

/*Checking if it is a directory, you can

check many other things too */

if (S_ISDIR(sbuf.st_mode)) {

/*Again call this function to

walk down this directory*/

traversedir (temppath);

}

}

}

closedir (dfd);

}

Now, if you compile this code and run it, it outputs the absolute pathnames of all directories starting from the current directory. The comments in the code will help you understand the basic algorithm.

You can consider modifying the code to add error-handling and more features. Please also read the manual pages for the functions used. You can experiment with these in your own code.

File access and manipulation: System calls vs library functionsWhenever you access a file, the OS (to be more specific, a system call) internally converts the filename to the inode number to get its attributes or data. The data structures used internally are called the user file descriptor table, the file table and the inode table. You need to remember that whenever your program opens a file, a file descriptor (a non-negative number) is returned to your program, which you can use to read/write the file’s data. By default, three descriptors—0 (standard input), 1 (standard output) and 2 (standard error) are automatically allocated to every running program. When you open a file using library functions, instead of a file descriptor, you use a file pointer. A simple program will help you understand these concepts better, so here's a program to copy a file using library functions – it is called mycpy_lib.c:

#include <stdio.h>

#include <stdlib.h>

int main (int argc, char *argv []) {

FILE *sfp,*dfp;

int ch;

if (argc < 3) {

printf ("Usage:mycpy sourcefile destinationfile\n");

exit (1);

}

if ((dfp=fopen (argv[2],"w")) ==NULL) {

printf ("Cannot open %s", argv[2]);

exit (1);

}

if ((sfp = fopen(argv[1],"r"))==NULL) {

printf ("Cannot open %s", argv[1]);

exit (1);

}

while ((ch = fgetc ( sfp )) != EOF) {

printf ("%c", (char)ch);

fputc (ch, dfp);

}

fclose (sfp);

fclose (dfp);

return 0;

}

Compile (gcc mycpy_lib.c –o mycpy) and run it with two command-line arguments—an existing file, and a name for the copy. Then note the functions used, like fopen, fgetc, fputc and fclose. fopen returns a file pointer (to a structure named FILE), which is used as an argument to all the other functions. You can assume that for every open file in your process, there is an associated FILE structure. The function fgetc returns a character read from the file, while fputc writes a character to the file.

You can see that the while loop runs till the end of the file has been reached. How does the libray function fgetc know that the file has ended? The code below, mycpy_sys.c, which uses system calls instead of library functions, will help answer these questions:

#include<stdio.h>

#include<fcntl.h>

#include<stdlib.h>

#include<errno.h>

#include<sys/types.h>

#include<sys/stat.h>

#include<errno.h>

#include<unistd.h>

#define BLOCKSIZE 100

int main (int argc, char *argv []) {

int sfd, dfd, bytesread, ret = 0;

char buf [BLOCKSIZE];

if (argc < 3) {

printf ("Usage:mycpy sourcefile

destinationfile\n");

exit (1);

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 79

DevelopersOverview

WorldMags.netWorldMags.net

Page 82: Linux for You 2012-07

}

/*Opening a file(that is getting the file descriptor), whose

name was specified in command line argument 1 in read only mode

(specified by the symbolic constant O_RDONLY)*/

sfd = open(argv[1],O_RDONLY);

if (0 > sfd) {

printf ("Cannot open File for reading \n");

exit (1);

}

/*Open the destination file in Write Only Mode(O_WRONLY), O_CREAT-

symbolic constant denotes that it will be created, O_TRUNC-data

will be truncated, if already existing, S_IRWXU-specifies the

permissions (read/write/excute for user)*/

dfd = open(argv[2],O_WRONLY|O_CREAT|O_TRUNC,S_IRWXU);

if (0 > dfd) {

printf ("Cant open file for writing\n");

exit (1);

}

while ((bytesread = read(sfd, buf, BLOCKSIZE))>0) {

ret = write (dfd, buf, bytesread);

if (-1 == ret) {

printf ("File Write Error\n");

exit (1);

}

}

/*Closing the file descriptors explicitly*/

close (sfd);

close (dfd);

return 0;

}

Now, note that here, the open, read, write and close functions have been used instead of fopen, fgetc, fputc and fclose. These actually translate to direct system calls. Instead of a file pointer from fopen, open returns a file descriptor number. The arguments of the read and write functions are of the general form: file descriptor, an array from where to write (in case of write) or into which to read data (in case of read), and third, the requested number of bytes to be read or to be written. The return values of read and write are the number of bytes successfully read or written. Here we do not have functions like fgetc/fputc, fgets/fputs, fscanf/fprintf or fread/fwrite, which can deal with characters, lines and formatted data and structures, respectively; read and write understand a file as a sequence of bytes only.

All standard library functions normally call the system calls internally; fopen should internally call open, or fgetc call read, etc. You can use strace (which traces system calls) to validate this. Compile mycpy_lib.c and run with source and destination file arguments, under strace, as follows:

bash-3.00$ strace ./a.out file1 file2

open ("file2", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3

open ("file1", O_RDONLY) = 4

The numbers on the right are the return values (in this case, file descriptors) of the open function, which was called internally by fopen.

Now, what about end-of-file handling? When there is no more data to be read, the read function returns a value of 0; this is received by fgetc, which then returns EOF (typically -1, but we should not assume a value, for portability) to the caller. Thus, the system need not store any special character to mark the end-of-file—just the number of bytes in the file.

So it is now clear that a file pointer is a higher-level abstraction than the file descriptor, and the end-of-file is not a special character stored in a file.

So what are the advantages and disadvantages of using system calls rather than library functions? The latter are obviously more portable; fopen, fgetc, fputc, fclose, etc, are supposed to be available on a wide variety of platforms, but system calls like open, read, write and close are available for a particular OS, say Linux. However, using system calls can make the program run faster on a specific OS.

In this article, I have briefly covered the basic C language file-system interface in Linux. Please read the manual pages to learn more functions like link, symlink, unlink lseek, dup, access, stat, mkdir, rmdir. Do also try implementing your own ls or cat command; that will help enhance your programming skills too.

By: Swati Mukhopadhyay

The author is having more than 12 years of experience in academics and corporate training. Her interest areas are Digital logic, Computer architecture, Computer Networking, Data Structures, Linux and programming languages like C, C++. For any queries or feedback, she can be reached at [email protected] or http://swati mukhopadhyay.wordpress.com/.

[1] Bach, Maurice J: ‘The Design of the Unix Operating System’, PHI

[2] Stevens, W Richard: ‘Unix Network Programming: Interprocess Communication’, Vol-2, 2nd Edition, Pearson Education

[3] Stevens, W Richard and Rago, Stephen A: ‘Advanced Programming in the Unix Environment’, 2nd Edition, Pearson Education

[4] Linux Manual Pages[5] You can download the source code of this article from

http://www.linuxforu.com/article_source_code/july12/system_programming.zip

References

I would like to thank Tanmoy Bandyopadhyay and Vikas Nagpal for their help in reviewing this article.

Acknowledgement

80 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Developers Overview

WorldMags.netWorldMags.net

Page 83: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 84: Linux for You 2012-07

Selector syntaxIn plain English, jQuery is all about ‘select something, do something’. In pseudo-code, that can be written as:

$(select_something).doSomething();

jQuery gives much flexibility in the selection of elements through traditional tree traversals, direct access to DOM elements, and also selecting a set of objects. jQuery’s power comes from extensive operations that can be performed to manipulate the content and appearance of the elements in the HTML page. This is what makes jQuery useful in most cases—routine actions that take hundreds of lines of code are made into a ready-to-use library. � select_something can be an HTML tag, a class or an id.

Some examples are given below:

$(‘p’) selecting paragraph elements

$(‘.myclass’) selecting all elements with class=”myclass”

$(‘#myid’) selecting all elements with id=”myid”

� Next, doSomething() can be an operation like hide() or attr(a, v). For an extensive list of operations, visit the jQuery home page (see References).

Setting up jQueryYou can start using the jQuery library in three ways: � Copy to local server or machine (use as <script

src=“jquery.js”></script>) � Refer to jquery.js from jquery.com (<script src=“http://

code.jquery.com/jquery-latest.js”></script>) � Refer to jquery.js from a CDN hosted by Google (or

Microsoft): (<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>)

An exampleNow let us dive into an example that demonstrates the benefits of jQuery over basic JavaScript. This program will insert Figure number and caption below each picture on the Web page. The author of a web page only needs to insert images and add appropriate text in 'alt' attribute of <img> HTML tag.

Steps in the program:1. Identify the figure number.2. Extract the string from the image ‘alt’ tag, which will be

the figure caption.3. Place the figure caption below every image.

This program can also be extended to generate a ‘Table of Contents’ for a document, which can be inserted at the beginning of the page. Figure 1 contains a heading and two sections. Each section has a paragraph, picture and an empty place-holder for inserting the figure caption. On clicking the button ‘Generate figure caption’, you can see (Figure 2) the captions inserted after each image.

1 <!doctype html>

2 <html>

3 <head>

4 <style type="text/css">

5 div.caption

6 {

7 border: 2px solid;

8 border-radius: 25px;

9 }

10 </style>

11 <script src='include/jquery.js'></script>

12 <script type="text/javascript">

13 $(document).ready(function() {

Figure 1: Adding a figure caption

Figure 2: Generate a figure caption

jQuery Example: Adding figure caption

This example is to generate caption automatically using jQuery.

This example is to generate caption automatically using jQuery.

This is second picture that we will add cation

82 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Developers Let 's Try

WorldMags.netWorldMags.net

Page 85: Linux for You 2012-07

By: Janardan Revuru

The author has been working on Web technologies for the last 16 years, developing management software for routers and servers used by enterprise customers. He has worked in the telecom, datacom and high availability domains. He is currently working as a project manager at HP in Whitefield, Bengaluru. He can be reached at [email protected].

[1] jQuery Home: http://jquery.com/[2] jQuery Tutorial: http://www.roseindia.net/ajax/jquery/

index.shtml

References

14 $('button').click(function () {

15 $('div').siblings('.section').each(function() {

16 $(this).children('.caption').append("Figure "+

$(this).

index()+ ": " +

$(this).

children('.pic').attr('alt'));

17 });

18 }); });

19 </script>

20 <body>

21

22 <h4>jQueryExample:Addingfigurecaption</h4>

23 <div class="section">

24 <p>This example is to generate caption automatically using

jQuery.</p>

25 <img class="pic" src="images/linux-tux.png" width="160"

height="180" alt="The

great linux tux">

26 <div class="caption"></div>

27 </div>

28 <div class="section">

29 <p>This is second picture that we will add caption</p>

30 <img class="pic" src="images/lfy-logo.jpg"

alt="The most popular Linux For

You magazine">

31 <div class="caption"></div>

32 </div>

33 <br>

34 <br>

35 <button>Generatefigurecaption</button>

36 </body>

37 </html>

Here, we have:● CSS: Lines 4-10, defining the style for the figure caption

in CSS.● HTML:DOM:

○ BODY ■ Heading3 ■ DIV (class=section) ● Paragraph1 ●Picture1 (class=pic) ● Figure caption (class=caption) ■ DIV (class=section) ●Paragraph2 ●Picture2 (class=pic) ●Figure caption (class=caption) ■ button -> to trigger generation of caption

○ Lines 25 and 30: Note that the ‘alt’ attribute of the images are descriptive, as the same text will be used as the figure caption.

● jQuery: � Line 11: Includes the locally available jquery.js library. � Line 13: Executes the code only after the whole document is

loaded and ready. This will ensure the DOM is complete. � Line 14: Captures the ‘click’ event of the button. � Line 15: The parent DIVs are of class ‘section’. The

siblings() function will select DIVs at the same level. � The each() function lets us perform certain operations on

each of these DIVs. � $(this) refers to the DIV (section), and its children are

paragraph, picture and caption. � To append the caption text, select the child with the class

caption. � $(this).index() will return the count of selected DIVs

(section). This is required to find which figure number we are referring to.

� $(this).children(‘.pic’) will select the IMG tag. We can extract the ‘alt’ attribute text using $(this).children(‘.pic).attr(‘alt’).The above example takes you through the key features of

jQuery. You can do many more appealing operations, getting to know the other functions provided by the library. For a complete reference, please visit jquery.com.

Extensions for jQueryThis article mainly focused on the jQuery Core library. Two other libraries worth exploring are the jQuery UI and jQuery Mobile. Both are equally popular and widely used. jQuery UI provides many user interface frameworks that have been adopted by websites since a very long time. These frameworks are easily customisable. jQuery Mobile is mainly for interfaces on small-screen devices. The library also takes care of different screen sizes and browsers on different platforms.

jQuery makes programming fun and efficient. Once you start using it, it is tough to go back to doing code from scratch.

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 83

DevelopersLet 's Try

WorldMags.netWorldMags.net

Page 86: Linux for You 2012-07

Most of the time, we hear that every thing in UNIX is a file, as in Linux. As per my knowledge, except for the network drivers, every thing is a file in

Linux. We store data, software settings, etc, in files, so for application programmers, the basics of file operations are important. Here, we're using C++ with Qt.

QFile—a robust file interfaceQt provides a robust interface to files; file operations are easy to perform. Look at our sample code, main.cpp:

#include <QtCore/QCoreApplication>

#include <QtCore>

int main(int argc, char *argv[]) {

QCoreApplication a(argc, argv);

QFile file;

// Set the file name

file.setFileName("./sample");

// Open the file

if(!file.open(QIODevice::WriteOnly | QIODevice::Text)) {

qDebug() << "File opening failed";

return -1;

}

qDebug() << "File opened";

// Write data to file

file.write("Welcome to Open World");

// Don't forget to close the file

file.close();

return a.exec();

}

The QFile class provides an interface for file read-write operations. QFile inherits from QIODevice, which provides the interface for I/O to and from devices. We won't go into the details now, but we will concentrate on QFile. We created a QFile object, and then specified the path and name of the file by calling the setFileName() member function. Next, we open the file, which can be done in one of three modes: read, write or read-write, which needs to be specified while opening the file. We used (QIODevice::WriteOnly | QIODevice::Text) (the enums of the QIODevice class) to specify the mode. If required, we can do a bitwise OR of the options, like above, where we opened the file with Text mode so that while reading and writing, line terminators are translated to local encoding.

Writing and reading is simple with the write() and read() member functions. Never forget to close the file when done—it tells the OS to flush the data from RAM to the hard disk.

Working with streamsA more convenient way of accessing text files is to use the QTextStream class for reading and writing text. The target can be a file, string or a byte array. Let's look at the sample code:

QFile file;

file.setFileName("./sample");

if(!file.open(QIODevice::ReadWrite | QIODevice::Text)) {

qDebug() << "File opening failed";

return -1;

}

QTextStream stream(&file);

stream << "Knowledge-gives-Happiness";

In this part of the series, we deal with file operations in Qt.

DevelopingApps on QT

Part—6

1, Vikas Permises, 11 Bank Street, Fort, Mumbai, India - 400 001. Mobile: 09326087210. [email protected], Vikas Permises, 11 Bank Street, Fort, Mumbai, India - 400 001. Mobile: 09326087210. [email protected]

84 | July 2012 | lINuX For you | www.linuxForu.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 87: Linux for You 2012-07

stream.seek(0);

QString out_data;

stream >> out_data;

qDebug() << out_data;

It's very easy to dissect this code. A file is opened in read-write mode, and its reference passed to the QTextStream constructor. The operator ‘>>’ is used to write to the file and ‘<<’ to read from it. A small experiment, if you want: try QTextStream for string and byte array data.

Working with QDataStream is similar, except that this class deals with raw binary data, not text.

Getting file informationWhat if we need to work on the file attributes (e.g., the owner, permissions, the path, etc)?

The code given below is self-explanatory:

QFileInfo info("./test.txt");

qDebug() << info.absoluteFilePath();

qDebug() << info.baseName();

qDebug() << info.owner();

if(info.permission(QFile::WriteUser)) {

qDebug() << "Write permission available";

}

BufferThe next important class is QBuffer, which provides a QIODevice

interface to a QByteArray. It is useful to emulate a hardware device like a serial port without using real hardware. Just like you get interrupts from the hardware when data is received, here you get a signal when the data arrives in the QBuffer.

/**************** dialog.h ********************/

private:

Ui::Dialog *ui;

QBuffer buf;

QByteArray ar;

/*************************************************/

/******************* dialog.cpp*********************/

Dialog::Dialog(QWidget *parent) :

QDialog(parent),

ui(new Ui::Dialog) {

Figure 1: The Qt File dialogue Figure 2: Adding a resource file

Figure 3: Adding files to prefix

1, Vikas Permises, 11 Bank Street, Fort, Mumbai, India - 400 001. Mobile: 09326087210. [email protected], Vikas Permises, 11 Bank Street, Fort, Mumbai, India - 400 001. Mobile: 09326087210. [email protected]

www.linuxForu.com | lINuX For you | July 2012 | 85

DevelopersLet ’s Try

WorldMags.netWorldMags.net

Page 88: Linux for You 2012-07

ui->setupUi(this);

buf.setData(ar);

buf.open(QBuffer::ReadWrite);

connect(&buf, SIGNAL(readyRead()), this, SLOT(readData()));

}

Dialog::~Dialog() {

delete ui;

}

void Dialog::on_pushButton_clicked() {

buf.seek(0);

buf.write(ui->lineEdit->text().toAscii().data());

}

void Dialog::readData() {

buf.seek(0);

ui->plainTextEdit->insertPlainText(buf.readAll());

}

In the above code, a QBuffer connected to a QByteArray has data from a LineEdit written to it when the pushbutton is clicked. In the constructor, the readyRead() signal is connected to the readData() slot, so when data is written to buf, the readData() slot will be called. The same thing happens in the hardware. So by doing a few tweaks in the code, you can emulate some hardware.

File dialogueNow we move to graphical classes related to file operations. One of the most common is the File Open dialogue, which we have all seen. In Qt, this is done with the QFileDialog class, as in the following sample code:

void Dialog::on_pushButton_clicked() {

QString str = QFileDialog::getOpenFileName(this, "Open File",

"./", "Text File (*.txt)");

if(!str.isEmpty()) {

ui->lineEdit->setText(str);

QFile file(str);

if(file.open(QIODevice::ReadOnly | QIODevice::Text)) {

ui->textEdit->clear();

QString line;

while(!file.atEnd()) {

line = file.readLine();

ui->textEdit->append(line);

}

}

}

}

We invoked the QFileDialog::getOpenFileName call, which requires the path and the type of file to open as arguments. We specified the path as the present directory, and the file type as *.txt. The resultant dialogue can be seen in Figure 1. When the user selects a file and clicks Open, the function returns the path

By: Manoj Kumar

The author is a freelance developer and trainer. He leads a team in Linux kernel programming, Linux administration, cluster computing, embedded systems and Qt/GTK programming on Linux. You can reach him at [email protected] and read his blog, www.open4india.blogspot.com, to share your Linux knowledge.

and filename, which can be collected in a QString. There are many operations we can perform on a file, such

as truncate, append, delete, rename, etc. There is also directory handling, mostly similar to files, since a directory is itself a file. Qt provides excellent documentation on this; I suggest you read it, since I can't cover all of this.

The Qt resource systemSo let's move on. Sometimes we may need to carry files along with the executable, such as icons. While it's easiest to copy the executable and other files in a single directory and ship it, Qt provides a better option. The Qt resource system provides a mechanism to store extra files within the executable itself. To use this:1. Create a project. In the project file tree, click the project >

Add New > Qt Resource File. A new file will be created in the Resources folder, with a ‘qrc’ extension.

2. Double-click the file to open it. You will find it empty. 3. Click Add > Add Prefix and name it in the Prefix field; for

example, ‘files’. You will find that in the resource file, a path ‘/files’ has been created.

4. Select the path and navigate to Add > Add Files and add some files to it. I added the main.cpp file, as seen in Figure 3. That's it, you're done.Accessing this file in your application is very easy:

#include <QtCore/QCoreApplication>

#include <QtCore>

int main(int argc, char *argv[]) {

QCoreApplication a(argc, argv);

QFile file;

file.setFileName(":/files/main.cpp");

if(!file.open(QIODevice::ReadOnly | QIODevice::Text)) {

qDebug() << "File not opened";

return -1;

}

qDebug() << file.readAll();

return a.exec();

}

Simply use the notation ‘:/prefix/filename’ to specify the resource file path that you want to open. The rest is easy to understand.

I hope this article helps you to work on files in your application.

86 | July 2012 | lINuX For you | www.linuxForu.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 89: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 90: Linux for You 2012-07

Part—20

The Semester Project

Till now, Shweta had implemented four basic functionalities of the simulated file system (Simula FS) browser—quit (browser), list (files), create (an empty

file), and remove (a file). Here, she adds three little advanced functionalities, to get the feel of a complete basic file system: � Changing the permissions of a file � Reading from a file � Writing into a file

Here’s a sneak peek into her thinking process as she came up with her implementation. For the various command implementations, two very common requirements keep occurring quite often: � Getting the index of the entry for a particular filename � Updating the entry for a given filename

Hence, these two requirements, captured by the functions sfs_lookup() and sfs_update():

int sfs_lookup(int sfs_handle, char *fn, sfs_file_entry_t *fe) {

int i;

lseek(sfs_handle, sb.entry_table_block_start * sb.block_size,

SEEK_SET);

for (i = 0; i < sb.entry_count; i++) {

read(sfs_handle, fe, sizeof(sfs_file_entry_t));

if (!fe->name[0]) continue;

if (strcmp(fe->name, fn) == 0) return i;

}

return -1;

}

void sfs_update(int sfs_handle, char *fn, int *size, int update_

This article, which is part of the series on Linux device drivers, completes the basic simulation of a file system in user space.

ts, int *perms) {

int i;

sfs_file_entry_t fe;

if ((i = sfs_lookup(sfs_handle, fn, &fe)) == -1) {

printf(“File %s doesn’t exist\n”, fn);

return;

}

if (size) fe.size = *size;

if (update_ts) fe.timestamp = time(NULL);

if (perms && (*perms <= 07)) fe.perms = *perms;

lseek(sfs_handle, sb.entry_table_block_start * sb.block_size

+ i * sb.entry_size, SEEK_SET);

write(sfs_handle, &fe, sizeof(sfs_file_entry_t));

}

The sfs_lookup() function traverses through all the entries (skipping the invalid, i.e., empty filename entries), till it finds the matching filename, and then returns the index and the entry of the matched entry in the function’s third parameter. It returns -1 in case no match is found.

Now, sfs_update() uses sfs_lookup() to get the entry and its index for the given filename. Then, it updates it back into the filesystem with: 1. size, if passed (i.e., non-NULL); 2. current timestamp if update_ts is set; and 3. permissions, if passed (i.e., non-NULL).

Changing file permissionsIn the Simula FS, file permissions are basically a combination of ‘rwx’, for the user only, stored as an integer, with Linux-like notation of 4 for ‘r’, 2 for ‘w’, and 1 for ‘x’. To change

The Semester ProjectFile Systems-III

88 | july 2012 | lINuX For you | www.linuxForu.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 91: Linux for You 2012-07

the permissions of a given filename, sfs_update() can be used, by passing a NULL pointer for size, zero for update_ts, and the pointer to the new permissions as perms. Thus, sfs_chperm() would be as follows:

void sfs_chperm(int sfs_handle, char *fn, int perm) {

sfs_update(sfs_handle, fn, NULL, 0, &perm);

}

Reading a fileReading a file is basically getting the position of the data blocks from the blocks array of the file’s entry, then sequentially reading the contents of the blocks, and displaying that on the stdout file descriptor, 1. A couple of things to be taken care of include the following: � The file is assumed to be without holes, i.e., a block

position of 0 in the blocks array indicates no more data blocks for the file.

� Reading should not go beyond the file size. Special care is to be taken while reading the last block with data, as it may be partially valid.Here’s the complete read function, keeping track of valid

data using the bytes left to read:

uint1_t block[SIMULA_FS_BLOCK_SIZE]; // Shared as global with

sfs_write

void sfs_read(int sfs_handle, char *fn) {

int i, block_i, already_read, rem_to_read, to_read;

sfs_file_entry_t fe;

if ((i = sfs_lookup(sfs_handle, fn, &fe)) == -1) {

printf(“File %s doesn’t exist\n”, fn);

return;

}

already_read = 0;

rem_to_read = fe.size;

for (block_i = 0; block_i < SIMULA_FS_DATA_BLOCK_CNT; block_

i++) {

if (!fe.blocks[block_i]) break;

to_read = (rem_to_read >= sb.block_size) ? sb.block_size

: rem_to_read;

lseek(sfs_handle, fe.blocks[block_i] * sb.block_size,

SEEK_SET);

read(sfs_handle, block, to_read);

write(1, block, to_read);

already_read += to_read;

rem_to_read -= to_read;

if (!rem_to_read) break;

}

}

Writing a fileInterestingly, writing is not a trivial function. Getting data

from the user through the browser is fine. But based on that, free available blocks have to be obtained and filled, and then their position noted sequentially in the blocks array of the file’s entry. Typically, you do this whenever you have received a block full of data, except the last block. Now, that is tricky—how does one know the last block? Read till the end of the input (marked by Ctrl-D on its own line)—and that is indicated by a return of 0 from read. In that case, check if any non-full block of data is left to be written, and if so, follow the same procedure of obtaining a free available block, filling it up (with the partial data) and updating its position in the blocks array.

After all this, you have finally written the file data, and its data block positions in the blocks array of the file’s entry. Now, it’s time to update the file’s entry with the total size of data written, as well as change the timestamp to the current time. Once done, this entry has to be updated back into the entry table, which is the last step. And in this flow, the following aspects shouldn’t be missed out while getting and filling up free blocks: � Check for no more block positions available in the blocks

array of the file’s entry. � Check for no more free blocks available in the FS.

In either of these two cases, the intention is to do a graceful stop, with data being written up to the maximum possible, and the rest being discarded. Once again, all of this is put together in the function below:

uint1_t block[SIMULA_FS_BLOCK_SIZE]; // Shared as global with

sfs_read

void sfs_write(int sfs_handle, char *fn) {

int i, cur_read_i, to_read, cur_read, total_size, block_i,

free_i;

Figure 1: Demo of Simula FS browser's new features

www.linuxForu.com | lINuX For you | july 2012 | 89

DevelopersLet ’s Try

WorldMags.netWorldMags.net

Page 92: Linux for You 2012-07

sfs_file_entry_t fe;

if ((i = sfs_lookup(sfs_handle, fn, &fe)) == -1) {

printf(“File %s doesn’t exist\n”, fn);

return;

}

cur_read_i = 0;

to_read = sb.block_size;

total_size = 0;

block_i = 0;

while ((cur_read = read(0, block + cur_read_i, to_read)) >

0) {

if (cur_read == to_read) {

/* Write this block */

if (block_i == SIMULA_FS_DATA_BLOCK_CNT)

break; /* File size limit */

if ((free_i = get_data_block(sfs_handle)) == -1)

break; /* FS full */

lseek(sfs_handle, free_i * sb.block_size, SEEK_SET);

write(sfs_handle, block, sb.block_size);

fe.blocks[block_i] = free_i;

block_i++;

total_size += sb.block_size;

/* Reset various variables */

cur_read_i = 0;

to_read = sb.block_size;

}

else {

cur_read_i += cur_read;

to_read -= cur_read;

}

}

if ((cur_read <= 0) && (cur_read_i)) {

/* Write this partial block */

if ((block_i != SIMULA_FS_DATA_BLOCK_CNT) &&

((fe.blocks[block_i] = get_data_block(sfs_handle))

!= -1)) {

lseek(sfs_handle, fe.blocks[block_i] * sb.block_size,

SEEK_SET);

write(sfs_handle, block, cur_read_i);

total_size += cur_read_i;

}

}

fe.size = total_size;

fe.timestamp = time(NULL);

lseek(sfs_handle, sb.entry_table_block_start * sb.block_size

+ i * sb.entry_size, SEEK_SET);

write(sfs_handle, &fe, sizeof(sfs_file_entry_t));

}

The last strideWith the above three Simula FS command functions, the final change to the browse_sfs() function in browse_

By: Anil Kumar Pugalia

The author is a freelance trainer in Linux internals, Linux device drivers, embedded Linux and related topics. Prior to this, he was at Intel and Nvidia. He has been working with Linux since 1994. A gold medallist from the Indian Institute of Science, Linux and knowledge-sharing are two of his many passions. Creating and playing with open source hardware is one of his hobbies. Learn more about him at http://profession.sarika-pugs.com/, including information about his open source hardware freak-outs, and his various Linux related training sessions and workshops. He can be reached at [email protected].

sfs.c (refer to the previous article) would be to add the cases for handling these three new commands: chperm, write, and read.

One of the daunting questions is how do you find free, available blocks? Notice that in sfs_write(), you just called a function get_data_block(), and everything went smoothly. But think through how that would be implemented. Do you need to traverse all the file entries every time to figure out which has been used, and determine that the remaining are free? That would be killing. Instead, an easier technique would be to get the used ones by parsing all the file entries, only initially once, and then keep track of whenever more entries are used or freed up. But for that, a complete framework needs to be put in place, which includes the following: � uint1_t typedef (in sfs_ds.h) � used_blocks dynamic array to keep track of used

blocks (in browse_sfs.c) � Function init_browsing() to initialise the dynamic

array used_blocks, i.e., allocate and mark the initial used blocks (in browse_sfs.c)

� Correspondingly, the inverse function shut_browsing() to clean up the same (in browse_sfs.c)

� And, definitely, the functions get_data_block() and put_data_block() to get and put back, respectively, the free data blocks based on the dynamic array used_blocks (in browse_sfs.c)All these thoughts, incorporated with the earlier

sfs_ds.h and browse_sfs.c files, are available from http://linuxforu.com/article_source_code/july12/sfs_code.tar.bz2. Once compiled and executed as ./sfs_browse, it shows up as something like what is in Figure 1.

As Shweta showed her working demo to her project mate, he observed some issues that she had missed out, and challenged her to find them out on her own. He hinted that they were related to the newly added functionality and ‘getting a free block’ framework. He added that some were even visible from the demo, i.e., Figure 1. Can you help Shweta find them out? If yes, send your answers to [email protected].

90 | july 2012 | lINuX For you | www.linuxForu.com

Developers Let ’s Try

WorldMags.netWorldMags.net

Page 93: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 94: Linux for You 2012-07

unit depends on, other conditions and dependencies, and gives a good description of the unit. That’s it. It’s about as complicated as a .desktop file.

Now think about it. These units describe dependencies. This means, units can be started in arbitrary order, as long as the dependencies are started before the unit in question. Also, two units are independent; they can be started in parallel. In fact, on my newly Systemd-fied system, as many as eight services start in parallel, near the middle of the process. No wonder 10 seconds have been shaved off, just like that!

Systemd does much more than just parallelise service start-up, though. It can even hold off from starting services until they’re actually needed. Like Xinetd, units can be started on demand. Units can be mapped to UNIX file sockets as well as TCP sockets, and the first time the socket is accessed, the unit starts up. It’s all about laziness—you hold up starting non-essential services for as long as possible.

Systemd also completely dispenses with the idea of runlevels; it implements targets, which are named, rather than numbered—and they, too, have dependencies. The graphical target depends on the multi-user target, which in turn depends on the network target, and so on. Bluetooth is a separate target. Basically, the idea is to have a specific capability (such as Bluetooth, networking, or X11) as a target, so you can switch targets on and off.

There’s more. Systemd is highly integrated with both Udev and D-Bus. As a result, it brings back a lot of functionality that used to be the expertise of the deprecated HAL. Systemd handles filesystem mounts, and has a built-in auto-mounter. It handles the fstab file itself, without depending on mount. Systemd also takes over the work of ConsoleKit, so GNOME 3.4 (which can work with this functionality now) doesn’t need ConsoleKit to handle logins and seats. In fact, ConsoleKit isn’t even actively maintained any more.

And now, let’s look at the final trick that Systemd has up its sleeve. A lot of services use double-forking to daemonise themselves. It’s very hard to kill these services when they misbehave, for the simple reason that after a double-fork, these processes kind of break out of the process hierarchy, and the init system doesn’t know where the process is. Systemd solves this problem by using CGroups and letting the kernel keep track of the processes. Now this might alarm users of BFS, which is famous for ‘not implementing CGroups’ (I use BFS too), but BFS does implement CGroups—it just doesn’t implement fancy scheduling based on CGroups.

Getting SystemdIf you’re using Fedora, you already have Systemd, in which case you can head on to the next section. If you’re using any of the other major distros, you’re out of luck—you can’t currently use Systemd, except if you’re using OpenSuSE, in which case the next version of OpenSuSE will use Systemd, so you could upgrade to Factory.

Of course, using Arch Linux has its advantages. I’m free

to choose every single component of my system... including my init system. I had the death wish to completely replace SysV-init with Systemd—and I almost came to regret it. But the end result was entirely worth it.

Now, you’ve got to realise that Systemd doesn’t use any of the old SysV-init files. It doesn’t use inittab, it doesn’t use rc.conf, and it doesn’t use rc.local. You’ve got to offload rc.conf and rc.local into other files before you can start using Systemd. In short, before you can actually install Systemd, you have to prepare the system. Start by creating /etc/vconsole.conf:

KEYMAP=us

FONT=lat9w-16

FONT_MAP=8859-1_to_uni

Once that’s done, set a hostname in /etc/hostname:

my-awesome-archbox

Now, set up locale settings in /etc/locale.conf:

LANG=en_IN.utf8

LC_CTYPE="en_IN.utf8"

LC_NUMERIC="en_IN.utf8"

LC_TIME="en_IN.utf8"

LC_COLLATE="C"

LC_MONETARY="en_IN.utf8"

LC_MESSAGES="en_IN.utf8"

LC_PAPER="en_IN.utf8"

LC_NAME="en_IN.utf8"

LC_ADDRESS="en_IN.utf8"

LC_TELEPHONE="en_IN.utf8"

LC_MEASUREMENT="en_IN.utf8"

LC_IDENTIFICATION="en_IN.utf8"

LC_ALL=

And add this line to the top of /etc/environment:

LANG=en_IN.utf8

Though en_IN may not be available by default, you can enable it by uncommenting the relevant lines in /etc/locale.gen and running sudo locale-gen. The locale.gen file is self-explanatory.

Systemd uses files in the /etc/modules-load.d/ directory to load up extra kernel modules. I use FUSE, which isn’t loaded by default, so I have a file at /etc/modules-load.d/fuse.conf, with the following line:

fuse

We’ll need to integrate the Systemd journal into Syslog-NG, so open up /etc/syslog-ng/syslog-ng.conf, find the src section, and replace it all with:

92 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Admin Let ’s Try

WorldMags.netWorldMags.net

Page 95: Linux for You 2012-07

source src {

unix-dgram("/run/systemd/journal/syslog");

internal();

file("/proc/kmsg");

};

Now, before you can do anything, you need to actually install Systemd. Run the following:

$:sudopacman-Sysystemd

$:sudopacman-Rsusysvinitinitscripts

$:sudopacman-Ssystemd-sysvcompatsystemd-arch-units

$: yaourt -Sb systemd-ui-git

You’ll now have to edit one last file, /etc/systemd/systemd-journald.conf, and add the line below:

ImportKernel=no

This will disable systemd-journald from reading /proc/kmsg, because syslog is already doing it. In fact, in the future, you won’t even need syslog, because systemd-journald will do everything the former does, and more.

Now cross your fingers and reboot. You might need to force the computer off manually, because we’ve removed init, and the program needed to halt the computer is gone. When you start it up again, if all goes well, you’ll be back in a text terminal in no time. If not—and in my case, it was not—you might have to wait for up to five minutes. But eventually, it will come up—so if there’s no hard disk activity for more than a few minutes, don’t worry.

Once you’re at the TTY, log in and run the following:

$:sudosystemctlenableNetworkManager.service

$:sudosystemctlenablegdm.service#orkdm/slim/xdm/lxdm

$:sudosystemctlenablesyslog-ng.service

Then reboot. You’ll be greeted by your graphical login manager now. Log in, and you’re set!

Troubleshooting and optimising SystemdOn my first try, Systemd took 109 seconds to boot, up from 30 seconds with SysV-init. Wait a minute… what was that, again? I thought this thing was supposed to make it all faster. Well, off to troubleshooting central for me. The first line of information about Systemd is systemd-analyze. Run it without any arguments, and you’ll get the start-up time for the current boot:

$: systemd-analyze

Startupfinishedin6016ms(kernel)+12945ms(userspace)=

18962ms

This gives the amount of time taken to boot up the

system, but not much else. To get a more detailed output, run systemd-analyze blame, as shown below:

$: systemd-analyze blame

4040msmedia.mount

3616mssys-kernel-debug.mount

3550msudev.service

3518mssystemd-remount-api-vfs.service

3515msdev-hugepages.mount

3499msdev-mqueue.mount

9msaccounts-daemon.service

8msproc-sys-fs-binfmt_misc.mount

5mssyslog-ng.service

5msupower.service

3msrtkit-daemon.service

1mstmp.mount

Frankly speaking, I have no idea how to read this. It’s supposed to give me the amount of time taken by each unit to start up. But remember, since units are started in parallel, the sum of the time taken by two units to start up may be more than the time taken to actually start them up. It’s also plain wrong—on my system, the systemd-tmpfiles-setup.service unit was taking 200ms to start up (as per blame), but in reality, it was holding up the boot process for a full 1.5 minutes. And how does one find that out? You can generate a boot chart using systemd-analyze. Do:

$:systemd-analyzeplot>/tmp/bootchart.svg

$:firefox/tmp/bootchart.svg

Now, isn’t that pretty? It shows you the service start-up and parallelism in great detail. What you’re looking for is huge differences in time between the start-up of two units. For example, in my case, systemd-tmpfiles-setup.service started up at the 9s mark, but the next unit started up at the 99s mark. Now that you’ve identified the problem, Google around and you’ll find the fix. In my case, the problem was that I had an invalid fstab entry for the swap partition, which was causing a time-out after 90 seconds. I just fixed that, and the boot time went from 109s to 18.9s.

Using SystemdThis article is already pretty long, so I’ll end this quickly. The systemctl tool is your friend here. Basically, here’s what you do. To see a list of running units, use the following command:

$: systemctl list-units

To see a list of all available units, use:

#:systemctllist-units-a

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 93

AdminLet ’s Try

WorldMags.netWorldMags.net

Page 96: Linux for You 2012-07

Note the # prompt—you have to do that as the root user, or with sudo. To control services, you can use the following command:

#:systemctlenableunit.name#Toenableaunit

#:systemctldisableunit.name#Todisableaunit

#:systemctlmaskunit.name#I’llexplainthis

#:systemctlunmaskunit.name#Undoamasking

#:systemctlstartunit.name#Tostartaunit

#:systemctlstopunit.name#Tostopaunit

#:systemctlrestartunit.name#Torestartaunit

#:systemctlreloadunit.name#Toreloadtheconfigforaunit

The mask option is pretty clever. Systemd also uses symlinks, in a way. If you’ve disabled a unit, but another unit wants your disabled unit as a dependency, the disabled unit will still start up. What mask does is make the symlink for the disabled unit point to /dev/null. An ingenious solution, and works like a charm. And even you can’t accidentally start it, unless you unmask it.

Now, there are a few commands you’ll use to query and control Systemd and its units. They are:

#:systemctlis-enabledunit.name#Checkifunitisenabled

#:systemctlstatusunit.name#Querythestatusofaunit

Even though the old commands are still available (they’re just symlinks), you can use the following now, and they work cleanly:

#:systemctlreboot#Rebootthecomputer

#:systemctlkexec#Rebootwithoutpoweringoff,viakexec

#:systemctlpoweroff#Haltandpowerdownthesystem

#:systemctlhalt#Haltthesystem

#:systemctlemergency#Droptoanemergencyshell

#:systemctlrescue#Droptorescuemode,equaltoinitS

Targets—or the replacement to runlevelsAll right, this is the last section of the article before I refer you to other online resources.

Systemd uses targets to define feature points and the states of the system. A target requires a set of units, and other targets. For example, the graphical target requires the multi-user target and networking target, plus gdm.service and NetworkManager.service. Targets are also created like units, so they’re simple INI files. To switch between targets, use systemctl (again), as shown below:

#:systemctlisolatetarget.name

The well-defined targets available are: poweroff.target, rescue.target, multi-user.target, graphical.target, reboot.target, and emergency.target. These are available on every Systemd machine. In addition, your distribution

may have additional targets.It’s very simple to create new targets for when your laptop

is connected to a dock, and when it’s not. And if you’re feeling adventurous, you can hook up a few dbus and udev hooks, so that the targets are fired automatically as your laptop docks. What I’ve done is create a developer target that starts up PostgreSQL and Nginx, and everything that’s in graphical mode.

In any case, you can set the default target by using the following command:

#:systemctlenabletarget.name

It's just like with enabling a unit. If you want to boot into a different target for one time, you can append a kernel parameter. For example, to boot into rescue mode, you’d append this to your kernel command line, as follows:

systemd.unit=rescue.target

Optimisations, and moreThat’s it, then. And here’s a note about optimisation. Systemd has a built-in read-ahead module, so to use it, you can just issue the following commands:

#:systemctlenablesystemd-readahead-collect.service

#:systemctlenablesystemd-readahead-replay.service

Reboot a couple of times to profile the boot process, and your boots will get even faster.

The endYou should probably read the Arch Linux wiki article for Systemd. It has a ton of information, and it applies to all distros using Systemd, not just Arch. Among other things, it shows you how to create new units and targets. Find it at: https://wiki.archlinux.org/index.php/Systemd.

There’s a nice GUI tool to administer Systemd—run systemadm.

And finally, you should read a couple of posts at Lennart Poettering’s blog, for a background on the purpose of Systemd:

• http://0pointer.de/blog/projects/systemd.html

• http://0pointer.de/blog/projects/systemd-update.html

• http://0pointer.de/blog/projects/systemd-update-2.html

That’s it from me.

By: Boudhayan Gupta

The author likes to describe himself as a complete 'retard by choice'. He believes madness is the cure for everything that is wrong or right with society. He's also a social media enthusiast, and can be reached at @BaloneyGeek over at Twitter.

94 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Admin Let ’s Try

WorldMags.netWorldMags.net

Page 97: Linux for You 2012-07

WorldMags.netWorldMags.net

Page 98: Linux for You 2012-07

authenticates other software systems. As shown in Figure 1, there are multiple protocols available for authentication, operating at different OSI layers, and each for a different purpose, in terms of strengthening security. Authentication can happen from Layer 3 to Layer 7. Given below are a few widely used high-level authentication types: � Log-on authentication: This consists of a rudimentary

combination of a user ID and password, as well as newer methods such as using Captcha images, biometrics, smart cards, PINs, etc.

� Network authentication: This operates at multiple OSI layers, and verifies the user’s identity for network resources being accessed. Usually, the OS does this with the network driver and protocol stack. For example, once users authenticate and connect to a share, they are not asked for credentials again for that session.

� IP authentication: This operates at lower network layers and is primarily used to validate source and destination IP datagrams, by using IPSec or Kerberos security modules at its core, or in some cases, public key cryptography.

� Remote authentication: This is used for authentication between remote computer systems communicating for data transfers, typically virtual private networks (VPNs), which may use PAP or CHAP protocols.On the Internet or the WWW, where HTTP is the main

communication protocol, application and session layer security is paramount. Note that Web portals use a variety of authentication mechanisms. Some standard types that are widely in use are: � Basic authentication: It uses Base64-encoded clear-text

passwords; this is usually the default method for most Web servers.

� Digest: This is similar to the basic method, but passwords are encrypted using scrambling methods.

� Form-based: In this method, the HTTP protocol’s POST command is used to submit data of an HTML form to the server; this can happen on a plain HTTP channel or a protected SSL channel.

� NTLM: This is a Microsoft proprietary protocol

operating at transport and session layers. It may be used by HTTP as a vehicle to perform authentication for Web portals. Its primary use is for authentication among Windows or non-Windows clients.

� Client certificates: While SSL is used to endorse the identity of a website-hosting server, the client certificate does the same for the user accessing that website. Typically, a client certificate is used as an economical means to replace expensive smart cards or SecureID tokens. Client certificates are implemented over the SSL or TLS protocols, and need browser support to participate in the challenge or response process.

Securing authenticationAuthentication being crucial for securing software applications or systems, it has now become even more important to secure the authentication process itself. The repercussions of the successful penetration of an authentication system can be seriously harmful; attackers can gain access to sensitive information, and can delete, alter or corrupt valuable data. Further, the attacker can assume someone’s identity, resulting in identity or monetary theft. If the compromised identity is of a network or server administrator, the damages are infinitely worse.

The authentication process we have discussed has three critical points at which the process is potentially vulnerable. When the user is typing the credentials, these could be stolen by a man-in-browser script or attack. When the credentials are being transmitted over the wire, they could be intercepted by an MITM attack. Third, when credentials are being compared with database entries, they could be altered to achieve a successful penetration. This shows that packet interception and crafting can be used to collect and manipulate information to make the authentication mechanism vulnerable. Let’s discuss a few authentication attack types: � Bypass attacks: An attacker’s first wish is to bypass

security; authentication is no exception. Usually, the root cause of an authentication bypass is either the software system’s failure to impose access policies, or a weakly designed authentication system. For example, code that performs authentication using user credentials may enforce strict password policies, but might simply fail to disallow a blank password—creating a serious loophole. As another example, developers often mistakenly put protected and unprotected files in the same folder, making site code visible and vulnerable. Bypass attacks are usually tried against customised authentication systems, rather than robust industry-standard ones.

� Brute force attacks: Passwords are a single point of security failure even today. Besides mere guessing, attackers use scripts and customised software programs fed with all possible combinations against the authentication system. The combinations tried could include: all English words (a ‘dictionary’ attack); very

3

Figure 1: Authentication protocols

Authentication process

Auth Database

Auth Verifier ServerAuthenticatedClient

12

96 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Admin Overview

WorldMags.netWorldMags.net

Page 99: Linux for You 2012-07

commonly used user IDs and passwords, with numeric values and special characters; and finally, large databases of credentials already used by various people. While trying every possible combination until one is accepted is exhaustive work, with improved computing power and network bandwidths, this has become easier to do. Currently, attackers also use credential hashes, called ‘rainbow tables’, to further reduce break-in time.

� Session eavesdropping: Since authentication involves a challenge or response between two systems, credentials pass over the wire. Attackers can use packet-capturing tools while authentication is in progress, to intercept sessions and decipher credential information. For example, websites that use simple HTML forms of authentication without SSL may have clear-text passwords that are simple to capture. In a more advanced form of the same intrusion, attackers can use a session-takeover attack, where the valid token received after authentication is captured and used to impersonate the victim.

� Replay attack: A bit different from a session takeover; here the attacker simply records the data of a successful authentication, and initiates new requests to the server or verifier, replaying the recorded information for authentication and to impersonate the victim.

� Cookie intercept: Web portals often rely on client-side (browser) cookies. While these should only have harmless information, such as Web browsing history, screen theme colours, etc, often the user’s authentication token (issued after log-in) is stored in cookies too. Since cookies are presented by browsers to the Web server in each Web request, they can be intercepted on the wire, or using a Trojan on the browser side. Once the token is captured, the attacker can use it to impersonate the victim.

� Verifier impersonation: We know that MITM attacks are stealthy and very difficult to detect. Advanced

NetworkAuthentication

WebAuthentication

● NTLM

● Negotiate

● Kerberos

● CHAP

● Basic

● Digest

● Form Based

● Client Certs

Figure 2: The various types of authentications

T H E C O M P L E T E M A G A Z I N E O N O P E N S O U R C E

SE

PT

EM

BE

R 2

011

LIN

UX

FO

R Y

OU

` 100ISSN 0974-1054

The Magical Art Of

Compositing In Blender

Baskar Selvaraj Powers Up

170 College Labs In TN With FOSS!

FREE DVD

Volume: 09 Issue: 07 Pages: 108 Edition# 103 SEPTEMBER 2011

VIRTUALISATIONPICK THE RIGHT

SOLUTION

CHOICES. COMPARISONS. BEST PRACTICES.

www.LinuxForU.com | LINUX For YoU | jULY 2012 | 97

AdminOverview

WorldMags.netWorldMags.net

Page 100: Linux for You 2012-07

attackers, like disgruntled employees, for instance, can set up their own MITM authentication system on the network, and divert traffic using IP spoofing and other techniques that we learnt about earlier. Victims who try to authenticate, reveal their credentials to the attacker.

� Reflection attacks: This is a very advanced type of attack, not necessarily limited to Web technology. It tries to exploit vulnerabilities in a customised challenge-response authentication system. The attacker first initiates a connection with the victim, which challenges the attacker for authentication, as usual. The attacker opens a fresh connection with the victim and sends its own challenge. Again, as usual, the target responds with a valid response. The attacker captures that response and sends it on the first initiated connection. Since both challenge and response fall in the victim’s list of valid authentication parameters, it falls prey to this attack. This attack is rarely used in real life, but is common for weak public key encryption ciphers. Even simple SQL-based authentication systems that are not properly designed and lack intelligent error handling can be vulnerable to this form of attack.

� Keylogger attacks: In this well-known type of attack, a Trojan is sent to the user’s machines, which quietly in the background, records all keystrokes and then emails a report of website URLs and credentials typed in to the attacker. Many modern spyware contain keyloggers, which could be stealing passwords.

� Server-side authentication attacks: So far, we have covered client-side and over-the-wire attacks. There can also be security challenges while a Web server or LDAP server is performing authentication. Usually, attackers would try to steal the administrator’s password, to log in to the main authentication server—which would further reveal the entire credentials database. MITM attacks are often used to decipher information and gain access to the root system. Server-side attacks typically start with a script or a Trojan being installed on the server, which opens up stealth ports. The attacker then uses those ports to run commands on the server to fetch the required information. Even today, modern websites use SQL-based authentication or LDAP authentication that internally uses an SQL back-end for validation. Malformed Web requests, or running malicious scripts by exploiting an un-patched Web server, can let attackers steal SQL data, as we have learnt over this series of articles. Compromising these crucial servers can result in mass information and data theft.

Protecting FOSS systemsWhile authentication attacks are difficult to detect and tackle, there are a few preventive mechanisms that all

By: Prashant Phatak

The author has over 20 years of experience in the field of IT hardware, networking, Web technologies and IT security. Prashant is MCSE and MCDBA certified and is also an F5 load balancer expert. In the IT security world, he is an ethical hacker and Net-forensic specialist. Prashant runs his own firm called Valency Networks in India (www.valencynetworks.com), providing consultancy in IT security design, security audits, infrastructure technology and business process management. He can be reached at [email protected].

network administrators should adopt in their infrastructure. From the management’s perspective, it is better to have a single corporate authentication system than multiple ones, because this means fewer attack points. The table shows multi-factor authentication technologies that can be used:

Authentica-tion factor

Purpose Example

First factorWhat the user knows

Passwords, secu-rity questions

Second factor What the user hasSecureID token, smart card

Third factorWhat the user really is

Biometrics, retina scanner

Fourth factor Where user is GPS token

Using a strict and complex password scheme is usually the first line of defence. Password expiration policies and account lock policies are very important too. Encryption of passwords being stored on the centralised system is a must. All these help protect against manual or programmatic brute-force password attacks. Since authentication can be attacked from multiple sides, the authentication system needs to be properly designed and controlled, which will protect the systems from authentication bypass attack. Using IPSec and Kerberos can help prevent session stealing and hijacking. Tricks such as using session tokens, or time-stamping requests and performing error-handling based on time stamps, can help mitigate risk against authentication replay attacks. As for cookie interception attacks, using SSL or some sort of client- and server-side cookie encryption technique is recommended.

At the network layer, Linux FOSS systems come with a built-in feature called source address verification—a kernel feature that, when turned on, starts dropping packets that appear to be arriving from the internal network, but in reality, are not. Most recent kernels and distros like Ubuntu, CentOS, etc, do support it. If yours doesn’t, it’s time to upgrade! This usually helps reduce the chances of packet spoofing. Modifying hosts.conf to add “nospoof on” is another level of defence to try out. Needless to say, having a robust and automatic open source security patching system and anti-virus deployment is essential.

98 | jULY 2012 | LINUX For YoU | www.LinuxForU.com

Admin Overview

WorldMags.netWorldMags.net

Page 101: Linux for You 2012-07

ASIA’S LEADING OPEN SOURCE CONVENTION

EFY Enterprises Pvt Ltd, D-87/1, Okhla Industrial Area, Phase 1, New Delhi 110020; Phone: 91-11-26810601 (02/03)

Oct

12FREEZE Your

Calendar NOW!

500 Silver Passes Free! Register Now!

http://www.osidays.com/blog/osi-days-2012-registration-open

12 - 14

October

2012

BENGALURU

SOURCE INDIA

NIMHANS Convention Center

9th Edition

Connect with

India’sLeading ITProfessionals

Media PartnersOrganisers

www.osidays.com

ASIA’S LEADING OPEN SOURCE CONVENTION

EFY Enterprises Pvt Ltd, D-87/1, Okhla Industrial Area, Phase 1, New Delhi 110020; Phone: 91-11-26810601 (02/03)

Oct

12FREEZE Your

Calendar NOW!

500 Silver Passes Free! Register Now!

http://www.osidays.com/blog/osi-days-2012-registration-open

12 - 14

October

2012

BENGALURU

SOURCE INDIA

NIMHANS Convention Center

9th Edition

Connect with

India’sLeading ITProfessionals

Media PartnersOrganisers

www.osidays.com

WorldMags.netWorldMags.net

Page 102: Linux for You 2012-07

PaaS is application middleware (Web servers, application servers and databases) offered as a service—which would otherwise have to be added to

the basic infrastructure in a virtual machine on the cloud. Thus, PaaS provides a platform for the quick and flexible deployment and management of business applications, with standardised middleware services. This is done by leveraging standard, pre-built technology stacks. Leading organisations are already using cloud PaaS services.

The PaaS market is growing fast. In 2011, Gartner’s special report: ‘PaaS Road Map: A Continent Emerging’ included the following prediction, “All major software vendors—including IBM, Oracle, Microsoft, SAP, Red Hat, salesforce.com, Google and VMware—will deliver new and notable technology in this market, making 2011 the ‘Year of PaaS’. However, most offerings will require additional investment to reach maturity.” At the start of 2011, most vendors active in the cloud application platform as a service (aPaaS) market were cloud specialists (e.g., salesforce.com and Google). By the end of 2011, the market had changed dramatically—IBM, Oracle, Red Hat, SAP and VMware announced plans for aPaaS offerings.

Java PaaS offeringsJava PaaS has matured in the past few months with product offerings evolving rapidly. Google App Engine was a solitary Java PaaS provider. Most PaaS offerings were for platforms like Ruby and Python, but fortunately, that has started to change. In the past year or so, quite a few commercial providers have entered the Java PaaS space—CloudSwing, CloudBees, Amazon Elastic Beanstalk, Cloud Foundry, Heroku, and Red Hat OpenShift. This makes sense, since Java developers are one of the biggest developer groups in the world.

The Java platform is well-suited for PaaS, since the JVM, application server, and deployment archives (e.g., WARs and EARs) provide isolation for Java applications, allowing several developers to deploy applications on the same infrastructure.

CloudSwing: Deploying to the cloud within minutesConventional PaaS offerings limit the user’s choice to the service provider’s offerings. Open PaaS eliminates this lock-in by letting users customise technology stacks, components and versions, and choose cloud service providers or deployment models to optimise performance, scalability, security and costs for each application. CloudSwing, from

Development and deployment are slow in traditional environments due to issues with team synchronisation across regions, software version and licensing management (for proprietary products), backup and disaster-recovery management, and access to the required computing, storage and network resources. Cloud computing provides various ways to address these challenges; one of these is PaaS (Platform-as-a-Service). This article explains CloudSwing, a solution that “lets you deploy any application on any technology stack to any cloud.”

Deploying Java Web Applications on

CloudSwing Open PaaS

100 | july 2012 | lINuX For you | www.linuxForu.com

Admin Overview

WorldMags.netWorldMags.net

Page 103: Linux for You 2012-07

CloudSwing Open PaaS

OpenLogic, is a flexible and open PaaS cloud solution, offering cost-tracking and complete customisation of technology stacks. It also lets you deploy any application on any technology stack to any cloud (as of now, Amazon and RackSpace), creating a flexible Platform-as-a-Service. It includes pre-built open source stacks for Java, Ruby, JavaScript, PHP and other languages. Users can modify or customise these stacks to include any software components they choose, including open source and proprietary software.

CloudSwing offers a free plan for up to three members, in which you can deploy up to five concurrent applications; each user can be a member of one or more CloudSwing accounts.

The pre-built platform options are LAMP, Tomcat, Rails, Node.js and NGinX. OpenLogic provides support for over 600 open source packages. Developers can choose language and platform stacks, and pick all the stack components from the Web framework and the application server to the database.

Built-in management and monitoring of the health of your cloud-based applications comes via OpenLogic’s partnering with New Relic; all the pre-built CloudSwing stacks include New Relic monitoring agents. A Cost Management module tracks cloud costs to ensure you stay within your budget.

CloudSwing will offer a choice of infrastructure (cloud, OS and virtualisation technology), though as of now, OS and virtualisation technology choices are not available—at least in free usage. Portability features allow developers to move data, scripts and applications to other PaaS or IaaS offerings.

Deploying a simple Java Web applicationHere is the procedure to deploy a simple Java Web application created in Struts + Spring + Hibernate:1. Register at https://cloudswing.openlogic.com/ to use the

free 30 cloud hours to deploy a Java application.2. Choose the Platform option to start; select the Tomcat

stack to deploy the Java application.3. Add the Java Web application and/or other components to

the pre-built stack, in the Customise Tomcat Platform step.4. Select the cloud service provider, as seen in Figure 1 --

currently Amazon and RackSpace are available.5. Launch the Virtual Machine. Once the VM is available,

get its IP address, and download the SSH key, which is

required to access remote resources from your machine.6. Navigate to the VM’s IP address in a browser, to check that

Tomcat is working.7. Use SCP or your preferred transfer method to upload

the application WAR file from your local machine to the remote machine.

8. Connect to the same machine with a MySQL client, and create the database and tables necessary for your application.

9. Configure your application to use the new database; change the host, user name and password in the database.properties file (or wherever your application expects to find this configuration).

10. Run the application (after connecting to it in a browser) and check that it works.

11. Figure 2 shows the CloudSwing Dashboard page, where you can monitor applications, apart from cloud usage and costs.According to Gartner, enterprise software users and

vendors currently without a cloud-computing strategy must anticipate that, during the next three years, PaaS offerings will become a strategic part of their technology portfolio, and hence they should plan accordingly. Although the adoption of PaaS is essential in the long term, investment in it must be done with caution, strategic thinking and tactical decision-making.

Figure 1: Cloud service providers Figure 2: The CloudSwing Dashboard

By: Mitesh Soni

The author is a Technical Lead at iGATE. He is in Cloud Services Practice and loves to write about new technologies.

[1] Gartner Complimentary Research: PaaS 2012 Tactical Risks and Strategic Rewards[2] PaaS Road Map: A Continent Emerging: http://www.gxs.

co.uk/wp-content/uploads/wp_gartner_paas_road_map.pdf?f92556

[3] http://www.openlogic.com/cloud/faq.php[4] http://www.openlogic.com/cloud/[5] http://www.openlogic.com/cloud/about.php[6] http://www.openlogic.com/cloud/open-paas.php[7] http://www.infoq.com/articles/paas_comparison[8] http://wso2.com/download/Selecting-a-Cloud-Platform.pdf

References

www.linuxForu.com | lINuX For you | july 2012 | 101

AdminOverview

WorldMags.netWorldMags.net

Page 104: Linux for You 2012-07

TIPSTRICKS&

Learn Linux commands Open the GNOME terminal and run the following command:

echo ‘man `ls /usr/bin | shuf -n 1`’ >> ~/.bashrc

Now, whenever you open a terminal, you will be greeted by a man page of a random command.

It’s a nice way to learn about new commands.

—Narendra Sisodiya,[email protected]

Backing up a MySQL database There are several methods to back up a MySQL database, one of which is to a command line

option. You need to have mysqldump installed for this method.

mysqldump is a command line utility that comes with the MySQL installation It can be used to archive one or all databases.

Given below is the command to back up a single database:

mysqldump --user [user_name] –password=[password_of_the user]

[database name] > [dump_file]

The command for back up of all databases in existence is as follows:

mysqldump –u[user name] –p[password] –all-databases > [dump

file]

To restore the back up taken by mysqldump, use the normal SQL command.

mysql --u [username] --password=[password] [database name] <

[dump_file]

—Manish,[email protected]

How to show the name of the current database in the MySQL prompt

If you need the name of the currently selected database in your MySQL prompt, use the following

lines in your MySQL configuration file (my.cnf):

[mysql]

prompt=’mysql(\d)> ‘

Now, when you connect, the MySQL prompt will look like what’s shown below:

mysql((none))> use test;

Database changed

mysql(test)>

mysql(test)> use mysql;

Database changed

mysql(mysql)>

This makes it very easy to identify the name of the database that you are currently working on.

—Mohana Sundaram N,[email protected]

102 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 105: Linux for You 2012-07

Find your MySQL configuration file We often have to administer a system that has been set up by someone else. In such a situation, it’s difficult to find

the correct configuration files for different applications. Here is a tip to find the correct configuration file for MySQL:

mysql -? | grep “.cnf”

—Remin Raphael,[email protected]

Use YUM to download a packageOften, you need to download rpm packages without installing them on the system that you are using to

download it. Using the normal YUM command downloads the packages and also installs them on your computer. Here is an option that will only download the rpm package for you. It will download it in the folders specified in the ‘--downloaddir’ option.

# yum update httpd -y --downloadonly --downloaddir=/opt

Now, you can install all rpm packages in this folder by running the following command:

# rpm -Uivh *.rpm

Do remember to run these commands as the root.

—Pratyay Modi,[email protected]

Resolve FSCK failed error Sometimes, while booting your Linux system, you may come across the error shown below:

FSCK failed. Please repair manually and reboot. The root file

system is currently mounted read-only. To remount it read-write

do:

bash# mount-n -o remount,rw /

Attention: Only CONTROL-D will reboot the system in this

maintance mode. shudown or reboot will not work.

Give root password for login:_

Provide your root password and try the following command:

mount -n -o remount,rw /

If this does not work for you, reboot your system and do a manual file system check on your root partition as follows:

umount /dev/hddXXX

fsck -CV /dev/hddXXX

…where hddXX is the root partition.

—Abhishek Chib,[email protected]

Undo your changes even after quitting the VIM editor

As all of us know, if you make changes in a file using VIM editor, the changes are permanent and you cannot

get the old version back after you save and quit the editor.But VIM v7.3 allows you to get the old version back

even after quitting the editor.Here is a tip that shows you how to configure VIM to

remember changes.To enable Undo, execute the following commands in

VIM just before starting to edit the file.

:set undofile

:set undodir=/tmp

This is to be done every time you start editing a file. In case you need the configuration to be there for all files that you open in VIM, create a file called ‘.exrc’ or ‘.vimrc’ in $HOME directory. In my case, it is /myhome.

Open the just created file and add the following commands:

# vi /myhome/.exrc

set undofile

set undodir=/tmp

Save and close the file.

:wq

From now onwards, the Undo history is maintained in the background for all files that you edit with VIM.

—Adithya Kiran Gangu,[email protected]

www.linuxForu.com | lINuX For you | july 2012 | 103

Share Your Linux Recipes!The joy of using Linux is in finding ways to get around problems—take them head on, defeat them! We invite you to share your tips and tricks with us for publication in LFY so that they can reach a wider audience. Your tips could be related to administration, programming, troubleshooting or general tweaking. Submit them at www.linuxforu.com. The sender of each published tip will get an LFY T-shirt.

WorldMags.netWorldMags.net

Page 106: Linux for You 2012-07

www.facebook.com/linuxforyou

Powered By

Rohit Verma: Hi all! I had first installed the Windows XP and then Backtrack on my machine. Now it's booting fine but the issue is that before displaying the splash screen it took a time of about 30 seconds, displaying nothing. I am not able to understand how is that time getting wasted. My first boot device is my hard disk from which I am booting both the OS.Like . comment

Thiyaga Rajan: For this, you need to edit grub conf file. /boot/grub/grub.conf. There is a line in there which tells the boot loader which entry in the menu to treat as the default. For time 30 seconds, you can change at "set timeout=30", you can specify the time, based on your need.

Vishnu Revankar:Can anyone tell me, if I download only the VLC pack-age for RHEL 5.1, would it be good enough for instal-lation or would I need any dependency packages? And apart from VLC, what other media player can be used for RHEL 5.1?Like . comment

Ashwin Jil: It is simple, you have to install it via rpm -ivh *vlc or some media player name*.

Phani Kumar Veluturi: Check this "http://www.videolan.org/vlc/download-redhat.html", create a repo file "/etc/yum.repos.d/vlc.repo", after updating "yum install vlc".

Ashwin Jil:Please help me to fix this error! It occurs whenever I type MySQL in the terminal ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Like . comment

Phani Kumar Veluturi: MySQL server services are not running, I guess you are updating MySQL server?

Ashwin Jil: Ok thank you, I fixed it by using init mysqldb start.

Rajnish Singh:Can anyone tell me how to connect the Cisco switch (3560) in CentOS. I had worked with Switch in Windows XP -> hyper-terminal. I can't find that hyper terminal in CentOS. I would also like to know how to make cluster in CentOS. I have to make 2 node cluster. Help me please.Like . comment

Phani Kumar Veluturi: Use minicom or kermit for serial port connection http://www.howtoforge.com/redhat-cluster-suite-and-conga-linux-cluster-ing - this is for CentOS 6 version.

Dhiraj Singh:Hi! How do we mount Windows' drives on Linux (ubuntu 10.10)?Like . comment

Phani Kumar Veluturi: Here's how to go about it. Type ‎"sudo apt-get install ntfs-3g" then "sudo mount -t ntfs-3g /dev/<windows-partation> /<new-mount_point>

Aboobacker Mk: Open the nautilus(file-manager and doble click on the icon of the drive)

Jay Dee: I agree. You should be able to just double-click on it to open; but if it is NTFS, there are some free apps that give you read-write ability.

Parijat Chauhan:Sadly, the brightness control isn't working on my Vaio. I can't blow Windows unless I can use either Ubuntu,Fedora or OpenSUSE fix the brightness issue for Sony Vaio. Please let me know if there is any way to fix it somehow.Like . comment

Uday Mittal: Try out this command: xrandr --output LVDS1 --brightness x (Where x is the level of brigtness you want ranging from .01 to 1)

Parijat Chauhan: Thanks! This worked like a charm!

Image quality is poor as the photos have been directly taken from www.facebook.com

104 | july 2012 | lINuX For you | www.linuxForu.comWorldMags.netWorldMags.net

Page 107: Linux for You 2012-07

www.facebook.com/linuxforyou

Powered By

Jotish Marri:Can any one get me the link for LAMP installation?Like . comment

Phani Kumar Veluturi: "apt-get install lamp-server^ -y ", just copy paste this command and follow the onscreen instructions.

Uday Mittal: If you're using Ubuntu check out this link: https://help.ubuntu.com/community/Tasksel.

Svanius Mestieli:I installed Ubuntu just a few minutes back. I need some advise on how I can modify the desktop or change the theme. I also want to know how to trans-fer from the Windows 7 Outlook profile and emails.Like . comment

Aboobacker Mk: You can install screenlets, docks and conky for tweaking your desktop. Install gnome-tweak-tool for change icons and themes. Try out other DE's like kde lxde ,gnome-shell etc. If any doubt occurs comment here,we will help you :)

Svanius Mestieli: Thank you very much!

Shubham Gupta:When I try to install the Linux OS, i.e Fedora 16, then my Hard Disk is not detected. I am using HP Probook 4430S. Please help me regarding this.Like . comment

Nirvik Nepali Khanal: In the partition table you have to manage.....and for the partition mode you have to select ext4.

Phani Kumar Veluturi: Check bios, you should set the sata change to "ata" mode ide operation.

Aniruddha P Tekade:I have a 3.5G Connect IBall modem and want to connect it on Ubuntu 11.10. Whats the procedure if its not being detected on 11.10, whereas it works successfully on the previous versions of Ubuntu. Help me out please.Like . comment

Aboobacker Mk: Connect the modem and lsusb in terminal,post the output below :)

Phani Kumar Veluturi: This link would help, http://www.linuxnix.com/2011/08/connect-reliance-netconnect-ubuntu.html, this is same for all modems.

Ankit Mishra:My root partition is full. What do I do now?Like . comment

Aboobacker Mk: Delete unwanted data ,or you can use gparted to expand your partition.

Ritesh Chaudhari: You can type the following com-mand to free the space which are occupied by the old source packages: "sudo apt-get auto remove"(which Remove automatically all unused packages ),"sudo apt-get autoclean"(Erase old downloaded archive files).... and you can also use gparted/disk utility to extend space.

Aboobacker Mk: Use these commands,sudo apt-get clean for removing deb cache sudo apt-get install fslint ... for installing fslint which can remove duplicate files. Open the disk usage analyser to analyse the file list and remove unwanted files , If you still need more free space, use gparted. (Note: Be careful while using gparted).

Davin Singh Alexandre:Hello. I would like to apologise in advance for my ignorance, but I seem to have a problem finding Linux. I was trying to boot my laptop, but it said I had no operating system, so I decided to install Linux, but I can't seem to find where to download it. I also want to know, if I download it on to my USB, it will be able to open on my operating system-less laptop?Like . comment

Mahesh Patil: You can try out dam small Linux. Also Google it for the USB versions of Linux, there are many with full graphix support, boot from usb drive.

Davin Singh Alexandre: Alright. Thank you!

Image quality is poor as the photos have been directly taken from www.facebook.com

www.linuxForu.com | lINuX For you | july 2012 | 105WorldMags.netWorldMags.net

Page 108: Linux for You 2012-07

EnterpriseDB Software India Private LimitedUnit # 3, Ground Floor, Godrej Castlemaine, Sassoon Road Pune – 411001T +91 20 3058 9500 F +91 20 3058 9502 www.enterprisedb.com

Predictable cost for your support via Remote, Email andTelephonic support for your production systems

Software updates upgrades, patches and technicalalerts service

Web portal access and knowledge base access with

PDF documentation

Unlimited number of incidents supported

The Postgres Plus Solution Pack provides high valueadd-on tools to PostgreSQL for AdministrativeMonitoring, Data Integration across multiple servers,Availability, Security, Performance and SoftwareMaintenance.

http://www.enterprisedb.com/products-services-training/subscriptions

http://www.enterprisedb.com/postgresql-products/premium

You can find more details on the following links:

The only solution that allowsyou to intelligently manage,

monitor, and tune largenumbers of Postgres database

servers enterprise-widefrom a single console.

Postgres EnterpriseManager (PEM)

Protects your server sidedatabase code and intellectualproperty from prying eyes for

both internal and packagedapplications without anyspecial work on the part

of the developer!

Provides easy dataintegration

betweenPostgreSQL

based serversand between

Oracle andPostgreSQL

allowing Oracleusers to

dramaticallyreduce their

Oracle licensefees

PL/Secure forPL/PgSQL

xDBReplication

ServerProtects your PostgreSQL andAdvanced Server data againstmultiple SQL virus injection

vectors by automaticallylearning safe data accesspatterns and collecting

attack data.

SQL Protect

Eases your installationmaintenance burden by

notifying you when updatesto any components areavailable and assists you

in downloading andinstalling them.

Updates Monitor

Fast, flexible and customizeddatabase migration from

Oracle, SQL Server, Sybase,and MySQL to PostgreSQL

and Postgres PlusAdvanced Server.

Migration Toolkit

A developer's friend to find,troubleshoot, and optimize

slow running SQL fast!Provides on-demand or

scheduled traces that canbe sorted, filtered and saved

by users and database.

SQL Profiler

EnterpriseDBPostgres Plus Subscription

for your successful

PostgreSQL/PostgresPlus deployments

Includes...

WorldMags.netWorldMags.net

Page 109: Linux for You 2012-07

EnterpriseDB Software India Private LimitedUnit # 3, Ground Floor, Godrej Castlemaine, Sassoon Road Pune – 411001T +91 20 3058 9500 F +91 20 3058 9502 www.enterprisedb.com

Predictable cost for your support via Remote, Email andTelephonic support for your production systems

Software updates upgrades, patches and technicalalerts service

Web portal access and knowledge base access with

PDF documentation

Unlimited number of incidents supported

The Postgres Plus Solution Pack provides high valueadd-on tools to PostgreSQL for AdministrativeMonitoring, Data Integration across multiple servers,Availability, Security, Performance and SoftwareMaintenance.

http://www.enterprisedb.com/products-services-training/subscriptions

http://www.enterprisedb.com/postgresql-products/premium

You can find more details on the following links:

The only solution that allowsyou to intelligently manage,

monitor, and tune largenumbers of Postgres database

servers enterprise-widefrom a single console.

Postgres EnterpriseManager (PEM)

Protects your server sidedatabase code and intellectualproperty from prying eyes for

both internal and packagedapplications without anyspecial work on the part

of the developer!

Provides easy dataintegration

betweenPostgreSQL

based serversand between

Oracle andPostgreSQL

allowing Oracleusers to

dramaticallyreduce their

Oracle licensefees

PL/Secure forPL/PgSQL

xDBReplication

ServerProtects your PostgreSQL andAdvanced Server data againstmultiple SQL virus injection

vectors by automaticallylearning safe data accesspatterns and collecting

attack data.

SQL Protect

Eases your installationmaintenance burden by

notifying you when updatesto any components areavailable and assists you

in downloading andinstalling them.

Updates Monitor

Fast, flexible and customizeddatabase migration from

Oracle, SQL Server, Sybase,and MySQL to PostgreSQL

and Postgres PlusAdvanced Server.

Migration Toolkit

A developer's friend to find,troubleshoot, and optimize

slow running SQL fast!Provides on-demand or

scheduled traces that canbe sorted, filtered and saved

by users and database.

SQL Profiler

EnterpriseDBPostgres Plus Subscription

for your successful

PostgreSQL/PostgresPlus deployments

Includes...

WorldMags.netWorldMags.net

Page 110: Linux for You 2012-07

WorldMags.netWorldMags.net