Professional Documents
Culture Documents
Leonardo Roars For Your Attention-Fedora 11 Reviewed
Leonardo Roars For Your Attention-Fedora 11 Reviewed
ISSN 0974-1054
V Das”
D nid
erae11 “Leo
r
FFedo
Compiling
GNU Software Institute Bets
For Windows on Linux | 80
on FOSS
Secure SHELL for its Infrastructure | 31
Explained for Starters | 68
LinuxForU.com
source code inside!
India
Singapore
Malaysia
INR 100
S$ 9.5
MYR 19
Hack
WordPress
Build An Online Magazine
Trained participants from over 38 Countries in 6 Continents
Linux OS Administration & Security Courses for Migration
LLC102: Essentials of Linux OS RHCA Course Schedule
LLC103: Linux System & Network Administration RHS333: 11 July; RH423: 18 July
LLC203: Linux Advanced Administration RH442: 28 July; RH436: 25 Aug 2009
LLC303: Linux System & Network Monitoring Tools
LLC403: Qmail Server Administration
LLC404: Postfix Server Administration Course on 18 & 19 July ‘09
LLC405: Linux Firewall Solutions
LLC406: OpenLDAP Server Administration
LLC408: Samba Server Administration
LLC409: DNS Administration
Joomla CMS
LLC410: Nagios - System & Network Monitoring Software
LLC412: Apache & Secure Web Server Administration
RH301 from 6, 13 & 20 July ‘09
RHCE Exam in Bangalore 24 & 31 July ‘09
Courses for Developers
LLC104: Linux Internals & Programming Essentials
LLC105: Programming with Qt LLC504: Linux on Embedded Systems
LLC106: Device Driver Programming on Linux
4 Day Fast Track Course
LLC107: Network Programming on Linux
LLC108: Bash Shell Scripting Essentials starting on 18 July 2009
LLC109: CVS on Linux
LLC204: MySQL on Linux
LLC410: Nagios System & Network
LLC205: Programming with PHP
LLC206: Programming with Perl Monitoring System - Training from 18 July ‘09
LLC207: Programming with Python
LLC208: PostgreSQL on Linux Linux Support & Solutions
LLC209: Joomla CMS Installation, Setup and Support Solutions
LLC501: Programming with OpenGL for RedHat, Ubuntu, SUSE, CentOS Servers
LLC504: Linux on Embedded Systems
For more info log on to:
RHCE Certification Training
RH033: Red hat Linux Essentials www.linuxlearningcentre.com
RH133: Red Hat Linux System Administration Call: 9845057731 / 9343780054
RH253: Red Hat Linux Networking & Security Administration Email: info@linuxlearningcentre.com
RH300/301: Red Hat Rapid Track Certification Course
RED HAT Training Partner
RHCE & RHCSS Exam Centre
RHCSS Certification Training
RHS333: Red Hat Enterprise Security: Network Services
RH423: Red Hat Enterprise Directory Services & Authentication
RHS429: Red Hat Enterprise SELinux Policy Administration
Registered Office & Corporate Training Centre LLC Satellite Centre - Bangalore
# 635, 6th Main Road, (Adj.. Bank of India) Hanumanthnagar, Bangalore 560019 # 1291, 24th Cross, 30th Main,
Tel: +91.80.22428538 / 26600839 / 26610999 TelFax: +91.80.26600839 BSK II Stage, Bangalore 560070
Cell: 9845057731 / 9343780054 Email: info@linuxlearningcentre.com Tel: +91.80.26712928
www.linuxlearningcentre.com
Contents July 2009 • Vol. 07 No. 5 • ISSN 0974-1054
developers
80 Compiling GNU Software for
Windows
86 Understanding Memory Areas in a C
Program
Admin
31 Case Study: It’s Open Source All the
Way for ITM
34 “We are certain that our model is
applicable to any institute”— J A
Bhavsar, Group Head (IT) Institute
for Technology and Management
62 The Art of Guard—Understanding
the Targeted Policy, Part 3
100 Getting Started with DTracing MySQL
HYDERABAD
P.S. Muralidharan
Ph: 09849962660
E-mail: efyhyd@efyindia.com
LFY CD: ERP (Enterprise Resource Planning) explicitly mentioned, will be released under under Creative
Commons Attribution-Share Alike 3.0 Unported License
a month after the date of publication. Refer to http://
•Adempiere •PostBooks ERP •Openbravo ERP •Compiere ERP+CRM; creativecommons.org/licenses/by-sa/3.0 for a copy of the
licence. Although every effort is made to ensure accuracy,
Updates: •Kernel 2.6.30 •Kernel 2.4.37.2; Newbies: •Gallery •Jaris FLV Player no responsibility whatsoever is taken for any loss due to
publishing errors. Articles that cannot be used are returned
•LiVES; Fun Stuff: •Warzone 2100 •Danger from the Deep Developers: •PHP to the authors if accompanied by a self-addressed and
sufficiently stamped envelope. But no responsibility is taken
For Applications •OpenSwing; LinuxForU.com source code for any loss or delay in returning the material. Disputes, if
any, will be settled in a New Delhi court only.
Note: 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
Licence a month after the date of publication. Refer to http://creativecommons.org/licenses/by-sa/3.0/ for a copy of the licence.
Tyrone Opslag FS2 is a all-in-one storage solution that aims to meet all your requirements for
storage virtualization. It is an extremely flexible solution with a wide choice of
interface/protocols/disk-subsystem and provides extremely high redundancy.
You can use it as a NAS or a SAN. For customers looking for extremely high-performance storage
solutions we offer SRP target support & NFSoRDMA (over Infiniband interface).
It is a highly scalable solution and can scale up to 384TB
Drives:
Supports up to 16-hot-swap SAS/SATAII HDDs in one box
Supports up to 80 HDDs by cascading multiple JBODs
Management:
LCD Control Panel for setup, alarm mute and configuration
Firmware-embedded web browser-based RAID manager -
access your RAID subsystem from any standard internet
browser via 10/100 Lan port
Enclosure:
3U rack-mountable with rail-kit
* The product picture is representative and the actual
Redundant Power supply product may differ in looks. Please contact us for complete information.
You said it…
I have been trying to install boot Linux distros from your partition to avoid that error. The
a Linux distro on my external hard drive. Happy and Error 22 either means that the
external hard drive, but have persistent booting! partition is missing, corrupted,
failed miserably over the past few or the boot list is messed up.
months. I have tried out every Anuvrat replies: I have been Quoting http://www.gnu.org/
distro given by you but there has fiddling around a bit with the software/grub/manual/grub.html:
been no positive result. Most BIOS, so all that had to be done Error 22 is returned if a partition
devastating was when I to set up a boot priority was is requested in the device part of
unsuccessfully tried Dreamlinux, done perfectly. The installation of a device or full file name, which
which had an option of being Dreamlinux on an external disk isn’t on the selected disk.
installed to an external hard drive took place very well. I had opted Try a clean installation
(as mentioned by Shashwat Pant for a 10 GB root partition, a 1 and please let me know what
in the May 09 issue). If possible, GB swap partition, and the rest happened.
please publish an article on as a home partition. The MBR
installing distros on USB HDDs in was selected to load GRUB, and I have been reading LFY
the next edition of LFY. the installation was run in the since January this year. I
—Anuvrat Parashar, absence of the internal hard drive. had picked up a copy after about
bhanuvrat@gmail.com When I tried to boot, ‘ERROR five years. Admittedly, I just
22’ was what greeted me. And wanted a Fedora 10 DVD, but
Shashwat replies: Kindly with some other configuration when I saw the contents of the
follow the instructions below to --perhaps with GRUB in the root issue, I couldn’t rest till I had
get the hard drive booting: partition -- the error that showed finished it, and I read every
1. Make sure your motherboard up was ‘BOOTMGR missing’. single article! Since then I have
supports booting from I have tried to install many been a regular reader, and the
external devices like USB other distros on my external magazine never lets me down.
drives, card readers, etc. drive in the past few months— Kudos to the LFY team! Keep up
2. Then Enter BIOS-->Advance for example, Debian Lenny, the good work!!!
BIOS Features-->Set First boot OpenSolaris 2008.11, Mandriva I particularly liked some
device; though the location Spring 2008 and 2009, PCLinuxOS, of your regular columns like A
depends from motherboard openSuse 11.1, Ubuntu 8.10 and Voyage to the Kernel, The Joy of
to motherboard and the type 9.04. Every time something or the Programming, and Programming
of BIOS it comes with. You other went wrong and I had to in Python for Friends and
can either try setting the first give up, disappointed. I tried my Relations. I was wondering if
boot device to the USB-HDD luck with Dreamlinux when I read you could send me the PDFs of
or, in case this option is not about the possibility of installing previous issues that featured
available, look for the option it on an external drive. In case articles from the above series. I
“Set Hard Disk Boot Priority” there is some editing to be done am dying to read them from the
under the same section in the with GRUB, then please guide me beginning.
BIOS. Make the attached drive as I do not know any thing about I have some suggestions for
as the primary booting source it except selecting it and pressing the magazine:
by slotting it as #1 in the list. Enter. It would be very helpful 1. Please make sure that the
3. Again, under the Advance if you could guide me further in CDs and DVDs you supply are
BIOS section, set the hard disk my quest to install Dreamlinux bootable (I am talking about
as the first boot device. Save successfully on my external drive. the PC-BSD DVD, bundled
and exit. with the May 2009 issue).
4. Now, if your motherboard Shashwat: Do let us know If you are packing multiple
supports booting from how you have installed the other distros, you could create
external drives, you will be distros? Try installing GRUB multi-boot DVDs. This saves
able to boot from it if you have either in /dev/sda (or /dev/hda readers the hassle of burning
installed the distro correctly. depending on type of hard DVDs just for the sake of
I hope this helps you disk), or create a separate /boot trying out the distro, and is
REGISTER TODAY
for a Conference Pass
MUMBAI | 7Ð9 OCTOBER or Reserve Your
Bombay Exhibition Centre Free Expo Pass.
www.interop.com/mumbai
Get the information you need to build your competitive edge at IT’s most comprehensive
Conference and Expo. See all the latest innovations—including virtualization, mobility and
cloud computing—that will help you increase efficiency, drive revenue and reduce costs.
Register Today for a Conference Pass or Reserve Your Free Expo Pass.
www.interop.com/mumbai
For Exhibiting and Sponsorship opportunities Contact Pankaj Jain at + 91 98101 72077 or email: pankajj@ubmindia.com.
GIMP
for Beginners
Part 1: User Interface
The GIMP is a great tool, but many of us don’t even know how to get started with it. So let’s get a grip
on this powerful image manipulation tool, beginning with its user interface.
T
he GIMP or the GNU Image revision, you can update it using your package
Manipulation program is a free manager. If your operating system doesn’t
and open source raster image ship with it, head to www.gimp.org to find a
editing software. It is very binary installation package for your OS. Since
powerful and a great alternative to Photoshop. the GIMP is a cross-platform software, it is
It has always been denounced for an interface available for nearly all the operating systems,
that’s too perplexing for newbies. ranging from Linux and Windows, to Mac OS
I always wondered how people could be so and BSD. Thus, it shouldn’t be a problem for
good at creating wallpapers and editing images. you to get your binary package.
I even asked them and tried Photoshop many
a time. But its complexity always forced me to The interface
un-install it. One fine day, I installed Linux and Once you have finished the installation, it’s
started playing with the GIMP, as it was the time to start the application. GIMP starts with
default image editor. It wasn’t long before I got a ‘Splash Screen’; the initial loading can be a bit
used to it. I am still discovering uncovered facts long depending on the system you use and the
and reaching newer shores with this tool. After I number of fonts and plug-ins installed. But this
became comfortable with the GIMP, it was just a load time becomes much snappier from next
matter of time before I created a wallpaper, edited time onwards.
an image or any other work of art.
Now, allow me to guide you through the
first leg of this tutorial where you will get Tips: You can change the splash screen
introduced to a few basic facts about the by creating a ‘splashes’ directory in the .gimp
interface, several basic editing tools, how to folder.
spice up photos, and other tips and tricks. Once Linux: ~/.gimp/splashes
we get these done, we will explore how to make Windows: X:\Documents and Settings\
wallpapers and designs with this image editor. username\.gimp-2.6\splashes
First, let me introduce you to the GIMP 2.6 And copy the desired splash image with
interface and what those tools are meant for. gimp-splash.png name
But before we get started, it is necessary
to install the application (preferably, the latest
version). The current stable version is 2.6.6 The default interface of the GIMP consists
and it ensures that you are not affected by of three features:
unwanted bugs. Every new Linux distribution 1. Toolbox: This consists of tools and the tools
comes with the GIMP 2.6 as the default option to perform several operations.
image editing program. If you have an older 2. Image Window: This is the section where you
Leonardo
Roars
image is released under Creative Commons Attribution 2.0 Generic Licence.
for Attention
the Jaguar [www.flickr.com/people/tambako].
A
20-second boot, Ext4 as default The test systems
filesystem, Firefox 3.5 and An HP 550 laptop with the following specs:
Thunderbird 3.0, OpenOffice.org Intel Core 2 Duo T5470 (1.6 GHz, 800 MHz
3.1, Delta RPM support, better FSB, 2 MB L2 cache)
support for fingerprint readers, automatic 1 GB 667 MHz DDR2 SDRAM
fonts and mime installer... Well, these were 160 GB 5400 rpm SATA
some of the 50 odd features listed on the Mobile Intel GMA X3100 graphics
project website [fedoraproject.org/wiki/ An assembled AMD-based desktop with the
Releases/11/FeatureList] when the Fedora following specs:
11 development was taking shape. The good AMD Athlon X2 5600+ Dual Core (2.8 GHz,
news is, when the final release was out, the 2000 MHz HyperTransport, 1 MB L2 Cache)
status for all these listed features was 100 per 2 GB 800 MHz DDR2 SDRAM
cent. Impressive, eh? 250 GB 7200 rpm SATA + 160GB 7200 rpm
Naturally, the next step was to head PATA
over to fedoraproject.org and download the NVDIA 7050 PV (integrated graphics inside
ISO. As is the norm with any other distro, an ASUS M2N-VM DVI MoBo)
Fedora 11 (codenamed Leonardo) comes as
an installable DVD, or live CDs of various Test drive on a live CD
spins, including GNOME and KDE. I chose Since the kernel modesetting (KMS) works on
GNOME (for a change), because features Intel (as well as ATI) graphics cards, but not
such as automatic codec and mime on NVIDIA by default, I booted the HP laptop
installation are reportedly GNOME-only first. KMS is the backbone of Plymouth, the
for this release. Talk about treating KDE as replacement for RHGB for boot splash, which
your step child ;-) helps in a flicker-free X server initialisation.
While booting the live CD, I noticed the new splash screen—
the Fedora infinity logo. You see the magic of KMS when GDM
loads after the initial boot—the transition effect is, in fact,
smooth. You understand the point that Fedora developers are
trying to make when they say: “The start-up experience needs
to be flicker-free, seamless and shiny.”
On the GDM screen, I also noticed what I believe is the
new option for logging in using a finger impression, provided
you have a fingerprint reader. I don’t, so I couldn’t test this one.
After logging into the desktop, you’re greeted by the
excellent Fedora wallpaper—I loved it for the first time since
the project’s inception. It has that professional touch that was
always missing. Apart from this, things look pretty much the
same visually. It’s the same GNOME 2.6 that we already know
of from the Ubuntu and Mandriva Spring releases. The icon
set, dubbed Fedora, is the plain old customised theme that Figure 1: Live CD installer reports ext4 is the only option for root partition
made its debut with Fedora 7. Whatever happened to the
Echo theme?
A change that I noticed is the new volume control tool.
This one gets rid of the separate GNOME ALSA mixer and the
one offered by PulseAudio, and integrates everything at one
place. It makes sense to control all volumes from one location,
but the application lacks the amount of mixers present in the
ALSA mixer.
What’s quite discouraging to see is the lack of applications
on the live CD. OpenOffice.org is missing, and so is a general
digital camera/photo manager application like F-Spot. Well, of
course, these can be installed from the online repository, but
what is it that fills up the 687MB CD that leaves no room for
OOo (which is present by default on all other live CD distros)? Figure 2: Fedora desktop with the Echo icon theme
The Fedora team says it chooses to support a more complete
set of languages that takes up the space as compared to your own FS if you’re using the installable DVD. Well, other
others supporting only English (US). Good enough reasoning, live systems—viz., Ubuntu, Mandriva, openSUSE—surely let
but I guess if you choose to use another localisation setting, you select your own FS even when you install from live CDs.
it’s a smaller download compared to OOo’s size, which Anyway, ext4 it is. The problem again is, it’ll force you to
most people will anyway need. The provided AbiWord as a create a separate /boot partition of ext3 type, because GRUB
replacement word processor is no solution at all. still doesn’t have support for ext4. Anyway, enough with the
complaints, the installer manages to copy the whole system
Installation notes within 5 to 6 minutes, which I gotta admit is amongt the fastest.
Well, time to install the distro. The live installer, I gotta admit, LFY, on the other hand, chose to bundle the DVD for
is snappy. The only downside: you don’t have a say in the being a more complete package. I got access to the DVD a bit
filesystem you’d like to use for your root. Fedora defaults to later, which prompted me for fresh install on my assembled
ext4. We’ve all heard a lot about data loss in this new FS when desktop PC. Anaconda behaves pretty much the same way,
a computer is not properly shut down or if the OS crashes—a with all the options remaining the same. I still have issues
problem also common with XFS. Ext3, that way, has always with the partition screen where, by default, it’s set to erase all
been a safe bet. The kernel developers have obviously taken your partitions. You must select to manually set the partitions
note of the complaints and patches to cure this have been from the drop down, unless you’re using a blank hard disk.
included in version 2.6.30. Fedora, however, ships with 2.6.29, While the installation using the live CD was faster
but the developers have reportedly backported these patches compared to the other distros, the installable DVD took a lot
to its kernel. of time installing packages. It took more than half-an-hour
I’d say, good job there. However, I have serious issues with with the default choice of packages—the only thing that I had
giving the user no choice apart from ext4 for his root FS. The added to it were the packages under the virtualisation section.
reason being, as I’ve been told, live CDs don’t have the ability What I’ve noticed with Anaconda over the last few releases
to change filesystems. Essentially, they transfer a single pre- is that it starts off installing the packages at good speed, and
formatted image to the disk and write a boot loader on the then gradually slows down irrespective of the package size
system at the end of the process. You can, however, choose that it’s installing.
NVIDIA blues
Figure 3: Fedora automatically looks for missing codecs Traceback (most recent call last):
File “/usr/share/system-config-display/xconf.py”, line 376, in <module>
Back to the desktop dialog = xConfigDialog.XConfigDialog(hardware_state, xconfig, rhpxl.
Booting up the brand new system, I notice the flicker- videocard.VideoCardInfo())
free X server initialisation missing because of being on a File “/usr/share/system-config-display/xConfigDialog.py”, line 641, in
system with an NVIDIA chipset. The good thing is Fedora __init__
now uses the free Nouveau drivers for NVIDIA instead if len(self.xconfig.layout[0].adjacencies) > 1:
of NV—we all knew how unreliable NV was, right? I IndexError: index out-of-bounds
remember Fedora 10 live CD won’t even start the X server;
F11, on the other hand, even lets me use the maximum Up on searching the Web, I found a bug report at
resolution of 1280x1028 using Nouveau. bugzilla.redhat.com/show_bug.cgi?id=493680. Solution
Oh yes, the DVD installation gave me a more complete from the Fedora forum [forums.fedoraforum.org/showthread.
GNOME desktop, including OOo and F-Spot. Talking about php?t=206931] that I got was to delete the /etc/X11/xorg.conf
OOo, its icons are still the ones that appeared with the release file and then launch system-config-display. Although it loads
of Red Hat 8 back in 2002, and they are ugly. up now, it doesn’t allow me to go beyond 1024x764 px.
Anyway, time to see what else is there on the DVD. Switching from init 5 to init 3, and launching system-
Alas, the PackageKit/Yum interface doesn’t include the config-display lets me change the resolution back to
DVD as a source by default and expects you to download 1280x1024 px, but back on the desktop Compiz reports 3D
the packages even if they are available on the DVD. Talk isn’t supported.
about waste of bandwidth and time. What’s worse, the GUI Up on various trial-and-errors and being still unable to resolve
doesn’t give you an option to add it. Heck, even a simple it, I thought I was better off with the free Nouveau drivers.
option to add a proxy is missing.
The only option it lets you have control over is checking And here’s how you set up Yum/PackageKit to use a
boxes to enable/disable the repositories. I understand proxy—append the following text in the /etc/yum.conf file:
this is adequate if you’re only interested in adding third-
party repos like RPM Fusion. You can simply head over #The proxy server - proxy server:port number
to the website and install the RPMs for free and non-free proxy=http://MyProxyURL:PortNumber
repos, and it will automagically configure and enable the #The proxy user name and password
repos in your sources. But what if you’re behind a proxy or proxy_username=MyUserName
want to add the DVD as a source? Well, then you’ve got to proxy_password=MyPassword
manually edit some files.
Here’s how you add the DVD as a source—as root, create Of course, fill in your appropriate proxy URL/IP, port
a file called /etc/yum.repos.d/fedora-dvd.repo and enter the number, user name and password details above.
following text in it: So, the first thing I did was install the Echo icon theme.
Although, it’s not a finished product, it’s still gorgeous! Next
[fedora-dvd] thing was to test how the auto mime installation works. I
name=Fedora 11 DVD headed over to my music folder and double clicked on an
baseurl=file:///media/Fedora%2011%20i386%20DVD/ mp3 file. It automatically prompted me to press ‘Search’ to
enabled=1 look for appropriate codecs, and returned gstreamer-ugly-
gpgcheck=0 plugins soon. Somehow, I wasn’t so lucky with AVI files.
Still on the subject of PackageKit and Yum, I think it’s
That’s it! Now the package manager is intelligent enough rather slow in figuring out dependencies or even searching
to not download the packages that are already on the DVD. packages. I’m sure those from the apt-get wonderland
Overall
Although the overall experience with Fedora looks to be quite
disappointing, it’s also a pleasure running it—where else would
you be able to check on the latest features that are awaiting
you? Fedora 11 still proves to be among the most innovative
GNU/Linux distros. The only thing missing is proper usability
checks on essential features/options people come to expect
from their desktop OS. Then again, we’ve too many distros that
Figure 4: Installing Exaile using PackageKit
cater to the usability aspect to make GNU/Linux acceptable as
a desktop OS by the next generation of users.
would be disappointed here. Heck, I even find Mandy’s Critics often say Fedora is the test bed for Red Hat
urpmi and openSUSE’s zypper faster. Enterprise Linux. I’d like to differ and point out that Fedora
To end the discussion on package managers, the 11th is, in fact, the test bed for most, if not all, GNU/Linux distros.
edition of Fedora also officially supports delta RPMs,
thanks to the Presto Yum plug-in, although this is not
enabled by default. Install it by executing: yum install Ratings
yum-presto. Installer 3/5
You must be aware delta RPMs are a great way Ease of use 3/5
to save on your bandwidth traffic. This is because
Features 4/5
when updates are made available for any package, the
package manager only needs to download what has Stability 4/5
changed in the new release since the last time (aka the Community 4.5/5
diff patch). However, please note, it will only work if the Overall 3.5/5
said repository supports delta RPMs.
Coming back to applications, we all know the needs
of users vary significantly. However, Fedora, just like other Resources
distros, has done a pretty decent job of selecting the defaults. • Fedora 11 Feature List: fedoraproject.org/wiki/Releases/11/
And if you need more, you have the DVD and the online repos. FeatureList
• Kernel Modesetting: fedoraproject.org/wiki/Features/
One thing I’d like to mention here is the decision KernelModesetting
to include Firefox 3.5. Well, it’s still a beta release, but • Nouveau Modesetting: fedoraproject.org/wiki/Features/
nonetheless, it’s working like a charm on my installations. NouveauModesetting
The new version debuts with the private browsing feature— • Graphical Boot Sequence: fedoraproject.org/wiki/Features/
BetterStartup
you can access it from Tools—>Start Private Browsing. • RPM Fusion: rpmfusion.org/Configuration
The immediate result is, Firefox saves and closes all the
currently open tabs, and pulls up a new empty window with
the following info: “In a Private Browsing session, Firefox By: Atanu Datta
won’t keep any browser history, search history, download He likes to head bang and play air guitar in his spare time. Oh,
history, web form history, cookies, or temporary internet and he’s also a part of the LFY Bureau.
files. However, files you download and bookmarks you
Arch Linux
The Ideal
Geek Distro?
Inspired by CRUX and started in March 2002 by Judd Vinet, the Arch Linux project
might have been a late entrant into the world of distros. But within a short span of
time, it has gained lots of fans, users and contributors. Arch Linux, according to its
website, is a minimalist distribution aimed at intermediate Linux users who are not
afraid of the command line.
A
rch sticks firmly to the CRUX way is it better than other proven distros like
philosophy, ‘Keep it Simple’. Debian, Slackware, etc?
‘Simplicity’, according to Arch, is Let us not try and compare distros. Every
defined as “...without unnecessary distro has its own philosophy. Here’s what I
additions, modifications or complications.” Arch is like about Arch:
so simple that the core image is less than 320 MB. 1. Minimalist: You can install it easily on
It’s optimised for i686 processors, which means you computers that are relatively old. I’ve
need CPUs of Pentium II or a higher class to run. personally installed it on a Pentium III desktop
Arch also has an official x86_64 version. with 128 MB of RAM and it works really well.
An install of the latest Arch Linux core image Also, I’m typing this out on my laptop, which
will give you a command-line interface—no X, has a Core 2 Duo processor and 3 GB of RAM.
no desktop environment, no extra software. It 2. Rolling release: A rolling-release system
might sound stupid—why would you want only is basically a framework in which you get
a command line interface? But that is what I love the latest version of the operating system
about Arch. Linux is all about choice and in the if you have the latest updates installed. It
process of trying to keep everything ready for you eliminates the headaches that I used to
when the installation is over, distros like Ubuntu, get using ‘dist-upgrade’ on Debian. Yes.
openSUSE, Mandriva and the like, do not give users Gentoo, Sidux and Debian Sid also have a
much of a choice as to what software they need rolling release system. But I feel they are
to have. Of course, such distros are fantastic when either too hard to install (Gentoo) or rather
it comes to first-time Linux users. They serve as a unpredictable with respect to stability (Sid).
launch pad for them to better understand Linux. 3. Configurability: Since Arch core installs only
But intermediate Linux users would rarely use a command line system with the necessary
them (unless they are developing or contributing). packages to detect a network, keyboard,
[ED: And if you’re also one of those who likes to get display and other vital hardware, you can
started with things without much fuss ;-)] configure the system, pick and choose the
The question that now arises is -- in what software you need and set it up in just the way
Installation process that, I was done with the download in less than an hour.
I’m going to tell you how to install an Arch base system After burning the ISO to a disc, place it in your CD-
from a core CD image, with the X window system ROM drive, and reboot the PC. You’ll be presented with a
and GNOME as the desktop environment. If you need self-explanatory GRUB-like menu. I chose the first option
instructions on setting up KDE and XFCE, the online wiki that says “Boot Arch Live”. This will load the live system,
pages will come to your rescue. and you’ll be presented with a console log-in. Just type in
You can download the latest version, i.e., 2009.02, from ‘root’ for the user name—this is the default log-in and you
www.archlinux.org/download. There is an FTP install version don’t require a password at the moment.
also where you can download just the installer, which, in Now that you’ve logged in, type /arch/setup to start
turn, will download the core packages from a server when the installer.
you run it. Also, there are full CD, USB and ISOLINUX images Step 1: Selecting the source for packages. Since I
available for both i686 and x86_64 targets. downloaded a full core image, I chose the first option here,
I used Deluge [a Bit Torrent client] to download it and which is, “CD-ROM or other source”. There is a second option
found a good number of people seeding the ISO. Thanks to available called “FTP/HTTP” ( for the FTP install CD image)
which when chosen, will take you through a page where you The X factor
can set up your network and select a mirror (choose the one Before you install anything, make sure you create a new user
nearest to you for maximum speed). with useradd and that your current system is up to date. A
Step 2: Set the clock. You can choose from a list of pacman -S pacman followed by a pacman -Sy and pacman -Su
continents, then countries (and then cities if the selected will update the system. Make sure you do this as the new user.
country has more than one city listed). I chose Asia and then Use pacman -S xorg to install the X window system.
India. So Asia/Kolkata was the result. The installer will then Once installed, use xorg -configure or a pacman -S hwd,
ask you to set the date and time. followed by a hwd -xa to configure X. In case you use a
Step 3: Prepare the hard drive. This step enables you laptop and you find that your touchpad is not recognised,
to prepare your hard drive. The installer detects your hard do a pacman -S xf86-input-synaptics to install the
drive first. You can then either choose ‘Auto-prepare’, which ‘synaptics’ driver (most laptops have a synaptic touchpad).
will use your entire hard drive (and erase any partitions Now that X is in place, it’s time to install a desktop
present previously) or you can choose ‘Partition Hard Drive’ environment—I’ll set up GNOME here:
which will take you to cfdisk. This is familiar territory for any
intermediate Linux user. I was going to install only Arch on my pacman -S gnome gnome-extra gnome-system-tools \
laptop. But still, I wanted to be able to choose how much of my networkmamager network-manager-applet \
hard drive I was going to allocate to /, swap and /home. I have alsa-lib alsa-utils alsa-oss.
a 320 GB hard drive on my laptop. So I allocated 2GB for swap,
20 GB for /, made the partition bootable and allocated the rest This will install GNOME, ALSA and NetworkManager.
to /home and wrote changes to my hard drive. The next step Once done, make sure you add hal, network-manager, alsa
here was to set the filesystem mount points. This is where and fam daemons to the daemons section in /etc/rc.conf.
I was going to instruct the operating system about which My daemons section looked like this.
partition to use for what, and this is where you can choose
between ext2, ext3 and ext4, among other filesystems. DAEMONS=(syslog-ng !network netfs crond gdm hal fam networkmanager
Step 4: Select packages. There are two options network-manager-applet alsa)
available here—base and base-devel. The former has
everything you need for a basic system and ‘base-devel’ That is all you need. You now have a usable system. You
contains other packages that are optional and not as can install The GIMP, OpenOffice.org, Python and the likes
important as ‘base’. This is pretty much like the first with just pacman -S package_name. Oh, and don’t forget
and second Debian CDs. The first one containing all to do a ‘system update’ now and then. Happy Arching!
the necessary packages and the second with all the
packages that are next in line, in terms of importance. It
is recommended that you choose all the packages in base. Ratings
Choose packages in base-devel is up to you. Installer 4/5
Step 5: Install packages. This step is mandatory and will Ease of use 3.5/5
install all the packages you chose in the previous step.
Features 5/5
Step 6: Configure system. Once all the selected packages
have been installed, the installer will present you with a Stability 4.5/5
list of configuration files starting from rc.conf (the system Community 5/5
configuration file) where you can configure your hostname, Overall 4.5/5
network settings (if you have a DHCP server for your wired
connection, change the line in the networking section starting
with eth0, or the interface that is present, to eth0=”dhcp”), References
the root password (Arch does not ask you to set up another • Arch home: www.archlinux.org
• Arch wiki: wiki.archlinux.org
user; you’ll have to do it once the system is installed using • Forum: bbs.archlinux.org
the useradd command), among others. You can edit the • Arch User Repo link: aur.archlinux.org
configuration files using either Nano or Vim. • Screenshots taken from: ebalaskas.gr/ArchLinux. If you want
Step 7: Install the boot loader. While the previous screenshots of the entire installation process, this is where
you’ll find it.
versions of Arch had an option to install either GRUB or LILO,
2009.02 has the option to install GRUB or nothing at all (use
this option if you already have another Linux OS in a separate By: Bhargav Prasanna
partition, in which case, don’t forget to add the Arch listing to The author is an 18-year-old, studying for a BE in Electrical
the original GRUB menu.lst file). and Electronics Engineering from Meenakshi Sundararajan
Engineering College, Chennai. He loves tweaking anything that
You’re done installing the base system. Reboot the system is tweakable (software and electronics) and when he’s not doing
(and make sure you remove the CD from the optical drive to that, you will find him spreading the word about Linux.
prevent the installer from starting again) and that’s it.
Bing King!
My fling with the Bing!
is
I
n an alternate universe where you key in something like: ‘sex stories of ”, it will give
can go through a wormhole, you all the results you are looking for.
you will find an Earth with If you enter the most popular F-word
a difference. There exists a (and no, I don’t mean ‘free’; I meant the
very powerful corporation called My- other four-letter word), it will again
crow-shaft. It’s a company that believes warn you about ‘sexually explicit
in one philosophy for all. It doesn’t content’. But if you enter something
discriminate between itself and its users. like, “You are a F****”, it will give you
The great operating system— all the desired results.
actually it should be the great-great- Now, according to Wikipedia, the
grandfather of operating systems—that the word ‘sex’ is explained as follows, “In biology,
company built and made popular tells the story sex is a process of combining and mixing genetic
of its philosophy, which says that perfectionism traits, often resulting in the specialisation of
never achieved anything and everyone has equal—and organisms into male and female types (or sexes).”
some have even more—rights to succeed. My-crow-shaft has issues with that? Oh! They want
It’s not that you only survive when you’re good or to keep a check on population explosion. So, if you are a
excellent at something. The pro-people company (where ‘pro’ researcher and want to write a chapter on sex education for
stands for ‘produce and then force people to use’) believes kids and search for ‘sex’ on Bing, My-crow-shaft will warn you
that even the mediocre and the below average have the right that this could be an offensive search. [Yes, in India—people
to succeed. All you need is good muscles, which you can flex, are still debating whether sex education should be even
and a lot of monopoly. allowed in schools.] But ‘they’ have no issues if you are a
This corporation created Windows to prove the point— pervert and are searching for sex stories. They will not let
its success is the proof of the philosophy it believes in, which an innocent professor get dirty by searching that word, but
is: everyone has the right to succeed. will give the ‘right’ information to the one who wants it.
Now, you know that most people use doors to enter and Remember the saying: “Seek and ye shall find.”
exit. Everyone knows what kind of people use windows to Now, this is something beyond the understanding of my
enter and exit. There is a big industry manufacturing alarms pea-brain.
that prevent people from breaking in through windows. My-crow-shaft is proving time and again—first DRM and
This company, My-crow-shaft, has products that need now this censorship—that it will decide what is appropriate
regular reboots. It believes in: “Always take a nap during and what is not.
work; it increases productivity.” So does its operating Oh! I forgot. Another beauty of Bing is that you can easily
system—make sure you reboot and reformat it as and when search for the first name of the former US vice president
you can, before it forces you to. from the George Bush regime. My-Crow-Shaft is funny, ain’t
This year, just like every other year, the company it? And people say it’s a dull, boring company.
reformatted and then rebooted its online search business— Hey, you just don’t know how much fun Bing is going to
Live is dead, and Bing is its latest fling. have. Wait until next year—the following version might be
There is something interesting about Bing! It is trying to called Fling.
become our moral police, for us Indians at least. My-crow- If you know My-crow-shaft well, you can see it coming.
shaft loves highway patrols and control.
This time it is enlisting parents. The firm wants to make
By Swapnil Bhartiya
sure that the next generation has free access to the required
A Free Software fund-a-mental-ist and Charles Bukowski
information. At the same time, parents should be happy fan, Swapnil also writes fiction and tries to find cracks in a
their kids are not getting access to the wrong information. proprietary company’s ‘paper armours’. He is a big movie
If you enter the word ‘sex’ (on the Bing India portal), it will buff, and prefers listening to music at such loud volumes that
warn you with a message that reads, “The search for ‘sex’ may he's gone partially deaf when it comes to identifying anything
positive about proprietary companies. Oh, and he is also the
return sexually explicit content. To get results, change your assistant editor of EFYTimes.com.
search terms.” But if you are looking for specific information and
Image Copyright: Matt Grommes. Released under the Creative Commons Attribution-Share Alike 2.0 Generic licence.
NCOSS-09
Thinking Beyond Just GNU/Linux
The National Conference on Open Source Software, NCOSS-09, was held on May
25 and 26, this year, at the Navi Mumbai campus of C-DAC. It was a step in the right
direction in bringing the open source community closer…offering enthusiasts a
platform for interaction, workshops and some intellectual stimulation.
F
rom being a niche concept Deepak Phatak of IIT Bombay; Prof C R
adopted only by the geeks in Muthukrishnan, former deputy director
its earlier years, Open Source of IIT Chennai, currently advisor to TCS;
Software (OSS) is slowly being and Dr S Ramakrishnan, director general of
welcomed by one and all. Right from desktops C-DAC; gracing the occasion, the event is a
to servers, and from data centres to embedded guaranteed winner.
devices, OSS today powers innumerable Ensuring the success for such a large and
applications. prestigious event requires careful planning and
NCOSS–09, held on May 25-26, 2009, execution. Working in the background was
at the Navi Mumbai campus of C-DAC, Dr M Sasikumar, associate director, C-DAC
brought together the various groups working (Research). He, along with his team, saw to it
on developing open source applications that every aspect—right from logistics, lectures
catering to specific domains in the ICT and presentations, workshop attendance, food
world. These included education, health, and catering, to crowd management, was up to
accessibility, localisation, e-commerce, the mark. When quizzed about the elaborate
disaster management, expert systems, preparations, Dr Sasikumar was upbeat, “This
machine learning, et al. The gathering was a preparation started months in advance when
mix of academia, industry, the open source the call for papers was initialised. The NCOSS
community and government. is intended to act as a forum to promote the
The conference was driven by the OSS adoption of open source software and solutions in
division of C-DAC Mumbai. This group is home different areas, by sharing experiences in solution
to the OSSRC (Open Source Software Resource selection, customisation/adaptation, etc.”
Centre), the first national resource centre in the He went on to add that a record number
area of open source, set up jointly by IIT Bombay, of over 110 papers from all over India were
IBM and C-DAC Mumbai. Besides the C-DAC submitted to the NCOSS committee. Finally,
initiative, the conference was supported by the after a rigorous international refereeing
IEEE CS chapters of Mumbai and Chennai, process, about 30 papers were selected and
along with the Computer Society of India. presented during the conference. Further
And when you have gurus such as Dr clarifying the role of NCOSS, Dr Sasikumar
The participants at NCOSS
says, “NCOSS is conceived of as an academic style Inauguration session: (From left to right) Geroge Arakal, Zia Saquib. Prof C R
conference, on a topic that has practical significance, with a Muthukrishnan, Dr Deepak Phatak and Dr S Ramakrishnan
specific focus on the application layer of open source.”
Let’s get started Zia Saquib, executive director, C-DAC, in his brief speech,
When you have prominent personalities sharing their complimented the various groups at C-DAC on their efforts
experiences, all you do is just sit back and listen. From in the localisation project, and how these were helping
workshop orientation, deploying FOSS applications, and bridge the digital divide. Summing up the inaugural session
sharing user experiences or case study details, it seemed like was George Arakal, director administration, C-DAC, who
one action-packed thriller. (The only dilemma being what to mentioned the uniqueness of NCOSS and how privileged
attend—a lecture or a workshop?) C-DAC was with the ‘Trimurti’ gracing the occasion. He
The keynote address by Prof C R Muthukrishnan on ‘The was obviously referring to the presence of Dr Phatak, Prof
Meaning, Purpose and Spirit of Open Source’ was an eye- Muthukrishnan, and Dr Ramakrishnan. That probably set the
opener. The professor shared his experiences as a mentor to tone for the rest of the conference.
the OSS community. His mention of the software life cycle
and the tension that sets in between the developers and Knowledge redefined
the testing and marketing teams, struck a chord with the After an exciting start, it was the round for interactive
audience. According to the professor, quality control is a sessions. Parallel tracks on knowledge management,
vital element in the success of any operating system and it enterprise application, e-learning/e-commerce, along
all starts with the source code, notwithstanding the ‘time to with thought-provoking demos, were highlights of the
market’ pressures. He further elaborated on interoperability conference. Topics such as knowledge management
issues, and was optimistic on how new phones in the systems using Joomla, node-oriented knowledge
market would make use of open standards. The keynote management, Blender 3D, and Moodle were just some of
was followed by a talk by Dr Phatak, who enthralled the the sessions keeping the audience spellbound.
audience with his witty comments. Highlighting the success The talk on ‘Rapid Scientific Application Development
of ‘Project Eklavya’, he once again stressed upon the need with Python’ presented by Prof Prabhu Ramachandran, IIT
for India’s current role as a ‘net-taker’ to change to that of Bombay, was simply amazing. Python is an ideal language for
a ‘net-giver’ with respect to the worldwide open source rapid application development in the scientific computing
community. Mind you, the fun had just begun. domain, and with several scientists in the audience, it was a
Dr S Ramakrishnan, director general, C-DAC, offered his session where everyone was able to connect instantly. The
own insights on open source. He highlighted the role of OSS demo was interlaced with 2D and 3D graphics, based on GUIs
and how it was making inroads in many fields. “Open source related to aerospace engineering and particle systems, in the
software is maturing rapidly and different stakeholders course of which Prof Ramachandran delighted the audience.
in India are looking at it as a serious option for adoption. The other speaker who had been invited was Shuvam
Government enterprises, the developer community, Misra, CEO, Merce Technologies, who spoke on ‘Open source
academia and users in different verticals have, in recent years, as one point on a continuum’. He took everyone down
made specific moves towards adoption.” And for that very memory lane. C-News, BSD UNIX, the Linux kernel project,
reason, to keep the momentum going, NCOSS was initiated. RHEL, Ubuntu, Debian, and MySQL, were all re-visited.
Quick take
Dr S Srinivasan, research
OSS for their work?
scientist from C-DAC, holds a Awareness and acceptance is the main
doctorate in physics with about factor. Most developers seem to have a
30 years experience in research, negative mindset due to either inertia, a
teaching (at the UG & PG levels fear of the unknown or a misconception
in engineering), information that zero or low cost means ‘cheap’ and,
management, software processes hence, a lack of quality. One needs to have
and quality management. With a positive outlook.
some good funding and time on
Q
hand, he would like to develop So if you had to advise someone
e-learning kiosks, and some
starting a new open source project,
packages for tiny and small-scale
industries. Overall, he is optimistic
what would you say?
about the various developments Try to enhance the features of an existing
in open source. Here’s what we project or adapt/customise a FOSS
spoke of over a short tête-à-tête. package to suit local needs (with limited
features to start with).
Q What kind of projects are you and your team (AU- Q How has C-DAC progressed in dealing
with open source projects and
KBC) working on currently? Is there something that giving back to the community? Could you list the various
you would like to highlight about your work as a project initiatives and success stories?
scientist at C-DAC? We are interacting with various state government
At AU-KBC, the primary focus is on FOSS in higher agencies to implement BOSS and help run e-
education—the introduction of FOSS courses in the governance and other applications. Besides, we are
curriculum, the migration to FOSS in engineering labs, providing training to personnel from government
student projects and training of staff/students, the use of departments, agencies like the Navy, ELCOT, etc.
FOSS tools for various development activities at AU-KBC Other than that, we also provide maintenance and
(Bioinfotracker, Linux Biopuppy, Morphological Analyser, implementation support through a helpdesk and other
Security Bed, Wi-Fi related packages, etc), a short course on interactive means. The progress is steady, though we are
‘Wi-Fi with FOSS’, implementation of FOSS packages like just scratching the surface.
Scilab, Koha, QCad, Talend, etc.
And at C-DAC, the primary focus is the desktop and
server versions of Bharat Operating System Solutions Q Finally, what has your experience been like at
NCOSS-09?
(BOSS), which is a GNU/Linux distro based on Debian— I feel positive, as there is an increasing awareness within
and on adding applications to run on BOSS. the community and a desire to know more. Overall, it has
been instructive learning with respect to how industry
Later in the day, there was a demo-cum-presentation Infotech, and Dr Sasikumar, participated in this discussion.
on Esvaasthya—an open source MIS for Indian hospitals. Content management, collaboration technologies,
Another interesting topic was ‘Self-Help MIS—Enabling e-governance, localisation—these were the keywords on
Financial Inclusion: Door Step Financial Services in Rural everyone’s lips. The idea was to educate people on what
Areas’. The speaker was of the opinion that, “…market forces OSS is all about and to urge them to think beyond GNU/
are tilting towards open standards and there is an increasing Linux. All said and done, NCOSS-09 certainly achieved
demand from customers towards interoperability.” what it had aimed to, and did so with top honours. See
Finally, at the close of the conference, there was a panel you at the next conference.
discussion on ‘Circumventing barriers to FOSS adoption’,
which offered an insight into how the OSS community
By: Nilesh Kakade
is gearing up for a better and brighter future. Shuvam
The author is an editorial consultant to the EFY group. He can
Misra, along with Ghanshyam Bansal from NIC, Venkatesh be contacted at nkakade@rediffmail.com
Hariharan (Venky) from Red Hat, Shrikant Mullik from L&T
ITM, one of the leading technology and management institutes in the country,
could be dubbed a role model for other such institutes. This fascinating case
study will give you an idea about the FOSS-based IT infrastructure of the
institute, and will also help you deploy similar solutions at your organisation.
T
he Institute for Technology The infrastructure
and Management (ITM) was The ITM Navi Mumbai campus is located
founded in association with in the Institutional Area of Kharghar,
the Southern New Hampshire and occupies a total constructed area
University (SNHU), USA. The institute has of over 100,000 square feet (9000 sq m).
expanded its collaborations to include The campus is framed by the scenic hills
distinguished universities across Europe of the Raigad district. It is laid out in a
and Asia, evolving academic programs of rough square flanked by four wings and
international repute. featuring a beautiful landscaped lawn
The ITM Group of Business Schools grew as its centrepiece. The classroom wing
from one business school in Mumbai, to serves as the primary academic building
seven campuses by the year 2004. Starting and features 11 theatre-style, 60-seater
with a two-year full-time masters program classrooms. All students are issued laptops
in 1991, this group currently conducts and Wi-Fi connectivity through the use of
15 programs covering financial markets, access points spread out in the corridors of
retail, pharmaceuticals, healthcare, risk each floor.
management, human resources, etc. The administrative wing houses the
Recently, ITM has been chartered as offices of the 40 full-time faculty members,
a private state university in Chhatisgarh. the director and assistant director, the
The university status allows for greater registrar, research associates, and the
autonomy in the design and deployment accounts department, among others.
of path-breaking new programs, further All staff and faculty are provided with
strengthening ITM’s reputation as a leader in desktops, which include both thick clients
specialised management education. and thin clients.
Open source solutions used by ITM Normal users have no administrative access to any of
the servers.
• Servers: CentOS, Fedora Core 5, Fedora 8, LTSP, Open LDAP, Free All users, including administrators, are
RADIUS, Free NAS and CUPS. authenticated through LDAP servers for network access.
• Desktops: Fedora and Ubuntu Administrators are assigned different privileges on the
• Firewall and proxy: Shorewall and Squid server by the senior systems administrator. All cannot
• Network monitoring: NTop and MRTG work on all servers. Faculty and staff have access only to
• Systems administration: Webmin data in their home directories, Prowess database and to
• Databases: MySQL and PostgresSQL common shared data in the data exchange server. The
• Special applications: Joomla, Asterisk and Moodle faculty and staff can view data on the intranet server.
• Desktop applications: OpenOffice.org, Thunderbird, Firefox, GIMP, All the users in both the networks (staff, faculty
VLC, etc. and students) are authorised users with different levels
of authorisation. The LTSP users (staff and faculty)
the staff and faculty— a few of which are thin clients- are authenticated centrally through the LDAP server.
cum-print servers. The number of laptops available for All students are centrally authenticated through the
students is over 400. RADIUS server. Also, for wireless access, MAC address
bindings are used to assign the IP address to the
Connecting people: networking security authorised students only.
The campus is divided into two independent networks.
The wired network is used mainly by staff and faculty, Security from intruders
while the wireless network is dedicated for students. The gateway and proxy servers that connect to the
Only the data exchange server, the Prowess database Internet run the Shoreline firewall (commonly known as
and intranet server have data common to the faculty Shorewall). All ports on these two machines are closed
and students. In each of these servers, the institute has on the public interface. Even local internal servers
two network cards that provide connectivity to each normally have only need-based ports open. Besides all
group while keeping the networks independent. All the the above restrictions, the ERP, Web and mail servers
servers—including the DNS, DHCP, LDAP, the Web server allow SSH access only from one IP address.
(intranet), LTSPs, NFS, the data exchange server and
the NAS box (back-up server)—are in the staff network, Training day
which is completely isolated from the students. Setting up this kind of an infrastructure that uses a
To provide the much needed and efficient lot of free software solutions needed a lot of expertise.
connectivity among the servers and clients, structured The institute initially hired a consulting company. The
cabling is in place, connecting two server rooms primary role of the company was to set up the LTSP
located at diagonally opposite corners of the campus. server and deploy around 20 thin clients.
The server rooms house the switch racks, with cables This deployment also meant a learning process.
running directly to each machine on the campus or The staff members needed to be trained in using this
one of the many Wi-Fi access points. There are 18 new technology. The secondary responsibility of the
access points by NetGear with RADIUS authentication company was to train the systems administrators
deployed to meet all requirements. who later became trainers themselves. It was now
mandatory for all systems administrators to either be
Security certified before joining, or obtain Red Hat Certification
This kind of widespread network needs a lot of security within one year.
measures—some physical and some at the virtual level. All training for staff and faculty was done in-
Besides physical security, the institute also ensures the house by systems administrators. The institute is now
normal log-in access control to servers. planning to use its experience to train outsiders so
The most important measure to secure servers that others can also reap the benefits of Linux and Free
is at the physical level, with access allowed only to Software technologies.
authorised people. All servers are housed in the two
server rooms, which normally remain locked and the
By Swapnil Bhartiya
keys are only with the senior systems administrator
A Free Software fund-a-mental-ist and Charles Bukowski
during each of the two shifts. fan, Swapnil also writes fiction and tries to find cracks in a
For login-based access control, only senior systems proprietary company’s ‘paper armours’. He is a big movie
administrators have passwords for root access and buff, and prefers listening to music at such loud volumes that
junior administrators have limited access (using sudo) he's gone partially deaf when it comes to identifying anything
positive about proprietary companies. Oh, and he is also the
to servers. All systems administrators have to login assistant editor of EFYTimes.com.
with their own user names and associated passwords.
W
hile working on this story about ITM’s IT infrastucture, I realised that
the face behind the open source implementation was J A Bhavsar,
group head (IT), ITM Business School, Mumbai. So when did he first
get acquainted with GNU/Linux? “I came across Linux in 1999 when
I noticed a Linux installation on my friend’s computer,” he says. That seemed to
sow the seeds of freedom in his mind. Some time later, when ITM was
considering the deployment of GNU/Linux and other free software
solutions at the institute, Bhavsar was ready to take the plunge.
“While the initiative was taken by the chairman, I guided the
implementation with the help of a Mumbai consultancy, The
Argon Company, which is very familiar with Linux. One of the
consultants was Rishi Ganguly, a close friend of Nitin Putcha
(the chairman’s son). Ganguly, who currently works for Apple, is
an avid Linux enthusiast. He knew Richard Stallman, whom he
invited for a talk at TIFR in Chembur, Mumbai, on January 21,
2004. I attended this talk.”
Now, the institute has become a role model for others. Bhavsar
is also vocal about the institute’s willingness to invite outsiders to
get trained on the technologies at the ITM campus. This is the best
way you can ‘pay it forward’ in the FOSS world.
But it was not like he only had to take over an existing GNU/
Linux deployment. The FRESSO stack had to be built from the
ground up. He confides, “My group and a two-member team from
The Argon Company started from scratch.”
Unlike other organisations where business heads are
basically a bit wary of GNU/Linux, at ITM, Bhavsar
confided that, “...both our chairman, Dr
P.V. Ramana, and his son, Nitin Putcha,
were pro Linux.” This was one of
those rare cases where the IT head
did not need to convince the
management with respect
to the deployment of open
source.
Bhavsar recalls,
J A Bhavsar, group head (IT),
Institute for Technology and Management
“Honestly, I did not have to influence them... My user training sessions every six months, even now.”
role was to take on the responsibility to implement All said, I still wondered what the most important
the project, and I just grabbed the opportunity.” If attraction of GNU/Linux was. Bhavsar has a simple
the senior management at all organisations were as answer, “Technically, the fact that it’s robust, secure
well informed as those at ITM, there would be no and least vulnerable to virus attacks attracted us to
stopping the deployment of FOSS. The confidence in the Linux platform. Open source just won our hearts
free software runs deeper today than ever before. In because it is made by altruist individuals and groups with
fact, when it comes to trust, GNU/Linux is considered a humanitarian approach. We believe open source can
the best suitor when compared to proprietary positively change lives in a way few other things can.”
technologies, as today, organisations are interested Going back to the implementation at ITM, one of
not only in something that is merely available and that the biggest challenges in the world of GNU/Linux is the
functions, but also in how the solution works in the availability of so many options. What do you have in the
back-end and how much control they have over it. This proprietary world? Windows or Mac—the devil or the deep
is unlikely in a proprietary solution where you are at blue sea; and that’s the end of your options. But with GNU/
the mercy of the vendor. Linux, the options are unlimited. So, how did Bhavsar and
Bhavsar says, “Cost is just one good reason for using his team find the right solutions for their needs?
open source software. Freedom from vendor lock-in “The consultant helped us take the first few steps.
gives us more flexibility to change to the best-in-class Once we implemented one LTSP supporting 20 users
software as and when required. For example, we started (OpenOffice.org, Firefox, Gaim and Thunderbird)
with MySQL as the database for our ERP, but changed to we started looking for tools commonly required on
PostgresSQL as the volume grew, and speed and reliability educational campuses. The Internet was the best source of
became critical.” information, followed by Linux magazines. Meetings with
When asked specifically about the cost savings due to like-minded people in workshops and seminars also added
migration, he shares, “We have never quantified it, but we to our knowledge.”
would have conservatively saved Rs 600,000 to Rs 800,000 What started at Bhavsar’s campus is now spreading to
per annum on an average. There are over 100 desktops other ITM centres as well. “We now have a few well-trained
running Fedora, and more than 500 students accessing systems administrators who can independently set up
at least four servers (proxy, data, RADIUS and Intranet the base systems required by every centre. Our proxy and
running on separate machines). There are other servers for data servers in Chennai, Bangalore and Warangal use open
LDAP, DHCP and the NAS.” source only. Other centres are lined up for the transition.
But it was not all a bed of roses. “While the We will be adding Intranet servers and NAS (FreeNAS)
management was pro-GNU/Linux, the staff was sceptical. boxes in each of our centres.”
We struggled for the first two years. Later, we met faculty Bhavsar makes it a point to attend any workshop
members who had joined other institutes. They reported or seminar where open source is showcased. He is
on the difference Linux and open source makes in trouble- particularly interested in spreading this culture in
free operation. We then knew we were on a strong footing,” educational institutes, which he feels need it the most.
recalls Bhavsar. He is also planning to hold workshops at a nominal
Bhavsar admits that it was difficult to wean away cost for teachers/professors and IT administrators of
users who had never worked on Linux. He and his team educational institutes.
decided to be the role models, so all IT personnel stopped He sums it with, “We are absolutely sure that
using Windows before asking others to do so. They our model is applicable to any educational institute.
then ensured that one of the IT team members would Currently, we are concentrating on making all our
practically hand-hold users through difficult situations. centres work on FOSS. We would be glad to help train
The first thin client was put in Bhavsar’s office. Today, he any other educational institute’s systems administrator
uses a dual boot laptop (Ubuntu and Win XP Pro). “We who’s willing to come to our Mumbai campus. We would
mostly use XP Pro outside our campus only if external not mind training interested individuals willing to bear
hardware requires it. I have installed FC10 at home for my the incidental expenses.”
daughters to use,” says Bhavsar.
“We had to set up five machines at a time, make
By Swapnil Bhartiya
the desktop look like Windows, train users personally,
A Free Software fund-a-mental-ist and Charles Bukowski
solve all their problems, and move on. We had monthly fan, Swapnil also writes fiction and tries to find cracks in a
training sessions for the first six months, besides proprietary company’s ‘paper armours’. He is a big movie
personally taking care of individual problems on a one- buff, and prefers listening to music at such loud volumes that
to-one basis. Our slogan was: ‘Tell us what you do in he's gone partially deaf when it comes to identifying anything
positive about proprietary companies. Oh, and he is also the
Windows that you can’t do with open source.’ We then assistant editor of EFYTimes.com.
identified an appropriate open source tool. We conduct
Building a
Magazine Website by
I
t was February 2003 when LINUX For You saw its too far away. That, coupled with the fact that this was practically
readers’ faces for the first time. It’s been six years the very first website for the magazine, and the expectations
since then, and the only Indian magazine on open from co-workers, fans and peers had shot sky-high.
source had been struggling and cowering, yet waiting While it was important to make it look good and sexy, our
patiently to make its presence felt on the Web. While main focus had always been on the features offered by the
the domain LinuxForU.com had been a part of our website. We tried to highlight the Web 2.0 elements of the site,
editorial offerings for almost as long, it laid dormant making it more interactive and content oriented.
until very recently, when the project was revived all over again Coming from a magazine that promotes Free and
with more enthusiasm and determination! Open Source Software, it was a welcome surprise when I
The road to success wasn’t a very sweet one, but it was asked to write a feature outlining the development of
was absolutely pleasurable and very thought-provoking. the website. I was also thrilled to know that LFY plans to
After the debates, cups of tea, innumerable PJs and the share the source code of the website (minus the database,
intense philosophical discussions, we started looking at of course) with its readers. No, we aren’t afraid of criticism
LINUX For You with a very different outlook. There were or rotten tomatoes. Rather, what got us excited was the
a lot of deliberations and immense amount of time spent chance to learn, the scope to improve the site, and the
before we decided on every single aspect of the site, be beauty of going open source the true way!
it the categorisation, the CMS, the colour scheme or a
simple CSS styling for the <pre> tag; the experience was Why do we use CMSs?
immensely educating. Everybody loves Wikipedia, don’t they? Well, allow me to
While building a website for a magazine that already has quote Wikipedia in my efforts to define what a content
such a huge following with a technical bend, the jitters are never management system might be:
In favour of a CMS—Why?
Content modelling and storage: This
is the process by which you take the
content you want to manage, and
turn it into data that the system can
process and store. A mature CMS
makes it absolutely easy for the Web
master to create the flow of the
content, and even facilitates easy
storage and retrieval of the data.
Compare a CMS with cup noodles.
It’s all ready—all you need to do is
pour some water and leave it aside
for a minute or so.
Content editing: In my brief Web
developing career, there have been
times when the choice of CMS was
Press
decided by the kind of text editor it
offers. Well, while you’d always feel
compelled to rubbish that line of
thought, as a Web master, it does
make a lot of sense at the end of the
day. Ideally, the job of a Web master
is the management of a website
and not content population. Now,
unless the person assigned to
“A
populate the site is well-versed with
content HTML tags and style sheets, the
management system ease of use and the power of the
(CMS) such as a editor become important factors
document management to be considered. Of course, most
system (DMS) is a computer modern-day editors allow you to
application used to edit the raw HTML of your content,
manage workflow needed in the same window, thus giving
to collaboratively create, you more power and flexibility.
edit, review, index, search, Here, I’d like to mention
publish and archive various a thought that just crossed my
kinds of digital media and mind. I remember, while designing
electronic text.” a website for one of our sister
Okay, that actually made the concerns, itmagz.com (it’s on
concept seem a little more confusing, Joomla), the content editor was
didn’t it? In layman terms, a CMS very basic and needed me to set
is a software that helps you to up my HTML editor from the site’s
publish and manage content preference menu. It used to freak
online, in a much easier and more me out every time, until I decided
efficient way. Traditionally, it used to go ahead and install JCE as the
to take considerable knowledge and new editor.
experience in HTML, PHP (server- Publishing and templating: One of
side programming languages) and the most important focus points
JavaScript to be able to churn out a every time you get on to developing
‘professional-looking’ website. A CMS a new website is a ‘spanking new’
is designed to make your life easier look and feel. It is a well-known
fact that every CMS has default 2. I am not a PHP developer but I WordPress is an innovative and
‘theming’ that stays the same, no can create magic with CSS :-) This revolutionary self-hosted personal
matter how many times you install meant that developing a theme blog publishing system that allows
a new theme off the Web. Be it right from scratch was out of the bloggers to develop and maintain their
Drupal, WordPress or Joomla (even question and we had to look out own blogs or websites. Its usability
Tumblr, as a matter of fact), it needs for customisation on existing and sophistication stem from the
an insane amount of customisation ones. While scouring the Web for fact that as an open source project,
to make a site work “just the way magazine themes, we realised that countless people worldwide have
you want it to”. the free ones available for Drupal participated in the development and
Low maintenance cost: For a were too vanilla, and we were hell- ongoing refinement of the platform for
longer run, the maintenance bent on developing the website with the community. The ease and non-
cost for an open source CMS is freely available resources. This gave technical aspect of WordPress opened
absolutely low, because most of WordPress a big thumbs up. the blogging world to everyone,
the development work is done by 3. When it comes to search engine including those with minimum
the community. Of course, there is optimising a website, Joomla could computer experience.
always the need to upgrade a CMS never beat WordPress or Drupal. WordPress was born out
every once in a while, to be able to This is one aspect where Joomla of a desire for an elegant, well-
use the latest features. But make lags behind. architectured personal publishing
it a golden rule to always install 4. Just while we were tied between system built on PHP and MySQL, and
a version lower than the current Drupal and WordPress, we had licensed under the GPL. WordPress
one (unless it’s a major version to take a call because WordPress is fresh software, but its roots and
upgrade) so as to guarantee will never be as scalable a CMS as development go back to 2001.
yourself better tech and forum Drupal is. On the other hand, I had It was in 2005 that WordPress
support, along with more tried never touched Drupal before. released version 1.5, making theming
and tested plug-ins and modules. There were decisions to be taken and possible, and this paved the way for its
a lot of cigarettes were stubbed out rise in popularity and fame. Bloggers
Requirements of LinuxForU.com in our quest for that ideal CMS, when and website owners could then
This was the trickiest part during the finally WordPress’ easy-to-use editor, personalise their sites with specific
development process of the website. the ease of adding captions to images, themes, layouts, colour schemes, etc, to
While we were clear about the fact that and the level of flexibility available suit their personal needs, and best of all,
we would publish all the content from took the trophy away and we ended for free. Although having a blog/website
our previous issues under the Creative up downloading the then-latest organised with a free WordPress theme
Commons Attribution Share-Alike WordPress 2.7.1 while also looking is great, it did have its disadvantages.
license, we had no other concrete out for that ever-elusive, free and The theme designs tend to be generic
plans. Hailing from the social media ‘perfect’ theme for LinuxForU.com. and not offer a wide selection of quality
background myself, I was adamant on styles to choose from. Blogs all over the
keeping the website user friendly and A History Internet looked the same without much
building in a few Web 2.0 elements When you write about the evolution originality; in addition, the free themes
that would help us stay in touch with of any technology, it is tempting to lacked a lot of advanced functionalities.
our readers, and also help them with quote Wikipedia and fish out what Hence, the WordPress premium
their queries with the least possible the community has to say about theme industry took off. With the
“W
delay. Thus started our journey of WordPress: growing popularity of WordPress as a
scouting for a suitable CMS to start the ordPress is blogging platform, there were more free
development on. a free and and premium themes in the market,
While considering the various open source which again contributed to the rise
CMSs available, we finally narrowed blog publishing in WP’s popularity, thus creating a
down on Drupal, WordPress and application and vicious circle. Moreover, this had also
Joomla. Now the decisions weren’t as Content Management allowed bloggers and website designers
much technical as strategic. Here’s why: System. WordPress is to choose from a wide variety of great
1. Since I had already developed the official successor of designs and be able to customise
itmagz.com on Joomla, I preferred b2\cafelog, which was their sites using tools and plug-ins
another CMS that would give it developed by Michel not available with most free themes.
more flexibility with theming and Valdrighi. The latest Some of the advantages of purchasing a
Web 2.0 implementation. This made release of WordPress is WordPress premium theme include:
us favour Drupal and WordPress version 2.8, released on a wide variety of excellent designs
over Joomla. 11 June, 2009.” for originality
b
achieved by creating little graphic strips
on the GIMP, I was torn between using Feature requirements
images or CSS styling to achieve the THE COMPLETE PORTAL ON OPEN SOURCE
1. While we were brainstorming
c
rounded corner effect. While this could on the feature requirements for
easily be achieved using the CSS styling LinuxForU.com, there were a lot
rule -moz-border-radius—this styling of debates on how the content
is effective only on Mozilla Firefox d ought to be customised. Although
and other Gecko-based browsers. THE COMPLETE PORTAL ON OPEN SOURCE
I, personally, was in favour of
This meant that the corners stayed Figure 1: LFY progressive logos genre-based categorisation, not
rectangular for our visitors on Opera, many felt good about changing
Chrome, Safari and IE. Initially we design in Figure 1-b. While we still gave the categorisation structure from
had felt that we’d let it stay that way, the same importance to ‘LINUX’, we that of the magazine. While you
publicly disclosing that we have made were quick to realise that the ‘FOR YOU’ wish to give your product an image
the website look more beautiful only brand still had a long way to go before overhaul, it becomes very hard to
for those with an open source browser it earned the right to capture as much ignore your legacy and the norms
(sadly, Chromium was excluded). screen space as ‘LINUX’. So, we reduced that you have been following all
However, we later changed our stance the size and formulated the design in these years. This finally resulted
and decided to transform the edges into Figure 1-c. in a compromise—we decided to
images. Although the menu bar would I do not know if you’d believe us but allow our readers to choose the
still be rounded only for the Gecko this logo actually got us very sad. Why, way they wanted the content to
based browsers! :-) you might ask. Well, we love Linux and be categorised. This very idea later
Now that we managed to put the everything to do with it. However, in the made me wonder (without being
‘theme wars’ to rest, we moved on to logo, the ‘FOR YOU’ (that symbolises intentionally narcissistic) why didn’t
more serious jobs, i.e., hacking into the us) seemed to be very disassociated other content-based portals all over
core PHP of the theme. with ‘LINUX’ and we rejected it the Web follow the same pattern?
immediately. 2. One of our major concerns was
Redesigning the LFY logo We went back to the drawing board the ‘Archives’ page. Since we plan
This was the toughest decision for and started rethinking the role of LFY to put up all the content from our
us—redesigning the LFY logo. It takes in our readers’ life. We felt, we still exist previous issues, online, the content
years, even decades, to build up a brand because we managed to cater news, needed to be easily searchable and
and win recognition for it. At that point, reviews and resources on Linux and browse-able by visitors. Moreover,
a decision to revamp the very image open source to our readers, and this is while we were building a website, at
that defines a brand can give any CEO what makes us survive and also find the end of the day it actually was an
a heart attack. So, we were very afraid so much love around. This gave rise extension of the magazine itself. So
to experiment with the current design to the very wacky idea of us being a while we aimed at a revamp, it was
of LFY’s logo (Figure 1-a). Thousands courier service that brings ‘LINUX’ to also important for us to maintain
of readers around the country have our readers’ homes and hence we got the feel of a magazine’s website.
come to associate this logo with our the idea of the courier service’s sticker 3. While the existing ‘commenting’
beloved magazine. How do we change pasted on top of the ‘consignment’, feature of WordPress is pretty nifty,
all of that, overnight? Yet, there was this I always used to search around for
burning flame in our hearts to usher Ajax-based commenting. Moreover,
in a change, a revolution, and we went THE COMPLETE MAGAZINE ON OPEN SOURCE
I also wanted the comments to be
about our task. editable by our readers, but only
We started slowly, without trying up to 15 minutes of the comment
to be radical. We needed to understand getting published.
which part of our logo needed more Figure 2: Another option, we considered 4. “Before you expect something
weightage. So, we broke up the logo into from others, always think of how
THE COMPLETE MAGAZINE ON OPEN SOURCE
three pieces, ‘LINUX’, ‘FOR YOU’ and BE TA to give out.” It was this principle
the tag line. Speaking of branding, we that made us wonder if there
were very cautious about the ‘FOR YOU’ could be anything we could give
bit, and started getting a bit narcissistic to our readers for commenting on
as we went along, paving the way to the Figure 3: The final logo our website. Of course, it always
FileZilla: FileZilla is an FTP client feed’s address, and FeedBurner gives en.wikipedia.org/wiki/Google_
that basically lets you connect to a you a new feed address to replace Analytics for more information.)
server that has FTP access enabled. it with. When people subscribe to
Once connected, it lets you upload your new FeedBurner address, the Plug-ins incorporated!
and download files and directory service starts tracking subscriptions. Plug-ins are a great way to extend the
structures. It can also perform This process is called ‘burning functionality of anything, be it your
basic actions like changing the file your feed’. To learn more about desktop application, a device hardware
attributes. FeedBurner and RSS feeds, check or even a CMS. One of the major
FileZilla can handle multiple out technosailor.com/2006/11/29/ reasons the open source CMSs became
transfer threads at the same time. review-of-feedburner. popular was their capability of being
This is especially helpful if you are Google Webmaster tools: This extended effortlessly and without any
transferring a lot of little files. It also is a must if you want your site to programming knowledge, just by using
has a nice keep-alive function that be optimised for Google’s search plug-ins. Yes, even LinuxForU.com uses
will keep your FTP connection open algorithm. It will tell you when the quite a few plug-ins, a lot more than
and available. Since most Web hosts last Google crawler visit occurred, what I’d have liked. Allow me to list the
will close the connection after a what kind of errors are encountered most important ones here and also
couple of minutes of no activity, this in your website, and the most mention why we installed them.
will prevent no end of frustration important is your ‘prefer domain’. Advanced Excerpt: This plug-in
if you are making a bunch of little Google Web master tools are free extends the functionality of the
tweaks and changes on your site. to use, which was a wonderful default wp_excerpt() function
One gripe with FileZilla is surprise—that Google actually by allowing you to specify the
that you cannot have simultaneous came up with this tool to make the character length for the excerpts
connections to multiple servers. I Web master’s life easier. and also the addition of HTML
sometimes find this necessary while If you often wonder why markups.
developing websites, and the only you didn’t do too well in Google’s CommentLuv: This plug-in has
option is to get the files required to ranking, this tool might help you been used to show a link to the last
the local machine and then move to detect the problem. Anyway, post from the commenters’ blog by
them to the other server. But it is it works fine but still lacks some parsing the feed at their given URL
quite cumbersome, and this feature important features. We encountered when they leave a comment. This
is absolutely desirable. some trouble figuring out what had was what we came up with when
Browsers (Firefox, Opera, IE, caused the errors in our website, we wondered what more could be
Google Chrome): Yes, I have and there was not much assistance offered to a commenter!
been booting into Windows to fix the errors other than just Editor Extender: Despite
pretty regularly. Why? Because showing the error messages. For the default TinyMCE editor of
IEs4Linux proved to be inaccurate future releases, we hope this tool WordPress being pretty feature-
in rendering the site’s CSS and it will become more intelligent and rich, it lacked the capability to
was important for me to know help us, step by step, in solving create tables. This was achieved
how the site fared on IE 6, 7 and issues that may crop up. by ‘extending’ the functionality of
8. Moreover, despite the presence Google Analytics: Google WordPress’ default editor using this
of the open source Webkit-based Analytics is one of the best tools plug-in.
browser called Arora, it is very basic out there for analysing traffic Live Comment Preview: A
compared to Chrome and Safari. on your website. With a little bit lot of us use HTML tags while
So I did need the afore-mentioned of setting up, it will give you an commenting on a blog and more
browsers to test the usability, look enormous amount of information often than not end up using the
and navigability of LinuxForU.com. about who is coming to your site, preview feature just to make sure
what they’re looking for, and how the comment looks the way we
Webmaster tools they’re getting there. In fact, it has want it to. Well, we just made life
FeedBurner: As far as RSS goes, so much information that it can be easier for you and provided you
FeedBurner is the hottest feed overwhelming! Google Analytics with a live preview of whatever you
management technology. If you shows you how people found your want to write to us about. Happy
thought RSS was powerful before, site, how they explored it, and commenting!
it’s ten times as useful when how you can enhance their visitor Most Commented: We have three
powered by their proprietary experience. With this information, tabs at the sidebar, one of which
tracking and enhancement you can improve the return on sorts the articles on the basis of the
technologies. When you sign up for investment of your website and number of comments received. This
FeedBurner, you give it your RSS increase conversions. (Check out helps in featuring popular content
on every single page of the site, pre { Oh yes, we used Gravatar as our
inspiring our authors to come up -x-system-font: none; image service to show authors'
with better content, every time! background: #F6F6F6 none repeat scroll photos. Gravatar stands for
Search Everything: Previously, our 0 0; Globally Recognised Avatar. To
search algorithm would search only border: 2px solid #EEEEEE; create a gravatar, you need to visit
the tags and words in the articles, display: block; www.gravatar.com and create an
but neither the excerpts nor the font: 0.9em ‘andale mono’, ‘lucida account. While doing so, make
categories that an article had been console’, monospace; sure you give the same e-mail
classified into, which was achieved font-size-adjust: none; address and nickname that you
by installing this plug-in. font-stretch: normal; intend to use when you leave a
WordPress Related Posts: As font-style: normal; comment at LinuxForU.com.
already mentioned, it was an font-variant: normal;
important requirement from our font-weight: normal; Bug reports
side to be able to feature articles line-height: 1.5; 1. The ‘Archives’ page is still not
related to those you read on the site. margin: 0.5em; ready. Although we have shared
Hence the plug-in. overflow-x: auto; the page in this issue’s CD, along
WP Ajax Edit Comments: This overflow-y: hidden; with the rest of the site, we still
allows both the admins and users padding: 10px; haven’t made the link go live.
to edit the comments inline. It also } While we are able to list out
allows the admins to edit every code{ articles the way we want to,
single comment on the website. font: 0.9em ‘andale mono’, ‘lucida unfortunately other links also get
Flexo Archives: We wanted to console’, monospace; created where there is not a single
sort the articles in our ‘Archives’ font-size-adjust: none; article to show. Of course, if you
page according to the year they font-stretch: normal; manage to figure out the problem,
were published. Moreover, we also font-style: normal; you are more than welcome to
plan to feature content on the site font-variant: normal; share the solution with us. :-)
that has never been published font-weight: normal; 2. While the article is not supposed
in the magazine, and did not color: #F68B1F; to reload while commenting (isn’t
want such articles to be featured } that what AJAX is for?) it still does.
in the archives section. Plus, 3. We find the menu and featured
despite none of us being experts Author Bio: WordPress already content rotator not performing up
in JavaScript, we wanted the pull stores details about an author in to the mark – they’re a bit slow.
down functionality in our archives the database. All we needed to do 4. The featured content rotator has
page, and hence ended up using was use the following piece of code been set to automatic and yet it
the Flexo Archives plug-in. wherever we needed to feature the has to be changed manually.
author’s bio: So are you wondering why we’ve
Other customisations also highlighted the bugs in LinuxForU.
Changing the site's layout <?php com? Well, call us smart, call us
according to the categorisation: $AuthorEmail = get_the_author_email(); shrewd—we do expect you to take a
The idea behind the change was $GravURL = get_bloginfo(‘template_ look at our site’s source, improvise on
to set up a cookie every time a directory’); it and even pass it on! ;-)
button is pressed. It is the cookie $Grav = get_avatar( $email = P.S. The source code for
that will decide the layout. For the $AuthorEmail, $size = 85, $default = $GravURL . LinuxForU.com website is included
source code, you can refer to LFY’s ‘/images/default-author-image.jpg’ ); in the LFY CD. And of course, you get
CD and browse to linuxforu/wp- ?> the “four essential freedoms” along
content/themes/thestars/header. <?php with this too.
php and linuxforu/wp-content/ $authordesc = $authordata->user_
themes/thestars/home.php (relevant description;
documentation has been provided $AuthorDescription = apply_filters(
By: Sayantan Pal
with the code). ‘archive_meta’,’<div class=”random-class”>’ . An avid Twitter user and a social media
enthusiast, the author is a passionate
Different CSS styling for <pre> $authordesc . ‘</div>’ );
blogger and a professional gamer
and <code> tags: Since we needed if ( !empty($authordesc) ) echo ‘<div too. He also feels compelled to be
different styling for the two tags, class=”author-meta”>’,’<div class=”author- opinionated about anything that comes
we had to rewrite the CSS rules as avatar”>’ . $Grav . ‘</div>’ . $AuthorDescription . his way, be it Linux distributions, our
marketing strategies, table etiquettes or
follows ( found in linuxforu/wp- ‘</div>’;
even the fabled Ramsay movies!
content/themes/thestars/master.css): ?>
Collaborate
in an Innovative Way
Among all the innovation happening around free software is Cyn.in, an
innovative business model that makes open source software a profitable
commercial product.
I
nnovation drives business; Core features
innovation creates new The core capabilities of Cyn.in are to securely
businesses—innovation is business. and rapidly store, retrieve, co-author and
You will find a lot of proprietary discuss any form of digital content within
companies playing hide and seek and then virtual work areas called ‘Spaces’. Over these
patting their own backs for their so-called core capabilities, a layer of ‘content applications’
innovations. They also seem to suggest that such as wikis, blogs, bookmarks, image/video/
if you are creating something innovative, you audio galleries, file repositories etc, provide for
must lock the code in your trunk. But the free easy knowledge collaboration between users
software world follows a different philosophy with diverse needs. “A key differentiator of Cyn.
of innovation. We have all heard the saying: in is that, unlike most collaboration suites
“Necessity is the mother of all inventions” available for the enterprise, it is not a set of
– something that the free software world lives diverse applications loosely coupled into a suite.
by. However, the proprietary corporate world On the contrary, more than 85 per cent of Cyn.
likes to go by the rule, “Innovate and create a in’s features are common across the platform,”
need so that you can rule.” explains Romasha.
Cyn.in is primarily a collaboration tool and Google recently launched Wave, which
platform that enables businesses to connect the search engine giant claims to reform the
their people with each other and share their way people communicate over the Internet. It
collective knowledge. The tool makes it easy for seems Cyn.in already does most of it. So, how
employees to work with each other and with different would Wave be from Cyn.in? “Yes, we
key stakeholders outside the company. Users have been quite excited internally about the
on board the platform can share knowledge, get Google Wave announcement. There is a strong
answers, improve decision-making, and hence similarity in end goals (i.e., eventually making
work much faster and productively. e-mail obsolete!), and also in some levels in the
“Think of it as a ‘Facebook+Wikipedia for user experience of the two offerings. However,
businesses’, that a company of any size can set we are solving the problems at different levels.
up within its corporate network. It combines While Cyn.in aims at being a convergence
the capabilities of various collaborative social point for all kinds of knowledge collaboration,
applications like wikis, blogs, file repositories, Wave looks at content communication from a
microblogging, discussions, event calendars and protocol perspective, and focuses on providing
more, into a single seamless platform. Teams a foundation and open standards for the same,"
use these tools to create, share and discuss opines Romasha.
knowledge using an intuitive Web interface “For Wave to be greatly successful, it
or a rich desktop client,” says Romasha Roy would need to be adopted and integrated with
Choudhury, business director–Cyn.in, Cynapse. collaboration platforms such as Cyn.in. The
Smartbooks
The Return of Linux?
Does the arrival of smartbooks powered by Qualcomm’s Snapdragon platform
herald a new era of popularity for Linux?
W
hen Asus launched the original Qualcomm throws the dice!
eeePC more than a year ago, However, the rumours of Linux’s demise in
many industry observers felt the netbook segment might be premature.
that the move finally heralded Qualcomm recently added a whole new spin
the arrival of Linux in mainstream consumer to the netbook segment by introducing what it
products. Although Linux had been around for termed ‘smartbooks’, devices that are a blend
a while, and was being offered by a number of of notebooks and smartphones. Most of the
manufacturers (such as Dell) on their systems, attention has been on the Snapdragon ARM
the eeePC was perhaps the first occasion that processors powering these devices and the
a Linux-based device had caught the popular fact that they come with integrated Bluetooth,
imagination. It was felt that different flavours of GPS, HSPA+ and Wi-Fi, apart from ensuring
Linux would dominate the netbook segment (to longer battery life. However, what has not
which devices like the eeePC belonged) as their been highlighted is that these devices are not
system requirements were few and were much shrunk notebooks but more like expanded
faster than Windows Vista, Microsoft’s then-new smartphones. The devices are actually closer
operating system. to cell phones than to notebooks, coming with
Microsoft, however, trumped all in-built connectivity features that one tends to
expectations when it decided to make its find in smartphones. In essence, a smartbook
popular Windows XP available for netbook is going to be a device that has a cell phone-
manufacturers. Naturally, most consumers like interface and features, but with a larger
gravitated towards the familiar interface screen and keypad—shades of Palm’s ill-fated
and Intel, releasing its Atom processor for Foleo, a notebook that could be paired with a
netbooks, increased their processing power smartphone to access features that were on
significantly. The Wintel (Windows+Intel) the phone.
partnership virtually took over the netbook What makes this cell phone linkage
segment as well. That is not to say that important is that smartbooks are not likely to
Linux was totally wiped out from these be running conventional desktop operating
devices—the less expensive netbooks still systems like Ubuntu or Windows, but tweaked
came with versions of Linux on them, but the versions of cell phone operating systems. And
possibilities of a “netbook=Linux” equation this is exactly where many observers feel that
that the original eeePC had established, no Linux might suddenly return to the mainstream.
longer existed. In fact, as Atom processors Many of the manufacturers believed to be
got more powerful, Microsoft even took a leaf working on smartbooks are actually considering
out of Ubuntu’s book and announced plans using Android, Google’s much-publicised open
to have a special version of its forthcoming source mobile OS, for their devices. Qualcomm
operating system, Windows 7, for netbooks. actually showed a version of the eeePC running
Linux seemed to have had its brief day in the Android, while Acer announced that it would
tech sun, just as it had with the Moto Ming in be coming out with an Android-driven netbook
the smartphone segment a few years ago, and (not smartbook, do note) later this year. Besides,
looked set to be consigned to the sidelines. with HP believed to be working on Android-
driven smartbooks and Nokia suddenly reviving work on applications that will make Linux the killer OS for smartbooks.
Maemo (its Linux platform for UMPCs), you can see why Right now, there is a lot of optimism, but a great deal of
observers suddenly feel that Linux is on its way back to the confusion—people are not even sure whether all smartbooks
computing mainstream. will have touchscreens or whether they will be keypad/keyboard
driven. Similarly, critics have been quick to point out that the
Android on smartbooks: the challenges Android platform does not have the kind of applications that
Of course, it would be very premature for those in the open most smartphone users need—we are still waiting for a viable
source camp to start popping the champagne. We have not yet mobile version of OpenOffice.org and of Firefox.
seen a commercial smartbook or an Android-driven computer Compatibility with different hardware will also be an
in the market yet. And are not likely to for a few months. But issue. And then there is the threat of Microsoft, which many
analysts are quick to point out that Android is best suited feel could just tweak its Windows Mobile platform to meet
to take advantage of smartbooks as it is designed for a the needs of smartbooks. There are rumours circulating
mobile interface. And being open source, it can be tweaked that Windows Mobile 7 will actually be like Windows 7 in its
very easily to meet the needs of different devices. Of course, interface, while incorporating the mobility-friendly features
there is nothing stopping a user from installing Windows of Windows Mobile. Now, that would make it a formidable
on a smartbook, but the desktop version of Windows is not challenger in the smartbook segment.
designed to take advantage of mobility features like HSPA All this is, of course, just speculation. As of now, what we do
connectivity or GPS, and this would stop the device from know is that there is a new gadget in town called a smartbook.
functioning at its best. Yes, Windows does have a mobile avatar, And that in all probability, it will come loaded with an OS based
but its popularity is very limited in the phone segment, which on Linux. We do not know how long this state of affairs will
is dominated by Symbian. What’s more, Android is perhaps persist. But the very fact that it exists, provides an enormous
the first Linux/open source OS to have caught the public opportunity for Linux to return to the mainstream!
imagination, mainly because of Google’s involvement in it. With
Android powering Linux devices, they might finally acquire By: Nimish Dubey
that quality rarely found in the Linux world—aspirational value! The author is a freelance writer with a passion for IT. He can be
reached at nimishdubey@gmail.com
But these are early days. The ball is now squarely in the court
of the developer community to come up with an interface and
Burn It Up!
The Best Linux Burning Apps
I
guess most of us swear by experience about it with you all. But I then
K3b when it comes to a Linux- thought, what about other alternatives?
based disc burning application. In this article, I present you the best
The K3b developers have been Linux CD burning software. In addition
busy with releasing a Qt4 version of the to K3b 1.65 Alpha, I’ve chosen Nero Linux
venerable application targeting the KDE4 3.5 and Brasero 2.26.1 for testing. The test
desktop. Recently, I took the alpha version system comprises Mandriva 2009.1 KDE
for a test drive and wanted to share my with a Samsung 22x DVD burner.
Brasero 2.26.1
Brasero started as a voluntary
GNOME project, and has recently
become an integral part of it. It
is now the official disc burning
software in GNOME, though the
Nautilus burner is still shipped along
side Brasero.
In short, Brasero is all about cannot be overlooked. Added to
simplicity. You just couldn’t go that, there is no support for Blu-
wrong here. Brasero offers the File change notification (requires Ray at present. Adding media files
easiest to use interface you can kernel > 2.6.13) in bulk is not possible, so you need
ever come across with any sort of A customisable GUI (when used to search and browse repeatedly to
burning software. It might not be with GDL) add files. A bulk dropper is a must!
as feature rich as Nero and K3b, but Supports Drag and Drop/Cut Also, it takes a lot of time scanning
it’s apt for lay persons looking to get and Paste from Nautilus (and for media files.
their work done. others apps)
Brasero doesn’t sport Blu-Ray Can use files on a network as
or HD-DVD support. It didn’t long as the protocol is handled
Brasero 2.26.1
even burn single files above 4GB. by GNOME-vfs
However, unlike K3b, Brasero Can search for files thanks
notifies the user that it cannot to Beagle (search is based on
burn files over 4GB in advance. keywords or on file type) Pros: Easy to use, decent
Some basic features that Brasero Can display a playlist and its burning speed, good for
low-end usage.
boasts of are: contents (note that playlists are
Data CD/DVD automatically searched through Cons: No support for Blue-ray
and HD-DVD, less
Audio CD Beagle) features, doesn’t support
CD/DVD Copy All disc IO is done advanced ripping &
burning options like the
Erase CD/DVD asynchronously to prevent the other two.
Save/load projects application from blocking
Platform: All distro supported
Burn CD/DVD images and cue Brasero is quite simple to use
Price: Free (as in beer)
files and suits everyone, but the lack of
Song, image and video previewer features—especially the inability to Website: www.gnome.org/
projects/brasero
Device detection thanks to HAL burn a single file of size over 4GB—
After burn marks have the licensed OEM disc, then go for it. For anything
Contrary to what people think, the disc burning else, K3b has the upper hand.
scenario is pretty despairing in Linux—the only
software I can vouch for right now seems to be Resources
Nero. Apart from the lack of ripping features, it has • Nero Linux: http://www.nero.com/ena/linux3-features.html
everything a reliable software must provide. The • K3b: http://k3b.plainblack.com/k3b-news
inability of K3b and Brasero to burn larger file sizes • Brasero: http://projects.gnome.org/brasero/
cannot be ignored, and something must be done • Linux burners UDF incompatibility: http://support.microsoft.
com/kb/899527/
to fill the gaps so that they can compete with paid
alternatives. K3b still has some great and usable tools,
and is certainly more feature-rich than Brasero. By: Shashwat Pant
It is sad that major players like Roxio and Cyberlink The author is a FOSS enthusiast interested in QT programming
and technology. He is fond of reviewing the latest OSS tools
haven’t introduced their offering to the Linux market and distros.
yet, and until then, I guess it’s Nero Linux for me. If you
F
lock 2.5 is an open source from the start, though. The ‘My World’
browser, scheduled around tab—set as your home page by default—is
the Gecko rendering engine devoted to collating your favourite stuff in
that takes off at a good one single view. It’s made up of a series of
starting point: Mozilla Firefox. While it is widgets that you can customise to display
built on Mozilla’s Firefox codebase, it tends content from video and photo sites, RSS
to specialise in providing social networking feeds, saved searches from Twitter and
and Web 2.0 facilities built into its user useful bookmarks.
interface. With the Firefox base, Flock
has incorporated new modules and has How is a ‘social Web browser’
improved some aspects like graphics (three- different?
dimensional icons) and new features like While support from Twitter and Facebook
sharing bookmarks online, an integrated tool had been present in Flock right from its
for creating and maintaining blogs, etc, while inception, the browser now allows you to
maintaining what made Firefox successful search the Twitter timeline and also keep
in the first place—extensions, lockout of them in History so that you can access
automatic pop-ups, etc. them as and when you wish. Now, this is a
very nifty feature because it lets you stay
What’s the hype all about? on top of trending topics on the micro-
Flock is designed to streamline how you blogging network. Another great and useful
interface with social networking sites, RSS feature is the automatic shortening of
and media feeds, and blogs. Because it’s built URLs that are shared on Twitter.
on Firefox 3, its behaviour will seem familiar For the first time, Flock has integrated
and it supports most—but not all—Firefox Facebook chat within the browser. While
extensions. And yes, the ‘awesome bar’ is part the side bar sits pretty, at the left of the
of the latest version. browser, you can keep sharing content
The social media add-ons are apparent with your contacts while reading the latest
Extensions, Part 2
This is a continuation of the article ‘Enrich OpenOffice.org with Extensions’
published last month.
I
n the previous article, we Creating a client application is a
have looked at how to develop straightforward File→New Project→
two types of extensions— OpenOffice.org→OpenOffice.org Client
add-ons and add-ins. This Application. In the next screen, fill in a
time we’ll discuss the remaining two project name, say SimpleClient, and a
extensions—client applications and suitable package name like org.lfy.example.
UNO components—in addition to more That’s it! Your client application project has
discussions on UNO, a component model been successfully set up.
used for programmability. Now go to ‘Project explorer’ and
open the code for the main method
Client applications in SimpleClient.java: SimpleClient→
A client application is a stand-alone Source Packages→org.lfy.example→
J2SE application that can bootstrap a SimpleClient.java.
UNO environment and start the default A default code to bootstrap office
OpenOffice.org, or connect to a running instance is presented in the main method.
instance. A client application project is Replace that with the following code,
nothing but a standard Java project with which is used to load a new Calc document
an added OpenOffice.org library. As APIs when this client application is run.
are integrated into NetBeans, features
like code completion, error highlighting, try {
the automatic import of packages, etc, XComponentContext xContext = Bootstrap.
are available. bootstrap();
if (xContext == null) {
System.err.println(“ERROR: Could not bootstrap default Office.”);
System.exit(0);
}
XMultiComponentFactory xMCF = xContext.getServiceManager();
Object desktop= xMCF.createInstanceWithContext(“com.sun.star.
frame.Desktop”, xContext);
XComponentLoader xComponentLoader = (XComponentLoader)
UnoRuntime.queryInterface(XComponentLoader.class, desktop);
PropertyValue [] loadProps = new PropertyValue [0];
XComponent xComponent = xComponentLoader.loadComponentFro
Figure 1: The UNO architecture [source udk.openoffice.org]
mURL(“private:factory/scalc”, “_blank”, 0, loadProps);
}catch (java.lang.Exception e){
e.printStackTrace();
}finally {
System.exit(0);
}
long xCount;
public int getCount()
{
return xCount;
Figure 5: The added service }
public void setCount(int nCount)
UNO components {
Ref: This is a modified example from the tutorial xCount=nCount;
on Uno/Cpp Component by Daniel Bölzle from the }
OpenOffice.org wiki. This example is implemented in public int increment()
Java with the NetBeans approach. {
A UNO component is an implementation of one xCount++;
or more services provided by UNO or by creating return xCount;
new ones. A service typically wraps interfaces and }
properties to avail attributes and methods defined in public int decrement()
those interfaces. {
# /etc/init.d/sendmail start
Access Windows shares from the
Then, send mails using either the mail or mutt terminal
command: The following command will help you to access the
Windows shares from Linux systems:
# echo “body of the mail” | mail -s “subject of the mail” toAddress
# mkdir /mnt/win
Give the recipient’s mail ID in place of # mount -t cifs //server-ip-or-name/share /mnt/win -o username=user,pa
toAddress. ssword=pass,domain=DOMAIN
As for the body of the mail, you can also
redirect it from a file, as follows: And to unmount the share, use the command given
below:
# mail -s “subject of the mail” toaddress < body_mail.txt
# umount /mnt/win
If you want to send a file as an attachment, you
can use mutt instead: —Sivakumar E, sivakumar.e@gmail.com
S
ELinux, as mentioned in the Type_member: 0 Range_trans: 23
first article of the series, is Constraints: 47 Validatetrans: 0
an implementation of MAC Fs_use: 15 Genfscon: 64
(Mandatory Access Controls). Portcon: 264 Netifcon: 0
These controls are affected through a set of rules Nodecon: 8 Initial SIDs: 27
that check the security context of the subject
(e.g., the processes) and the object (e.g., the file), The bold text in the above output represents
and allow or disallow the particular action. the information section on rules. As we can see,
There are various rules defined in an the default policy loaded in my system has:
SELinux policy. To view them, use the seinfo 82,756 Allow Rules
command discussed earlier. 1,399 Type Transition Rules
5,086 Don’t Audit Rules, and so on.
[root@vbg ~]# seinfo To view these rules and get an
understanding of how they work, let us explore
Statistics for policy file: /etc/selinux/targeted/policy/policy.21 the sesearch command.
Policy Version & Type: v.21 (binary, MLS)
[root@vbg ~]# sesearch -a
Classes: 61 Permissions: 220
Types: 1514 Attributes: 148 Found 87690 av rules:
Users: 3 Roles: 6 allow bluetooth_helper_tmp_t bluetooth_helper_tmp_t :
Booleans: 211 Cond. Expr.: 187 filesystem associate ;
Sensitivities: 1 Categories: 1024 allow httpd_bugzilla_script_t httpd_bugzilla_script_t : lnk_file
Allow: 82576 Neverallow: 0 { ioctl read getattr lock };
Auditallow: 28 Dontaudit: 5086 allow avahi_t avahi_t : fifo_file { read write };
Role allow: 5 Role trans: 0 allow avahi_t avahi_t : tcp_socket { ioctl read write create
Type_trans: 1399 Type_change: 17 getattr setattr append bind connect listen accept getopt se
policy. This rule will look like: allow httpd_t tmp_t: file { the AVC (Access Vector Cache). This provides significant
read } performance benefits.
To insert this rule into your policy, you will need to Access Vector Cache (AVC) denial logging gives an
compile it and load it. idea of why a particular access has been disallowed. Closer
Modifying the base SELinux policy is not examination of these denial logs will enable you to figure out
recommended, especially for beginners. Such rules can be what allow rules need to be inserted into the policy to allow
compiled in separate policy modules and loaded into the these actions.
memory. We will come to SELinux modules in a later part Logging is a key feature of SELinux and it is important
of this series. for security administrators to be able to decipher log
messages. In the next series of this article we will explore
Access Vector Cache how SELinux logging occurs and how to use the logs to
Just imagine a scenario where you have installed a new effectively create allow rules.
application and are unable to execute it. The SELinux
default policy in your system prevents access to files Still to come
and other resources. How do you find out which allow SELinux logging
rules are required and which are not? Also, what kind of Policy modules
overhead will the checking of these rules create on system Other types of enforcement rules
performance?
If you see the seinfo command output above, there
By: Varad Gupta
are more than 80,000 allow rules in the default targeted
Varad is an open source enthusiast who strongly believes in the
policy. Checking for multiple subjects while simultaneously open source collaborative model not only for technology
accessing multiple objects can create a serious but also for business. India’s first RHCSS (Red Hat Certified
performance bottleneck. Security Specialist), he has been involved in spreading open
SELinux tackles the performance overhead issue in source through Keen & Able Computers Pvt Ltd, an open
source systems integration company, and FOSTERing Linux,
the traditional manner—by caching rules. An Access a FOSS training, education and research training centre. The
Vector Cache is created from rules being looked up into author can be contacted at varad.gupta@fosteringlinux.com
the policy, so that subsequent look-ups can occur from
Data Warehousing
and FTP Serving
In this article, we will set up a FTP server,
and then discuss FreeNAS, an operating
system based on FreeBSD, which helps
set up a data storage server.
M Part 6
ore often than not, data comes as files. Efficiently
storing these files is a major headache, and then
making those files available to the general public
or to specific authenticated users is even more
so. In this article, we will set up a FTP server, and then discuss
FreeNAS, an operating system based on FreeBSD, which helps
set up a data storage server.
a shell. In the ‘Anonymous’ section, add the following line:
Section A: The FTP server
Setting up the FTP server requires some out-of-the ordinary RequireValidShell Off
steps if you don’t have RPMForge. Those steps are—installing
RPMForge! After you are done, open up a terminal prompt and You’re done! Just type in…
type in the following:
service proftpd start
yum install proftpd-mysql
…at a terminal and you’re good to go!
That’s all for the installation part. Before we move
on to configuration, we need to set up ProFTPD to run Section B: Data warehousing
automatically at system startup. To do that, execute the To run your own download server and host a big repository of
following: source code or even company documents that would take up
terabytes of storage space, repeatedly adding more hard disks
chkconfig --level 345 proftpd on to a single server would be impractical. In fact, it would be
suicidal. So many pieces of hardware inside a single computer
And for the configuration, open up the file /etc/proftpd. put a lot of load on the MoBo and the SMPS. Moreover, how
conf in a text editor, and read on. many hard drives can you possibly attach to a single MoBo?
The first task is enabling Anonymous FTP. If you want to There is a solution, and it’s called Network Attached
set up a FTP server to serve downloads to the general public Storage (NAS). A grid of computers interconnected with the
(like ftp.gnu.org), you need this part. The ‘Anonymous’ section Ethernet and running NAS servers is called a SAN, or Storage
is in the config file at the very end, but it’s commented out. Area Network. But here’s the good news: NAS comes cheap.
Uncomment the whole section. There’s another small task; the To have a NAS machine, you don’t need very good
config file has an invalid directive called ‘DisplayFirstChdir’. hardware. A 600 MHz Transmeta Crusoe or Efficeon will
Run the following Perl command to correct it: suffice. Hey, you can even have ARM boxes. And in case you
think you need something more, out here in Kolkata, eSys
perl -pi -e ‘s/DisplayFirstChdir/DisplayChdir/’ /etc/proftpd.conf sells a Mini-ITX ‘System In A Box’, consisting of a 1.6 GHz Intel
Atom processor mounted on an Intel 82945G Express Chipset-
Another bit of work involves adding a directive. The based motherboard, for a little over Rs 2,000. That’s a good deal.
directive will enable FTP access for accounts that do not have As for RAM, you need about 512 MB for a decent performance.
And the only storage unit you’ll ever need is a USB pen drive.
You can add as many hard drives to this baby as you want.
I’d recommend buying some multi-terabyte SATA2 hard drives
and attaching them internally. To expand storage, you can use
as many external USB HDDs as you want (only if you use USB
hubs to increase the number of available USB ports).
You’ll need a 256 MB USB pen drive to install the firmware
onto this storage unit. Yes, it cannot be called an operating
system. What we’re talking about is FreeNAS. Head to www.
freenas.org and download the latest 60 MB ISO file. Boot up
your storage unit with it, and then attach the USB pen drive
after FreeNAS has started booting.
Once done, follow these steps to install it:
1. At the first prompt, type “9” (without the quotes) and Figure 1: FreeNAS system info page
press Enter.
2. At the first screen, select the third choice. 1 and the filesystem to UFS. Add a mount point name, and
3. Hit OK at the next screen. then remember it. On the next page, hit Apply Changes.
4. Now select the CD drive (most probably “acd0”) where the Disk configuration is now complete. We need to
FreeNAS disk is located. initialise the NFS service.
5. Select the destination drive: your 256 MB or above USB 1. Go to Services→NFS and check the “Enable” tick box. Set
pen drive the Number Of Servers to something suitable, for example,
6. Do not read any of the text that comes up next (unless it’s 16. Then hit Save And Restart.
an error) and hit Enter. 2. Now go to the Shares tab and click on the “+” icon.
7. You’re done! Exit the installer now, and reboot the unit. 3. On the resulting page, set a Path To Share. This refers to
Enter the BIOS and enable booting from the USB (this one of your mounted disks. Use the format /mnt/<mount
depends on your BIOS make and version). Remove the point name>. Then select whether to map all users as
FreeNAS disk, keep the USB pen drive attached and reboot root (it’s safe because Anonymous FTP will allow just
the unit. Pretty soon, you’ll be booted up into FreeNAS. Read-Only access). The authorised network should be
Congratulations! 192.168.0.0/16. Hit Add and then apply changes.
By default, you have a static LAN IP address, Now, we are fully done with that.
192.168.1.250. Leave it at that. Now, open up a Web browser
and browse to http://192.168.1.250. Now do you know why I Section C: Joining the two together
called FreeNAS a ‘Firmware’? Shift to the FTP server, open up a terminal and type in the
The default login credentials are “admin” as the username following:
and “freenas” as the password. Once you are in, savour the
beauty of the interface for a bit before moving on to configure rm -rf /var/ftp/*
this as a NFS server. mount 192.168.1.250:/mnt/media /var/ftp -v
1. Go to Disks→Management and click on the “+” icon at the
bottom of the empty table. Create a test file in /var/ftp, connect to your FTP site with
2. On the resulting page, choose a hard disk (example: ad6). Firefox and see your handiwork in action.
Add a description if you wish. Then, activate SMART That’s all, folks.
monitoring (check the tick box), leave the Preformatted FS
option as unformatted and hit Add.
3. On this page, hit Apply Changes. The status column should Tip: To make that NFS share mount at system start-
show ONLINE. up, add the following line to /etc/fstab:
4. Now go to Disks→Format.
5. On this page, select a hard disk (it should have been added 192.168.1.250:/mnt/media /var/ftp defaults 0 0
in the Management Section). It is important that you
use the UFS+SU (GPT) filesystem, as this gives the best Replace /mnt/media with your own share’s name.
speed and reliability. FreeNAS doesn’t use an MBR-based
partition; it uses the more recent GPT style partition table By: Boudhayan Gupta
from the EFI standard. Add a volume label and leave The author is a 14-year-old student studying in Class 9. He
everything else intact. Hit Format Disk and then OK. is a logician (as opposed to a magician), a great supporter of
6. The next bit is mounting the partition. Go to Disks→ Free Software and loves hacking Linux. Other than that, he is
Mount Point, and hit that “+” icon again. Select a formatted an experienced programmer in BASIC and can also program in
C++, Python and Assembly (NASM Syntax).
disk, set the Partition Type to GPT, the partition number to
Secure
SHell Explained!
Here’re some insights into SSH (Secure Shell), an essential tool for accessing remote machines.
S
SH is used to access or log in to a remote To install the SSH server on Debian-based distros, key in the
machine on the network, using its hostname or following command:
IP address. It’s a secure network data exchange
protocol that came up as a replacement for # apt-get install openssh-server
insecure protocols like rsh, telnet, ftp, etc. It encrypts the
bi-directional data transfers using cryptographic algorithms, Although the default port for SSH is 22, you can also
making the data transfers secure. Hence, it is free from configure it to run with other custom ports.
password theft or from the sniffing of packets being transferred To perform remote log-ins, we require an SSH client. There
over a network. are lots of SSH clients available, and they can be installed on
Some of the highlights of the SSH protocol are: Debian-based system as follows:
Compression
Public key authentication # apt-get install openssh-client.
Port forwarding
Tunnelling It is possible to access remote UNIX/Linux machines
X11 forwarding from any other OSs using some SSH clients. For example, it is
File transfer possible to remotely log in to a UNIX box from Windows using
SSH runs as a service daemon to facilitate remote log-ins. the SSH client called Putty [www.putty.org].
Here the output text stream (“Test”) is directed to a file. slynux@gnubox:~$ ssh -C user@hostname
Thus the stream is stored to a file named file. ‘>’ is the output
redirection operator. File transfer
Now, take a look at the following command: SSH also offers the file transfer facility between machines on
the network and is highly secure, with SSH being an encrypted
cat < file protocol. Also, the transfer speed can be improved by enabling
compression. Two significant data transfer utilities that use the
Here, input is directed to the cat command. cat performs SSH protocol are SCP and SFTP.
the concatenation of the input stream. Here the input is a file SCP stands for Secure Copy. We can use it to copy
named file. ‘<’ is an input redirection operator that directs the files from a local machine to a remote machine, a remote
input stream to the specified command. Here it directs the machine to a local machine, and a remote machine to
input text stream from the file to the cat. another remote machine.
For the local machine to remote machine file transfer, SSH over GUI file managers
we use the following: In GNOME, we can use the SSH protocol to navigate remote
filesystems in the Nautilus file manager. It works as a GUI
scp local_file_path user@remote_host:destination_file_path implementation of sftp. Type ssh://user@hostname[:port] at
the address bar. It will prompt you for the password of the
For a remote machine to local machine transfer: ‘user’ and then mount the remote filesystem. After that, we can
navigate the filesystem just as with locally mounted disk data.
scp user@remote_host:remote_file_path local_file_path As for KDE users, you can use the fish protocol in Dolphin
or Konqueror to browse remote filesystems. Type fish://user@
For a remote machine to remote machine transfer: hostname[:port] in the location bar and press Enter. It will
again prompt for the remote user’s password.
scp user1@remote_host1 user2@remote_host2
Running XWindow applications remotely
You can even use wildcards to select files: Well, the good news is that SSH is also a good enough protocol
that can aid you to run applications other than terminal
scp :/home/slynux/*.txt /home/gnubox/scp_example/ utilities remotely, with the help of X11 forwarding. To enable
X11 forwarding, add the following line in /etc/ssh/ssh_config,
SFTP stands for Secure File Transfer Protocol. It is a the configuration file.
secure implementation of the traditional FTP protocol with
SSH as the backend. Let us take a look at how to use the sftp ForwardX11 yes
command:
Now to launch the GUI apps remotely, execute ssh
sftp user@hostname commands with the -X option. For example:
If the port for the target SSH daemon is different from the Here, it forwards local port 2020 to slynux.org’s ssh port 22.
default port, we can provide the port number explicitly as an Thus, we can use:
option, i.e., -oPort=port_number.
Some of the commands available under sftp are: ssh localhost -p 2020
cd—to change the current directory on the remote
machine …instead of:
lcd —to change the current directory on localhost
ls—to list the remote directory contents ssh slynux.org
lls—to list the local directory contents
put—to send/upload files to the remote machine from the In remote port forwarding, ports from the server are
current working directory of the localhost forwarded to a client port. Thus ports on the remote host will
get—to receive/download files from the remote machine to act as the proxy for ports on the local machine.
the current working directory of the localhost The significant application of remote forwarding is
sftp also supports wildcards for choosing files based that, suppose you have a local machine that lies inside an
on patterns. internal network connected to the Internet through a router
or gateway—if we want to access the local machine from probes for the passwords.
outside the network, it is impossible to access it directly. But by Generate the public key as follows:
forwarding the local ports to a remote host, we can access the
local machine through ports of the remote host. slynux@slynux-laptop:~$ ssh-keygen -t rsa
Let’s see how remote port forwarding is executed: Generating public/private rsa key pair.
Enter file in which to save the key (/home/slynux/.ssh/id_rsa):
ssh -R remoteport:remotehost:localport Enter passphrase (empty for no passphrase):
Enter same passphrase again:
For example: Your identification has been saved in /home/slynux/.ssh/id_rsa.
Your public key has been saved in /home/slynux/.ssh/id_rsa.pub.
ssh -R 2020:slynux.org:22 The key fingerprint is:
0e:04:3d:e3:2a:54:8c:47:ae:10:9a:96:41:be:c1:8f slynux@slynux-laptop
To SSH to the local machine from outside the internal
network, we can make use of slynux.org as ssh slynux.org:2020. Now we have the public key in the file ~/.ssh/id_rsa.pub.
ssh -D 3000 remotehost ssh remote_host “cat >> .ssh/authorized_keys” < ~/.ssh/id_rsa.pub
Now, in your browser, specify proxy settings as: Finally, let us write a single loop shell script to reboot all the
SOCKS4 switched-on machines in the network.
host: localhost
port: 3000 #!/bin/bash
To enable the DNS service in Firefox, navigate the about: base_ip=”192.168.0.” ;
config page and set…
for machine in $base_ip{1..255};
network.proxy.socks_remote_dns = true do
ping -c2 $machine &> /dev/null ;
Automatic key authentication if [ $? -eq 0 ];
Each time you access the other machine for the remote then
execution of some command, it probes for the password. ssh $machine reboot ;
This is not desirable when we need to automate tasks. If we fi
need to shut down or reboot all the machines on the LAN, done
it is impractical to type the user password for command
execution on each of the machines. There should be some That’s it about the secure shell. Hope you enjoyed this
mechanism that handles automatic authentication without tutorial. Till we meet again, happy hacking!
probing for a password.
The solution for this hurdle is public key authentication, By: Sarath Lakshman
for which we will generate a public key from the machine The author is a Hacktivist of Free and Open Source
we need to execute remote commands. That public key will Software from Kerala. He loves working on the GNU/Linux
be copied to each of the remote machines. Thus each time environment and contributes to the PiTiVi video editor
when we execute remote commands, it will perform a user project. He is also the developer of SLYNUX, a distro for
newbies. He blogs at www.sarathlakshman.info
authentication by verifying the public key and it no more
S.G. Ganesh
A
ssume the following: integer 4 bytes size and long Answers:
8 bytes size; the underlying machine uses two's 1) You would expect the program to print 60, since one hour has
complement representation for integers; the 60 minutes. However, it prints 60000. This is the problem: the
necessary header files are included; and the C compiler expression is evaluated as (millis % 60)*1000 and not as millis
supports the C99 standard. % (60*1000). Remember that % has the same precedence as
If you’re a C, C++, Java, C# or even D programmer, you the * operator, so the % operator is evaluated before *.
will enjoy these puzzles. Be warned: though they look Now, since (millis % 60) is 0 for 60*1000 times in
harmless and appear to work fine, they however have bugs, the loop, the expression if(millis % 60*1000 == 0) is true
so the results you see after executing these programs will for 60000 times and hence the output.
surprise you!
2) You would expect this program to print 1CAFEBABE,
1) This program is about implementing a simple digital because we are adding 0x100000000 to 0xCAFEBABE.
clock. The loop variable ‘millis’ is for counting from 0 However, you’d certainly be surprised with the answer:
to the number of milliseconds in an hour. The variable it prints only CAFEBABE! Why?
‘mins’ is to count minutes. The printf prints the number 0xCAFEBABE is a negative integer constant!
of minutes in an hour after executing the loop. So When we write negative constants in decimal form,
what is the output of this program? (Hint: There are 60 like “-10”, it is very clear that the constant is negative
minutes in an hour). because we can see the preceding “-” sign. However, for
hex and octal numbers, the number is negative if the
int main() { highest order bit is negative. In this case, 0xCAFEBABE
int mins = 0; is a negative number. Here is a quick way to confirm
for(int millis = 0; millis < 60*60*1000; millis++) it. If you run the following statement: “printf(“%d”,
if(millis % 60*1000 == 0) 0xCAFEBABE);”, you’ll get the value “-889275714” as the
mins++; output. Now, what happens to the addition?
printf(“%d”, mins); Note that 0x100000000L is a long number.
} When 0xCAFEBABE is promoted to long, it is prefixed
with 1’s (i.e., the sign is extended). So it becomes
2) What is the output of this program? (Hint: It is a simple 0xFFFFFFFFCAFEBABE. When we add 0x100000000L with
program to check if you’ve learned addition at school!) 0xFFFFFFFFCAFEBABE, we get 0xCAFEBABE (remember,
adding 1 to F is 0, with a carry 1). Hence the output!
int main() {
printf(“%lx”, 0x100000000L + 0xCAFEBABE); 3) This program prints “Linux + open source” in the
} command line. What happens to the URL http://www.
linuxforu.com/? Well, if you check your compiler
3) You’ve written this program to search for articles on warnings, you might get something like: unreferenced
open source on the LFY website. Will it open Firefox or label ‘http’ in function main. ‘http:’ became a label
IE on your Linux machine? (Hint: IE is not available on (labels are used as the target for goto statements) and
Linux). // became the starting of a single line comment! (C99
supports C++ style single line comments).
int main() {
http://www.linuxforu.com/ About the author:
printf(“Linux + open source “); S G Ganesh is a research engineer in Siemens (Corporate
Technology). His latest book is “60 Tips on Object Oriented
}
Programming”, published by Tata McGraw-Hill. You can reach
him at sgganesh@gmail.com.
(*) ‘Java puzzlers: Traps, Pitfalls, and Corner Cases’, Joshua Bloch, Neal Gafter,
Addison-Wesley, 2005.
Personalising
Photographs
Most of us enjoy sharing our photographs. We’d also like to add captions that
can’t be missed or send postcard-size images. That’s what the Python imaging
library is all about!
T
o manipulate individual photo and add a caption to it. Finally, you
images, products like The can save the modified photograph in the
GIMP are most appropriate. save/ directory.
However, if similar actions
need to be applied to a group of images, import os
consider programming them using the import Image, ImageTk, ImageDraw
Python imaging module. class photos:
In order to keep the code simple, the def __init__(self,new_size):
assumption is that you have just downloaded self.file_generator = (fn for fn in os.listdir(‘.’))
the pictures from your camera. So, all the self.new_size = new_size
pictures you wish to process are in the same self.image = None
directory. Create a sub-directory save/ in
which you will keep your processed photos. The initialisation method is simple
After that, we will go over how to write enough. The file_generator will be
a Python generator and use the imaging convenient for fetching the next file when
library to create image transition effects needed. You can add the flexibility of
when viewing photographs. passing the directory as a parameter.
The save method will save the image with the def display_image(self, image):
caption with the same name as the existing file, but self.foto[‘width’] = image.size[0]
in the save/ directory. However, if one has not been self.foto[‘height’] = image.size[1]
created, it will save the resized image. self.tk_image = ImageTk.PhotoImage(image)
self.foto.create_image(0,0,anchor=’nw’,image=self.tk_image)
Interactive transformations
Now, you will need a GUI class to use the above class. The method to display the image changes the size of
The GUI should show you one image and allow you the photo frame to the size of the image. The ImageTk
to add a caption to it. Once you are satisfied, save the module in Python imaging is used to convert the image
photograph and move on to the next one. Or, you may object into an image object for Tkinter. The Create
decide to skip a photograph. image method of the canvas displays the image.
T
hanks to all the readers who Note that two threads can
sent in their feedback on concurrently issue booking and
the problems we discussed cancellation requests to the same ticket
in last month’s column. (same row and same column), and the
We had given a small code snippet of system has to work correctly. The problem
multithreaded code and asked you to is that Thread 1 can enter the critical
find out the potential bug hiding in it. section ‘BookTicket’ and acquire the ‘row_
Congratulations to our readers Siva lock’ and concurrently Thread 2 can enter
Kumar, Vivek Goel and Arjun Pakrashi for the ‘CancelTicket’ critical section and
getting the answer correct. As pointed out acquire the ‘column_lock’. Now Thread 1
by these readers, the code snippet had a will wait endlessly for ‘column_lock’ to be
potential deadlock situation. Here is the released while Thread 2 will wait for the
buggy code snippet from the takeaway ‘row_lock’ to be released. Neither of the
problem: threads can make any progress at all. How
can you fix the code so that this problem
void BookTicket(int row, int column) does not occur?
{ In our example, it is quite easy to see
pthread_mutex_lock(&row_lock ); that if we change the lock acquire order in
pthread_mutex_lock(&column_lock); ‘CancelTicket’ to first acquire ‘row_lock’
ticket[row][column].status = ‘booked’; and then acquire ‘column_lock’, we can
pthread_mutex_unlock(&column_lock); avoid the deadlock. Here is the corrected
pthread_mutex_unlock(&row_lock); version of ‘CancelTicket’, which does not
cause a deadlock with ‘BookTicket’:
}
void CancelTicket(int row, int column) void CancelTicket(int row, int column)
{ {
pthread_mutex_lock(&column_lock ); pthread_mutex_lock(&row_lock );
pthread_mutex_lock(&row_lock); pthread_mutex_lock(&column_lock);
ticket[row][column].status = ‘cancelled’; ticket[row][column].status = ‘cancelled’;
pthread_mutex_unlock(&row_lock); pthread_mutex_unlock(&column_lock);
pthread_mutex_unlock(&column_lock); pthread_mutex_unlock(&row_lock);
} }
Compiling GNU
Software for Windows
Let’s find out how exactly a cross-platform software is compiled for Windows,
and then let’s do it ourselves!
N
ow there’s this great software Now, as you move to large programs (such
called The GIMP, which is more as The GIMP), you will need multiple source
than a match for Photoshop, code files to produce a single binary. This
and it’s smaller, and it’s free! The will result in problems, because you cannot
GIMP, although made primarily for GNU just build the files at one go. You will need to
systems tacked on top of a UNIX kernel (such compile your C sources into the assembler,
as Linux), is also available for Windows. then assemble them into object files, put all
Ditto for the Apache Web server. Ever the object files together in a single object
wondered how they write the source code archive and then link that archive to the
once, and then build it for any operating system libraries. The answer to this problem is
system they choose? Ever wondered how you Makefiles, which can do all that automatically
could do it for yourself ? according to a set of rules applied to a set of
files. But even Makefiles have their limitations,
Welcome to GCC and Makefiles written for GNU Make are not
First of all, of course, you must write code that is compatible with Microsoft NMAKE and a
platform independent, i.e., that uses instructions Makefile written to use GCC cannot use VC++,
that can be reproduced in any operating system. and vice versa.
As long as you write software using functions The answer to this problem is to use
defined in the standard C library, minus POSIX something called a retargetable compiler, or a
functions (such as fork()), you are fine. It’ll build. compiler that can produce binaries for different
You can go to a GNU machine and pass your file operating systems. Fortunately for us, GCC is
through GCC to get a Linux binary, then go to a retargetable. And unfortunately for us, GCC
Windows box and pass it through VC++ to get a must be re-built before it can produce Win32 or
Windows binary. Win64 code.
First of all, let’s compile this source file into the assembler. To Notice the a.out file? That’s our object file. We’ll now link that
do this, we need to execute the following: file with the C libraries, to get an executable. The command to do
this, however, is huge.
gcc -S src.c -o src.S
ld --eh-frame-hdr -m elf_i386 --hash-style=both -dynamic-linker /lib/ld-linux.so.2 \
…and some command line output: -z relro /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.3.3/crtbegin.o \
-L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib \
bg14ina@bg14ina-desktop:~/Desktop/srcs$ gcc -S src.c -o src.S -L/lib ./a.out -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s \
bg14ina@bg14ina-desktop:~/Desktop/srcs$ cat src.S --no-as-needed /usr/lib/gcc/i486-linux-gnu/4.3.3/crtend.o /usr/lib/crtn.o -o a.exec
.file “src.c”
.section .rodata There’s some bad news as well-- the linker command is
.LC0: somewhat distro-specific (I’m using Ubuntu Jaunty) and it
.string “Hello World!” depends on the GCC version, Binutils version and location of the
.text crt object files as well.
.globl main Okay, let’s test this file:
.type main, @function
main: bg14ina@bg14ina-desktop:~/Desktop/srcs$ ls -l
leal 4(%esp), %ecx total 24
andl $-16, %esp -rwxr-xr-x 1 bg14ina bg14ina 9143 2009-06-07 16:09 a.exec
pushl -4(%ecx) -rw-r--r-- 1 bg14ina bg14ina 864 2009-06-07 16:05 a.out
pushl %ebp -rw-r--r-- 1 bg14ina bg14ina 73 2009-06-07 16:02 src.c
movl %esp, %ebp -rw-r--r-- 1 bg14ina bg14ina 433 2009-06-07 16:04 src.S
pushl %ecx bg14ina@bg14ina-desktop:~/Desktop/srcs$ ./a.exec
subl $4, %esp Hello World!
movl $.LC0, (%esp)
call puts Bingo!
movl $0, %eax
addl $4, %esp So what now?
popl %ecx Now that we know all about what GCC and the tools from
popl %ebp Binutils do, we produce C. GCC converts it to assembly. GAS
$: rm -rf *
$: cd ../w32api // File: src.cc
$: ./configure --prefix=/opt/mingw/i686-pc-mingw32 --host=i686-pc-mingw32 #include <iostream>
$: make && sudo make install using namespace std;
$: cd ../mingwrt-3.15.2-mingw
$: ./configure --prefix=/opt/mingw/i686-pc-mingw32 --host=i686-pc-mingw32 int main()
$: make && sudo make install {
$: cd ../build cout << “Hello World!” << endl;
$: sudo ../gcc-4.4.0/configure --prefix=/opt/mingw --target=i686-pc-mingw32 \ return 0;
--with-headers=/opt/mingw/i686-pc-mingw32/include \ }
--disable-shared --enable-languages=c,c++,fortran
$: sudo make Compile both the files with:
$: sudo make install
$: i686-pc-mingw32-gcc src.c -o c.exe
That’s it! You have a fully working C, C++ and Formula $: i686-pc-mingw32-g++ src.cc -o cxx.exe
Translator compiler toolchain that’ll compile code meant to run
on Windows! Here are the results of a comprehensive testing of both
Binutils and GCC Components. Oh wait, I exaggerated ;-):
More
MinGW does not provide a POSIX implementation, so bg14ina@bg14ina-desktop:~/Desktop/srcs$ ls -l
you are out of luck on compiling programs that rely on total 3896
POSIX functions. Not many do, and most that do, have an -rwxr-xr-x 1 bg14ina bg14ina 27363 2009-06-11 16:02 c.exe
alternative set of sources meant to use the Win32API to -rwxr-xr-x 1 bg14ina bg14ina 3952542 2009-06-11 16:02 cxx.exe
replace POSIX calls by native Win32 ones. But once in a -rw-r--r-- 1 bg14ina bg14ina 73 2009-06-07 16:02 src.c
while, if you need POSIX API support, Google for Cygwin and -rw-r--r-- 1 bg14ina bg14ina 105 2009-06-11 16:01 src.cc
download what’s required. Beware though, Cygwin doesn’t
come as a cross-compiler and it’s terribly difficult to build bg14ina@bg14ina-desktop:~/Desktop/srcs$ file c.exe
one. Cygwin requires Windows NT 5 and above to run. c.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit
(NT 5 is Windows 2000. XP is NT 5.1, and Windows bg14ina@bg14ina-desktop:~/Desktop/srcs$ file cxx.exe
Server 2003 is NT 5.2, as is Windows XP Professional x64 cxx.exe: PE32 executable for MS Windows (console) Intel 80386 32-bit
Edition. Vista and Server 2008 are NT 6, and Windows
7 and Server 2008 R2 are NT 6.1. This information will bg14ina@bg14ina-desktop:~/Desktop/srcs$ i686-pc-mingw32-strip \
help when you want to develop a program meant to run > -s {c,cxx}.exe
only on certain versions of Windows, as internally, all
Windows OSs ‘know’ themselves by their NT version bg14ina@bg14ina-desktop:~/Desktop/srcs$ ls -l
numbers and not their names.) total 528
-rwxr-xr-x 1 bg14ina bg14ina 4096 2009-06-11 16:16 c.exe
But hey... -rwxr-xr-x 1 bg14ina bg14ina 525312 2009-06-11 16:16 cxx.exe
...we just built a cross-compiler, so how do we use it? It can be -rw-r--r-- 1 bg14ina bg14ina 73 2009-06-07 16:02 src.c
made difficult, and then it can be made simple. Actually, all -rw-r--r-- 1 bg14ina bg14ina 105 2009-06-11 16:01 src.cc
you need are some environment variables. Here goes:
The first step is adding the path /opt/mingw/bin to bg14ina@bg14ina-desktop:~/Desktop/srcs$ wine c.exe
your PATH variable. Type in the export command that we Hello World!
executed after building Binutils. bg14ina@bg14ina-desktop:~/Desktop/srcs$ wine cxx.exe
The second step is configuring the source with a “-- Hello World!
host=i686-pc-mingw32” flag.
There you go! One boxed product, ready to run!
That’s all. Now I gotta go build myself a version of libVLC. Bye...
There’s one final thing to do before signing off: testing the
GCC compilers. I don’t know any Fortran, so I could never By: Boudhayan Gupta
test Fortran; however quite a lot of GNU Projects insist on Boudhayan is a 14-year old student who suffers from an
having some version of Fortran in the toolchain, so its a safe acute psychological disorder called Distromania. He owes his
bet to keep it built. We need to test the compilers in a “Hello life to Larry Page and Sergei Brin. Apart from that, he enjoys
World” program. For C, you can use the one in the example both reading and writing, and when he is not playing with his
Python ;-), during most of his spare time he can be found
src.c file in the previous page; for C++ the program goes listening to Fort Minor, or cooking.
somewhat like:
Scripting
for Testing
(With a Spoonful of Perl and a Dollop of Ruby)
Inspired by the test scaffolding idea in Kernighan and Pike’s “Practice Of Programming”, this article is
about generating a regression for a number crunching library.
E
very software needs to be tested—and needs to time and very little mathematical expertise on hand?
be tested exhaustively. I know, we all practice unit A few years ago, we wanted the number crunching features
testing and love all that CppUnit/JUnit/TestNG/ badly. To be specific, the number crunching had to be correct
EasyMock stuff out there. for numbers with up to 23 digits. In other words, we did not care
However, there are other kinds of testing, and it goes by if you multiplied two numbers, each with 24 (or more) digits in
the fancy term, Data Driven Testing. The idea is simple— them. However, if the numbers had digits below 24, you needed
we arrange the code to work on a piece of data, get the to be correct.
actual result and compare it with the already known, So we had the code and it did all the math for us, but
expected result. This is a very powerful idea, as you will see could we trust it? We wanted to know, badly.
in a minute. I left home for the day, mulling over the problem,
Where do you get this data, though? At times, we need to and while travelling, I had an idea... What about random
make it up... numbers? And as usual, Linux is very good at them. So...
Let’s say we need a lot of words to test some string
algorithms. Here is one way to generate the list of words... ~> echo “$RANDOM$RANDOM$RANDOM$RANDOM * $RANDOM$RANDOM$RA
NDOM$RANDOM”
~> perl -le ‘$k = “a”; print $k++ for (1 .. 1000)’ 301447958390210712 * 2693820160176179720
a ~>
b
... So far, so good. However, we needed some addition,
air subtraction and division too. We needed more multiplication
ais and division, as they are more complex to implement and
ait hence, more bug-prone.
aiu
aiv A spoonful of Perl
aiw I decided to use the following trick that I first saw in Jon
aix Bentley’s Programming Pearls -- a book full of the choicest
~> gems.
At times, this simple strategy can answer very ~> perl -lane ‘$k = rand();
complicated questions and validate any assumption you quote> if ($k < .4) { print “*”; next }
might have about code. quote> elsif ($k < .8) { print “/”; next }
Here is a validation story... quote> elsif ($k < .9) { print “+”; next }
We wanted to use the tommath library for number quote> else { print “-” }’
crunching, and though open source products are usually
of great quality, we wanted to be very sure we made the We got a handful of * and /, and a few + and -. This goes by
right choice. the fancy name of ‘probability’.
Now, how do you make sure some complex piece of C++ Now the job was simple: we generated a pair of random
code is correct without grokking all the code—there being no numbers and pumped them into this Perl script.
~> echo “$RANDOM$RANDOM$RANDOM$RANDOM $RANDOM$RANDOM$RAND ~> ruby -e ‘100.times { print “#{rand(100000000000000000000000)}\n” }’ | awk
OM$RANDOM” | perl -lane ‘$k = rand(); ‘length < 23’ | wc -l
if ($k < .4) { print “$F[0] * $F[1]”; next } 6
elsif ($k < .8) { print “$F[0] / $F[1]”; next } ~>
elsif ($k < .9) { print “$F[0] + $F[1]”; next }
else { print “$F[0] - $F[1]” }’; print I played with this by changing the loop counter 100 to a few
214254513397827924 * 164672407792331690 other numbers and found that we got the desired numbers 90
~> per cent of the time—and that’s good.
Could we just step further and generate the pair of them?
The next run gave us: Oh yes, with some more Rubyism.
~> for ((i = 0; i < 5; ++i)) We could take out the shell loop above and instead use the
do above Ruby code in its place.
echo “$RANDOM$RANDOM$RANDOM$RANDOM $RANDOM$RANDOM$RAND
OM$RANDOM” TIMTOWTDI (Perl speak)
done | perl -lane ‘$k = rand(); Well yes, using Linux’s /dev/urandom bucket you can pick as
pipe quote> if ($k < .4) { print “$F[0] * $F[1]”; next } many as you want:
pipe quote> elsif ($k < .8) { print “$F[0] / $F[1]”; next }
pipe quote> elsif ($k < .9) { print “$F[0] + $F[1]”; next } od -An -tu /dev/urandom | awk -vOFS=”” ‘{$1=$1; print}’ | sed -n
pipe quote> else { print “$F[0] - $F[1]” }’ | tee > expressions.txt | bc > results.txt ‘s/\(.\{24\}\).*/\1/; p’ | sed -n ‘N; s/\n/ /;p’*
20343140723230431628 / 12805234313157116052
1853726671299816051 + 29694216342188821346 There are a couple of awk and sed idioms here, however
2939317042993615625 / 38033016128821552 it is a nice exercise to open the info pages and figure out how
113881012327974203 + 1880313573241446378 these work. This, by the way, makes sure that we get each
276452368052387683 * 14343404223735113 number with 24 digits in it.
~> We can make absolutely sure of this, but I will leave it
as an exercise.
Now, we just increased the for loop runs, dumped the stuff
into a file, and we had our test cases. 50000 such computations Voila!
would be fine for us. And the test data is ready.
Computing the expected answers was simple—bc is always The rest was all easy and routine—we pulled these files
around, ready to do our bidding. into a CppUnit test method and called tommath APIs with the
With a tee, I captured the test cases to the file, expressions. expression and compared the result.
txt. The expected results went into results.txt. And we found the answer in an hour—tommath
faithfully produced the correct output for numbers with 27
A dollop of Ruby digits in them, which was enough for us to choose it...
However, I skirted the real issue: how were we to get random Problem solved. Open Source is totally awesome!
numbers that were around 24 digits—that is where our
boundary conditions had to be validated...
By: Atul Shriniwas Khot
~> ruby -e ‘100.times { print “#{rand(100000000000000000000000)}\n” }’ The author works at IBM Software Labs in Hyderabad as a
senior software engineer, and has been dabbling with UNIX/
Linux for the last 14 years. He is into Java/J2EE, Groovy and
And no, don’t try and tap out those zeroes. After you enter 1, Ruby these days, but at times he hankers after dear-old C++
press Alt 23, release Alt, and hit 0 -- then the command line taps and Perl. He loves design patterns, algorithms, multi-threading
out 23 zeroes for you—pretty cool, right? and refactoring code to make it stylish. And of course, he loves
Just to make sure we get many numbers with 23 digits in vim (never miss a chance to use it) and zsh. He collects classic
British mysteries (especially those green and white Penguin
them, you can quickly run a test... crime classics—penguins make life so delectable;-))
Understanding
Memory
Areas
in a C Program
What happens when a C program is loaded into memory? Where are the different types
of variables allocated? Let’s look at some of these interesting ‘under the hood’ details.
R
avikiran from Hyderabad (a regular frames’. When we do dynamic memory allocation, such
reader of my Joy of Programming column) as the use of the malloc function, memory is allocated in
asked me this: “Why do we need two data the heap area.
sections—initialised and un-initialised? If The data and text areas are of fixed size. When
I initialise a static or a global variable with zero, where a program is compiled, at that point itself, the sizes
will it be stored? Since the scopes of global and static required for these segments are fixed and known—
variables are different, why are they stored in the same hence, they are also known as static segments. The sizes
data section?” These queries prompted me to write this of the stack and heap areas are not known when the
article, which should interest any assembly language/C/ program gets compiled. Also, it is possible to change/
C++ programmer. configure the size of these areas (i.e., increase or decrease
the size of these segments); so these areas are known as
Four important segments dynamic segments.
Let us first understand the memory layout of a C Let us look at each of these segments in detail now.
program (which is compiled to an executable and For starters, we’ll explore an example program and a tool
loaded into the memory for execution). There are four to find out where the variables get allocated later.
main segments in a C program: data, code, stack and
heap segments. Data segment
Global and function static variables are allocated in The data segment is to hold the value of those variables
the data segment. The C compiler converts executable that need to be available throughout the lifetime of the
statements in a C program—such as printf(“hello program. So, it is obvious that global variables should
world”);—into machine code; they are loaded in the code be allocated in the data segment. How about local
segment. When the program executes, function calls variables declared as static? Yes, they are also allocated
are made. Executing each function requires allocation of in the data area because their values should be available
memory, as if in a frame, to store different information across function calls. If they are allocated in the stack
like the return pointer, local variables, etc. Since this frame itself, they will get destroyed once the function
allocation is done in the stack, these are known as ‘stack returns. The only option is to allocate them in a global
area; hence, they are allocated in this segment. So, the lifetime of the actual arguments to the space allocated for the parameters
a local static variable is that of the lifetime of the program! in the stack frames. (Note: Compilers do this efficiently, so
There are two parts in this data segment itself: the initialised this description is not entirely correct; we have given this
data segment and the uninitialised data segment. description because it is useful to understand how function
When the variables are initialised to some value (other parameters are treated as local variables).
than the default value, which is zero), they are allocated in the
initialised data segment. An example
When the variables are uninitialised, they get allocated in We’ll take a sample source program and see where different
the uninitialised data segment. This segment is usually referred program elements are stored when that program executes. The
to with a cryptic acronym called BSS. It stands for Block Starting comments in the program explain where the variables get stored.
with Symbol, and gets its name from the old IBM systems which
had that segment initialised to zero. #include <stdio.h>
The data area is separated into two, based on explicit #include <string.h>
initialisation, because the variables that are to be initialised need #include <stdlib.h>
to be initialised one by one. However, the variables that are not
initialised need not be explicitly initialised with zeros, one by int bss1;
one. Instead, the job of initialising the variables to zero is left to static double bss2;
the operating system to take care of. This bulk initialisation can char *bss3;
greatly reduce the time required to load. // these variables are stored in initialized to zero segment
When we want to run an executable program, the OS starts // also known as uninitialized data segment (BSS)
a program known as a loader. When this loads the file into
memory, it takes the BSS segment and initialises the whole thing int init1 = 10;
to zeros. That is why (and how) the uninitialised global data and float init2 = 10.0f;
static data always get the default value of zero. char *init3 = “hello world”;
The layout of the data segment is in the control of the // these variables are stored in initialized data segment
underlying operating system; however, some loaders give // the code for main function gets stored in code segment
partial control to the users. This information may be useful in int main() {
applications such as embedded systems. int local1 = 10;
The data area can be addressed and accessed using // this variable is allocated in stack; initialization code is generated by the
pointers from the code. Automatic variables have an overhead compiler
in initialising the variables each time they are required, and int local2;
code is required to do that initialisation. However, variables in // this variable is not initialized; hence it has garbage value
the data area do not have such runtime overhead because the // remember: it does not get initialized to zero
initialisation is done only once and, that too, at loading time.
static int local3;
Code segment // this is allocated in BSS segment and gets initialized to zero
The program code is where the executable code is available for
execution. This area is also known as the ‘text segment’ and is of static int local4 = 100;
fixed size. This can be accessed only by function pointers and not // this gets allocated in initialized data segment
by other data pointers. Another important piece of information
to take note of here is that the system may consider this area as int (*local_foo)(const char *, ...) = printf;
a ‘read only’ memory area, and any attempt to write in this area // printf is in a shared library (libc, or C runtime library)
can lead to undefined behaviour. // local_foo is a local variable (a function pointer) that
// points to that printf function
Stack and heap segments
To execute the program, two major parts are used: the stack and local_foo(“hello world\n”);
heap. Stack frames are created in the stack for functions and in // this function call results in creation of a ‘stack frame’
the heap for dynamic memory allocation. The stack and heap // in the stack area
are uninitialised areas. Therefore, whatever happens to be in
the memory becomes the initial (garbage) value for the objects int *local5 = malloc(sizeof(int));
created in that space. // local5 is allocated in stack; however it points to a dynamically
The local variables and function arguments are allocated // allocated block in heap
in the stack. For the local variables that have an initialisation
value, code is generated by the compiler to initialise them return 0;
explicitly to those values when the stack frames are created. // the stack frame for main function gets destroyed after executing main
For function parameters, the compiler generates code to copy }
Is there a tool with which we can check where these 08049654 B bss3
variables are stored? Yes, there are many. For example, the
objdump tool can dump the whole executable file and show Variables bss1 and bss3 got allocated in the BSS section
you the contents; but beginners would get overwhelmed by the (global). Since we put the storage class as static for the variable
details; so, a simpler tool will do. One such simple tool is nm. bss2, it is listed as ‘b’ (lower case ‘b’ means that it is accessible
only within that file) and is also allocated in the BSS section:
Using the nm tool
The nm manpage says that it’s a tool to “…list symbols from ganesh@linux-2rqz:~> nm ./a.out | grep init
object files”. So how does one use nm? 08049628 D init1
First, assume that we stored the program in /tmp/allocation.c 0804962c D init2
file. Now, compile it and create an executable, as shown below: 08049630 D init3
ganesh@linux-2rqz:~> cc -std=c99 /tmp/allocation.c No surprises here for variables init1, init2 and init3: since
they are explicitly initialised, they got allocated into the
(Since I use some C99 features like single line comments, I initialised data section.
compiled the program in C99 mode.) ganesh@linux-2rqz:~> nm ./a.out | grep local
Now, type nm ./a.out (even just typing nm will do—if there 08049640 b local3.1847
are no arguments given to nm, it assumes that it should take the 08049634 d local4.1848
input as a.out) and you’ll get some cryptic output as follows:
Only the local3 and local4 are allocated global memory. Since
ganesh@linux-2rqz:~> nm ./a.out local3 is uninitialised, it is allocated in BSS; and since local4 is
08049650 B bss1 explicitly initialised, it is allocated in the initialised data segment.
08049648 b bss2 As both are local (to the function), they are indicated by smaller
08049654 B bss3 case letters (‘b’ and ‘d’, respectively). Why are the names suffixed
08049638 A __bss_start with some numbers here? Presumably, since they are local to
08048374 t call_gmon_start the function and to avoid accidental mixing them up with other
08049638 b completed.5764 local variables with the same name, they have been suffixed by
... some numbers. (Note: Compilers differ in their approaches in
treating local static variables; this approach is for GCC.)
I haven’t shown the whole output since it will fill a whole In the output, the following few symbols are also of
page. Where are the symbols that we did not type in the interest to us:
program, coming from? They have been inserted behind the
scenes by the compiler for various reasons. We can ignore 080483f4 T main
them for now. U malloc@@GLIBC_2.0
Now, what are those strange numbers, followed by the U printf@@GLIBC_2.0
letters (such as ‘b’, ‘B’, ‘t’)? The numbers are the symbol’s value,
followed by the symbol type (displayed as a letter) and the The main function is allocated in the text segment; obviously,
symbol name. we can access this function from outside the file (to start the
The symbol type requires more explanation. A lowercase execution). So, the type of this symbol is ‘T’.
symbol means that it is local (to the file) and an uppercase The malloc and printf functions used in the program
letter means that it is global (externally available from the are not defined in the program itself (the header files only
file). Here are the symbol types and their meanings that are of declare them, they don’t define them); they are defined in the
interest to us: shared library GLIBC, version 2.0—that’s what the suffix “@@
GLIBC_2.0” implies.
“B” The symbol is in the uninitialised data section (known as BSS). Hopefully, this article has demystified some of the
“D” The symbol is in the initialised data section. behaviour of natively executable programs. You can take this
“T” The symbol is in the text (code) section. as a starting point and explore more by yourself. Read about
“U” The symbol is undefined. ELF and COFF file formats, about how segments other than
the ones I’ve described here, are useful, etc. Check the GCC
Oh good, that’s a short list. Now, let’s look out for the manual for more details.
symbols that are relevant to us (by redirecting the output to
grep command), and discuss them in detail: About the author:
S G Ganesh is a research engineer in Siemens (Corporate
Technology). His latest book is “60 Tips on Object Oriented
ganesh@linux-2rqz:~> nm ./a.out | grep bss
Programming”, published by Tata McGraw-Hill. You can reach
08049650 B bss1 him at sgganesh@gmail.com.
08049648 b bss2
ERP
(Enterprise
Resource Planning)
Q
uoting Wikipedia, nature of the project, rather than the information, inventory, customer
“Enterprise resource community nature of the project, information, order tracking, and
planning (ERP) is a and after an impassioned discussion workflow information. It is possible
company-wide computer decided to split from Compiere, giving to synchronise this information with
software system used to manage birth to the ADempiere project. other applications through the Java-
and coordinate all the resources, ../software/erp/adempiere/ based Openbravo API. Openbravo can
information, and functions of a also create and export reports and
business from shared data stores.” We PostBooks ERP data to several formats, such as PDF
bring you some of the options from This is a package that covers ERP, and Microsoft Excel.
the FOSS ecosystem. Let us know accounting and CRM applications. ../software/erp/openbravo/
if you enjoy the same amount of It is the ideal software platform
flexibility with these variants as you for many small- to medium-sized Compiere ERP+CRM
do with proprietary solutions. businesses (SMBs). On the accounting This is the leading open source ERP
side are basic features like the general solution for the distribution, retail,
ADempiere Business Suite ledger, accounts receivable and manufacturing and service industries.
This is an ERP/CRM/MFG/SCM/POS payable, etc. PostBooks also includes Compiere automates accounting,
done the ‘bazaar’ way in an open and a fully-integrated CRM software, supply chain management, inventory
“all that can be packed in” fashion. apart from functions that cover sales and sales orders. It includes ERP
The focus is on the community that and purchasing, product definition, functionalities. The Compiere modules
includes subject matter specialists, inventory, light manufacturing and are: quote to cash, requisition-to-pay,
implementers and end-users. The OpenRPT, our open-source report customer relationship management,
goal of the ADempiere project is to writing software. partner relations management, supply
create a community-developed and ../software/erp/xTuple/ chain management, performance
supported open source business analysis, warehouse, double-entry
solution. The project was created in Openbravo ERP book-keeping, workflow management
September 2006 after a long running This is a Web-based ERP for SMEs, and Web store. Compiere is a model-
disagreement between ComPiere built on the proven MVC and driven architecture development,
Inc, the developers of Compiere, MDD framework that facilitates deployment and maintenance
and the community that formed customisation. Openbravo features framework, designed with the
around that project. The community a Web-based interface, where the intention of following changes as
believed Compiere Inc placed too user can view the entire status of business evolves.
much emphasis on the open source a company, including production ../software/erp/compiere/
LinuxForU.com
users and privileged albums make Swing components with data
this great for communities. binding capabilities) to quickly
../software/newbies/gallery/ and easily develop rich-client
applications.
Jaris FLV Player is a Flash FLV ../software/developers/openswing/
player made on Swishmax 2 that can
be embedded into any website for
free or commercial use. It supports Fun Stuff
thumbnails, full-screen views, volume Warzone 2100 is a hybrid real-
control, as well as displaying the total time strategy and tactics computer
duration of a video before playing it. game. It is fully three dimensional,
../software/newbies/jaris-1_0.zip based on the iViS games and 3D
graphics engine developed by Sam
LiVES is a video editing system. It is Kerbeck of Eidos. The terrain is
designed to be simple, yet powerful. mapped by a grid; vehicles tilt to
It is small in size, yet has many meet hilly terrain, and projectiles
advanced features. LiVES is part can be realistically blocked by
editor, part VJ tool. It mixes real- steep mountains. The camera is
time video performance and non- free-moving and can zoom in and
linear editing in one professional out, rotate, and pan up or down
quality application. It will let you while navigating the battlefield. In
start editing and making videos Warzone 2100, you command the
right away, without having to worry forces of ‘The Project’ in a battle to
about formats, frame sizes, or frame rebuild the world after mankind has
rates. It is a very flexible tool with almost been destroyed by nuclear
which you can mix and switch clips missiles. The game offers campaign,
from the keyboard, use dozens of multi-player and single-player
real-time effects, trim and edit your skirmish modes.
clips in the clip editor, and bring ../software/funstuff/warzone/
them together using the multi-track
THE COMPLETE M AGAZINE ON OPEN SOURCE
L
ast time we discussed the various struct irqaction {
types of operations and system irq_handler_t handler;
calls. In this article, we will focus unsigned long flags;
more on the literature. Like I cpumask_t mask;
mentioned, there are two different modes: the const char *name;
kernel and the user mode. Let’s look at the two void *dev_id;
types of switching. The first is when you make struct irqaction *next;
a system call. After calling it, the task will go int irq;
for codes that are operational in the kernel struct proc_dir_entry *dir;
mode. The other case is when you deal with };
interrupt requests (IRQs). Soon after an IRQ, a
handler is called and the control goes back to extern irqreturn_t no_action(int cpl, void *dev_id);
the task that was interrupted. extern int __must_check request_irq(unsigned int, irq_
A system call may be used when you want handler_t handler,
to access a particular I/O device or file, or unsigned long, const char *, void *);
when you need to get privileged information. It extern void free_irq(unsigned int, void *);
may also be used when you require to execute
a command or to change the execution struct device;
context.
Now let me elucidate the whole process extern int __must_check devm_request_irq(struct device *dev,
that governs an IRQ event. We’ll assume unsigned int irq,
that a particular process is running. An IRQ irq_handler_t handler, unsigned long irqflags,
may occur while the process is running. const char *devname, void *dev_id);
Then, the task will be interrupted to call extern void devm_free_irq(struct device *dev, unsigned int
the corresponding interrupt handler and it irq, void *dev_id);
is executed right there. In the next step, as
mentioned before, the control goes back to the
task (which is running in user mode) and the Non-free elements in the kernel
process is back to its original state. In an earlier column, I had discussed the non-
Advanced users can comprehend the mode free code portions in the kernel. And I received
of initiation by looking at the code below: a number of queries regarding the subject. So, I
think it is appropriate to discuss it here.
typedef irqreturn_t (*irq_handler_t)(int, void *); It is true that the kernel ( from the original
clean_file () {
#$1 = filename #$1 = filename
if test ! -f $1; then if $have_check; then
die $1 does not exist, something is wrong if test ! -f $1; then
fi die $1 does not exist, something is wrong
rm -v $1 fi
} name=$1
echo Removing blobs from $name
check_changed () { set fnord “$@” -d
if test ! -f $1; then shift 2
die $1 does not exist, something is wrong $check “$@” -i linux-$kver $name > $name.deblob
elif cmp $1.deblob $1 > /dev/null; then check_changed $name
die $1 did not change, something is wrong else
fi clean_file $1
mv $1.deblob $1 fi
} }
clean_blob () { clean_kconfig () {
resource drivers/scsi/53c700.scr \
Subsystem dependency
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped \
drivers/scsi/aic7xxx/aic79xx.seq \
Figure 3: Process scheduler dependencies drivers/scsi/aic7xxx/aic7xxx_seq.h_shipped \
drivers/scsi/aic7xxx/aic7xxx.seq \
#$1 = filename $2 = things to remove drivers/scsi/aic7xxx_old/aic7xxx_seq.c \
echo Marking config $2 as depending on NONFREE in $1 drivers/scsi/aic7xxx_old/aic7xxx.seq \
sed “/^config \\($2\\)\$/{p;i\ drivers/scsi/53c7xx_d.h_shipped \
depends on NONFREE drivers/scsi/53c7xx.scr \
d;}” $1 > $1.deblob drivers/scsi/sym53c8xx_2/sym_fw1.h \
check_changed $1 drivers/scsi/sym53c8xx_2/sym_fw1.h \
} drivers/scsi/sym53c8xx_2/sym_fw2.h \
drivers/scsi/sym53c8xx_2/sym_fw2.h \
clean_mk () { drivers/usb/serial/keyspan_pda_fw.h \
#$1 = config $2 = Makefile name drivers/usb/serial/keyspan_pda.S \
# We don’t clean up Makefiles any more --lxoliva drivers/usb/serial/xircom_pgs_fw.h \
# sed -i “/\\($1\\)/d” $2 drivers/usb/serial/xircom_pgs.S \
sound/pci/cs46xx/imgs/cwcbinhack.h \
mmap
System-Call
sound/pci/cs46xx/imgs/cwcdma.asp \ mmap
Interface
; do
if test ! $f; then
mremap filemap
For your reference, here are the functions memory swap kswapd memory
performed by the scripts:
deblob-main: The main script used to clean up
the Linux tarball.
deblob-check: The script that finds blobs. It may Legend:
Architecture Specific resource
also clean up work. Modules
dependency
#######################
fs
# Removed ATM Drivers #
#######################
mm ipc Legend:
mmap
subsystem
# ATM_AMBASSADOR - Madge Ambassador (Collage PCI 155
swap resource
Server) dependency
sched core
clean_blob drivers/atm/atmsar11.data source module
architecture net
grouping
specific
# ATM_FORE200E_PCA
# ATM_FORE200E_SBA - SBA-200E Figure 5: Memory manager dependencies
clean_kconfig drivers/atm/Kconfig ‘ATM_FORE.*’
clean_mk CONFIG_ATM_FORE200E drivers/atm/Makefile
shares the system’s resources may be termed as a
clean_file drivers/atm/pca200e.data task. And by multi-tasking, we are actually referring
clean_file drivers/atm/pca200e_ecd.data to the effective sharing of these resources among the
clean_file drivers/atm/sba200e_ecd.data tasks. Here, the system can switch from one task to
clean_kconfig drivers/atm/Kconfig ‘ATM_AMBASSADOR’ another after a given timeslice time (say 10 ms). This
clean_mk CONFIG_ATM_AMBASSADOR drivers/atm/Makefile gives an impression that many tasks are handled
simultaneously.
The interesting point is that maintaining Linux- Here are the detailed steps of the process: Let’s
libre is not a time-consuming process. And there are say task1 is running and using the resources. Then, a
scripts that will inform the project manager whether resource request will be made that forces the system
there is anything that needs manual intervention. to put the task1 in the block list and choose task2
David Woodhouse suggested having a separate from the ready list for task switching. This is what
branch of the kernel source tree (which would be happens when it comes to two tasks. You can extend
excluded from a normal kernel build process) for this idea to N number of tasks by choosing a timer
non-free firmware. Thus, the non-free firmware IRQ for the switching stage.
could be distributed in a separate package. But the Having discussed these ideas, we can now go back
idea of ‘complete freedom’, as proposed by Linux- to the sub-system structure of the operating system.
libre, is not respected here. The process scheduler is employed to:
Allow processes to create fresh copies
Outline of Linux kernel Send signals to the user processes
Now let’s consider the idea of tasks. We have Manage the timer
already seen that Linux supports multi-tasking. Any Select the process that can access the CPU
application that runs the memory of the system and Receive interrupts and route them to the
Filesystem
We have already seen that Linux has been ported By: Aasis Vinayak PG
to various platforms ranging from computers to The author is a hacker and a free software activist who does
wristwatches. We know that even for one particular programming in the open source domain. He is the developer
device, say a hard drive, there are many differences of V-language—a programming language that employs AI
and ANN. His research work/publications are available at
in the interfaces used by different vendors. Linux www.aasisvinayak.com
supports a large number of logical filesystems. Thus,
D
Trace is a dynamic tracing components of the DTrace framework. The
facility built into the Solaris and graphic in Figure 1 (reproduced from the
Open Solaris operating systems DTrace how-to at www.sun.com/software/
and can be used by systems solaris/howtoguides/dtracehowto.jsp)
administrators and developers to observe the illustrates the DTrace framework and its
runtime behaviour of user-level programs various components. Note that ‘probes’, about
and of the OS itself. On one hand, DTrace which we will learn more shortly (and not
can be used to identify potential bottlenecks shown in the figure) can be best visualised as
in the running processes on a production sensors available to be probed by the DTrace
system, while on the other hand it can help consumers in user space.
you understand the runtime behaviour of an We shall now learn the basic DTrace
external program such as MySQL better. concepts that will help us during some serious
Originally available on Solaris, DTrace has playing around with DTrace and MySQL.
now been ported to Mac OSX, FreeBSD and
an experimental Linux port is also available. Probes, providers and consumers
In this article, I shall use the OpenSolaris DTrace dynamically modifies the operating
2008.11 release to demonstrate how it works. system kernel and user processes to
record data at locations of interest (or
Some concepts first instrumentation points) called probes. The
The DTrace architecture [check the References] probe is user specified, and its specificity and
gives you a good look at the various description determine the benefit derived
Using DTrace with MySQL the same, but will have other text at the starting and the
As mentioned earlier, there are two ways in which DTrace ending. We can use “nm” to see the garbled names:
can be used with any user-level process—USDT and the
PID provider. We shall see demonstrations of both these nm mysqld | grep mysql_parse
mechanisms as we start using DTrace with the MySQL “2”:1134 | 136472368| 640|FUNC |GLOB |0 |13 |__1cLmysql_
server, or specifically ‘mysqld’. One thing to note here is parse6FpnDTHD_pkcIp3_v_
that DTrace one-liners can be used to demonstrate a lot of
what we will be doing. But, to make the learning easier, we Hence, we shall simply use the regex ‘*’ at the beginning
will use D-scripts, however small they may be. Familiarity and end of the function name in our D scripts.
with the MySQL source code is required to derive the
maximum advantage from the rest of the article. • Watching queries
Before I start off with writing D scripts, here are some
common points worth noting: #!/usr/sbin/dtrace -q
Like a shell script, you can make a D script executable pid$target::*mysql_parse*:entry /* This probe is fired when the execution
by using chmod +x and specifying the location of the enters mysql_parse */
script interpreter using a #!, like: #!/usr/sbin/dtrace. {
You can specify various switches to dtrace. For printf(“Query: %s\n”, copyinstr(arg1));
example, to specify a D script to dtrace, you will use the }
-s switch.
The parameters of the function being traced are Save this script to a file, say watch.d. A D script is
available to a D script using built-in variables: arg0, specified to dtrace with the -s switch. The Process ID (PID)
arg1, arg2... Other built-in variables like timestamp, specified via the switch -p is automatically made available
walltimestamp are described at docs.sun.com/app/ to the $target macro in the D script.
docs/doc/817-6223/chp-variables-5?a=view. timestamp Now, run the D script, watch.d:
gives the current value of a nanosecond counter, which
increments from an arbitrary time in the past and is $ pfexec dtrace -s watch.d -p `pgrep -x mysqld`
useful for relative time calculation. walltimestamp, the
current number of nanoseconds since UTC, is more Fire up a MySQL client and run some queries. The D
suited when date/time value is required. script should display the queries that you executed from
copyinstr is used to copy the value of a char* type the client:
parameter to a variable in your D script. By default,
strings up to a maximum size of 256 can be stored. You Query: show databases
can change it using #pragma D option strsize=1024. Query: show variables
When monitoring probes for a multi-threaded Query: show engines
application, such as mysqld, it is essential that each Query: SELECT DATABASE()
thread (and its variables) is treated as such. Thread- Query: show databases
local variables, denoted using a “self->”: makes it Query: show tables
possible to prevent corruption of the variables of one Query: show tables
thread by another. Query: select * from foo
DTrace allows use of clause-local variables. To declare
a variable as clause-local, specify it as this->, such as • Follow the query execution: An SQL query before
this->bar. As suggested by its name, the scope of a execution passes through various other stages, the first of
clause-local variable is limited to the probe clause or which is the query parsing. The query parsing is taken care
predicate, in which it is used. For more information on of by the mysql_parse function in sql/sql_parse.cc. Since
thread-local and clause-local variables, please refer to all the other stages, such as query optimisation and, finally,
wikis.sun.com/display/DTrace/Variables. execution follows from there, by using the following script,
A number of macro variables are available in DTrace. A we can track all the functions that call and return from
very commonly used one is “$target”: which is used in after mysql_parse:
scripts using the PID provider.
#!/usr/sbin/dtrace
Using the PID provider #pragma D option flowindent
To use the PID provider, you need to have a mysqld
instance running on an (Open)Solaris system. (You won’t pid$target::*mysql_parse*:entry
need any special build of MySQL for this.) Please note that {
the function names are garbled in a binary. Hence any self->start = vtimestamp;
command, for example, mysql_parse will not be exactly
To dig into MySQL internals, as above, please refer 135 mysql23509 mysqld __1cQdispatch_command6FnTenum_server_
to forge.mysql.com/wiki/MySQL_Internals. You are command_pnDTHD_pcI_b_ command-done
also advised to refer to the book Understanding MySQL 136 mysql23509 mysqld __1cQdispatch_command6FnTenum_server_
The best place for you to buy and sell FOSS products and services
HIGHLIGHTS
A cost-effective marketing tool
A user-friendly format for customers to contact you
A dedicated section with yellow back-ground, and hence will stand out
Reaches to tech-savvy IT implementers and software developers
80% of LFY readers are either decision influencers or decision takers
Discounts for listing under multiple categories
Discounts for booking multiple issues
FEATURES
Listing is categorised on the basis of products and services
Complete contact details plus 30-word description of organisation
Option to print the LOGO of the organisation too (extra cost)
Option to change the organisation description for listings under different categories
TARIFF
Category Listing Value-add Options
ONE Category......................................................... Rs 2,000 LOGO-plus-Entry....................................................... Rs 500
TWO Categories...................................................... Rs 3,500 Highlight Entry (white background)............................. Rs 1,000
THREE Categories................................................... Rs 4,750 Per EXTRA word (beyond 30 words).......................... Rs 50
ADDITIONAL Category............................................ Rs 1,000
ORDER FORM
Organisation Name (70 characters):����������������������������������������������������������������������������������������������������������
Description (30 words):______________________________________________________________________________________________________________________
_________________________________________________________________________________________________________________________________________
Email:___________________________________________________________________ Website: _________________________________________________________
STD Code: __________________Phone: ____________________________________________________________ Mobile:_____________________________________
Address (will not be publshed):_______________________________________________________________________________________________________________
_____________________________________________________ City/Town:__________________________________________ Pin-code:_________________________
Categories
Consultants High Performance Computing Software Development
Consultant (Firm) IT Infrastructure Solutions Training for Professionals
Embedded Solutions Linux-based Web-hosting Training for Corporate
Enterprise Communication Solutions Mobile Solutions Thin Client Solutions
Please find enclosed a sum of Rs. ___________ by DD/ MO//crossed cheque* bearing the No. _________________________________________ dt. _ ________________ in favour of
EFY Enterprises Pvt Ltd, payable at Delhi. (*Please add Rs. 50 on non-metro cheque) towards the cost of ___________________ FOSS Yellow Pages advertisement(s)
or charge my credit card VISA Master Card Please charge Rs. _________________
against my credit card No. C V V No. ___________ (Mandatory)
Date of Birth _____ / _____ / _________ (dd/mm/yy) Card Expiry Date _______ / _______ (mm/yy)
EFY Enterprises Pvt Ltd., D-87/1, Okhla Industrial Area, Phase 1, New Delhi 110 020
Ph: 011-26810601-03, Fax: 011-26817565, Email: info@efyindia.com; Website: www.efyindia.com Signature (as on the card)
To Book Your Listing, Call: Dhiraj (Delhi: 09811206582), Somaiah (B’lore: 09986075717)
www.LinuxForU.com | LINUX For You | July 2009 | 107
FOSS Yellow Pages
The best place for you to buy and sell FOSS products and services
To advertise in this section, please contact:
Dhiraj (Delhi) 09811206582, Somaiah (Bangalore) 09986075717
Advent Infotech Pvt Ltd Mobile: +91 99306 48405 New Delhi-110019
Advent has an experienced techno- Email: business@cloverinfotech.com Tel: 011-30880046, 30880047
marketing team with several years of Web: www.cloverinfotech.com Mobile: 09810477448, 09891074905 A company focussed on Enterprise
experience in Networking & Telecom Email: info@keenable.com Solution using opensource software.
business, and is already making Duckback Information Systems Web: www.keenable.com Key Solutions:
difference in market place. ADVENT Pvt Ltd • Enterprise Email Solution
qualifies more as Value Added A software house in Eastern India. LDS Infotech Pvt Ltd • Internet Security and Access
Networking Solution Company, we Business partner of Microsoft, Is the authorised partner for RedHat Control
offers much to customers than just Oracle, IBM, Citrix , Adobe, Redhat, Linux, Microsoft, Adobe, Symantec, • Managed Services for Email
Routers, Switches, VOIP, Network Novell, Symantec, Mcafee, Computer Oracle, IBM, Corel etc. Software Infrastructure.
Management Software, Wireless Associates, Veritas , Sonic Wall Services Offered: •Collaborative Mumbai
Solutions, Media Conversion, etc. Kolkata Solutions •Network Architecture Tel: 022-66338900; Extn. 324
New Delhi Tel: 033-22835069, 9830048632 •Security Solutions •Disaster Recovery Email: sales@technoinfotech.com
Tel: 46760000, 09311166412 Fax: 033-22906152 •Software Licensing •Antivirus Solutions. Web: www. technoinfotech.com
Fax: 011-46760050 Email: asis@duckback.com Mumbai
Email: marketingsupport@ Web: www.duckback.co.in Tel: 022-26849192 Tetra Information Services Pvt Ltd
adventelectronics.com Email: sales@ldsinfotech.com One of the leading open source
Web: www.adventelectronics.com HBS System Pvt Ltd Web: www.ldsinfotech.com provders. Our cost effective business
System Integrators & Service ready solutions caters of all kind of
Asset Infotech Ltd Provider.Partner of IBM, DELL, HP, Pacer Automation Pvt Ltd industry verticles.
We are an IT solution and training Sun, Microsoft, Redhat, Trend Micro, Pacer is leading providers of IT New Delhi
company with an experience of 14 Symentic Partners of SUN for their Infrastructure Solutions. We are Tel: 011-46571313, Fax: 011-41620171
years, we are ISO 9001: 2000. We new startup E-commerce initiative partners of HP, Redhat, Cisco, Email: sales@tetrain.com
are partners for RedHat, Microsoft, Solution Provider on REDHAT, Vwmare, Microsoft and Symantec. Our Web: www.tetrain.com
Oracle and all Major software SOLARIS & JAVA core expertise exists in, Consulting,
companies. We expertise in legal New Delhi building and Maintaining the Complete Tux Technologies
software ans solutions. Tel: 011-25767117, 25826801/02/03 IT Infrastructure. Tux Technologies provides
Dehradun Fax: 25861428 Bangalore consulting and solutions based on
Tel: 0135-2715965, Mobile: 09412052104 Email: amittal@hbsindia.com Tel: 080-42823000, Fax: 080-42823003 Linux and Open Source software.
Email: piyush@asset.net.in Email: solutions@pacerautomation.com Focus areas include migration, mail
Web: www.asset.net.in Web: www.pacerautomation.com servers, virus and spam filtering,
clustering, firewalls, proxy servers,
BakBone Software Inc. Ingres Corporation VPNs, server optimization.
BakBone Software Inc. delivers Ingres Corporation is a leading New Delhi
complexity-reducing data protection provider of open source database Tel: 011-27348104, Mobile: 09212098104
technologies, including award- software and support services. Email: info@tuxtechnologies.co.in
winning Linux solutions; proven Ingres powers customer success Red Hat India Pvt Ltd Web: www.tuxtechnologies.co.in
Solaris products; and application- by reducing costs through highly Red Hat is the world's leading
focused Windows offerings that innovative products that are hallmarks open source solutions provider. Veeras Infotek Private Limited
reliably protect MS SQL, Oracle, of an open source deployment and Red Hat provides high-quality, An organization providing solutions
Exchange, MySQL and other uniquely designed for business critical affordable technology with its in the domains of Infrastructure
business critical applications. applications. Ingres supports its operating system platform, Red Integration, Information Integrity,
New Delhi customers with a vibrant community Hat Enterprise Linux, together with Business Applications and
Tel: 011-42235156 and world class support, globally. applications, management and Professional Services.
Email: ashish.gupta@bakbone.com Based in Redwood City, California, Services Oriented Architecture (SOA) Chennai
Web: www.bakbone.com Ingres has major development, sales, solutions, including JBoss Enterprise Tel: 044-42210000, Fax: 28144986
and support centers throughout Middleware. Red Hat also offers Email: info@veeras.com
Clover Infotech Private Limited the world, and more than 10,000 support, training and consulting Web: www.veeras.com
Clover Infotech is a leading customers in the United States and services to its customers worldwide.
technology services and solutions internationally. Mumbai
provider. Our expertise lies in New Delhi Tel: 022-39878888 Want to register
supporting technology products Tel: 011-40514199, Fax: +91 22 66459537 Email: marketing-in@redhat.com your organisation in
related to Application, Database, Email: sales@ingres.com; info@ingres.com Web: www.redhat.in FOSS Yellow Pages
Middleware and Infrastructure. We
FREE
Web: www.ingres.com
enable our clients to optimize their Srijan Technologies Pvt Ltd
*
business through a combination of Keen & Able Computers Pvt Ltd Srijan is an IT consulting company
best industry practices, standard Open Source Solutions Provider. engaged in designing and
processes and customized client
engagement models. Our core
Red Hat Ready Business Partner.
Mail Servers/Anti-spam/GUI
building web applications, and IT
infrastructure systems using open
For
services include Technology interface/Encryption, Clustering & source software. Call: Dhiraj (Delhi) 09811206582
Consulting, Managed Services and Load Balancing - SAP/Oracle/Web/ New Delhi
Somaiah (Bangalore) 09986075717
Application Development Services. Thin Clients, Network and Host Tel: 011-26225926, Fax: 011-41608543
Mumbai Monitoring, Security Consulting, Email: business@srijan.in *Offer for limited period.
Tel: 022-2287 0659, Fax: 022-2288 1318 Solutions, Staffing and Support. Web: www.srijan.in
Linux-Based Web-Hosting Linux Vendor/Distributors DeepRoot Linux Pvt Ltd BitDefender Antivirus products.
Pure & Exclusive Free Software New Delhi
Manas Hosting GT Enterprises Business. Creators of the deepOfix Tel: 011-26288583, Fax: 011-26219396
ManasHosting is a Bangalore- Authorized distributors for Red Mail Server. We provide: airtight Email: isales@unistal.com
based company that is dedicated in Hat and JBoss range of products. solutions, solid support and Freedom Web: www.unistal.com
helping small and midsize business We also represent various OS’s We believe in: sharing, compassion
companies to reach customers Applications and Developer Tools like and plain action. Backed by full-time
online. We believe that by creating SUSE, VMWare, Nokia Qt, MySQL, hackers. Quick deployment, easy Software and Web
a website, all you have is just web Codeweavers, Ingres, Sybase, management. Guaranteed. Development
presence; but to get effective Zimbra, Zend-A PHP Company, Bangalore
traffic on your website, it is equally High Performance Computing Tel: 080-40890000 Bean eArchitect Integrated Services
important to have a well designed Solutions from The Portland Group, Email: start@deeproot.co.in Pvt Ltd
one. This is why we provide the best Absoft, Pathscale/Qlogic and Web: www.deeproot.in Application Development, Web
of Web Hosting and Web Designing Intel Compilers, Scalix-Messaging Design, SEO, Web Marketing, Web
services. Also, our services are solution on Linux Platform. Development.
backed with exceptionally good Bangalore Navi Mumbai
quality and low costs Mobile: +91-9845009939, +91-9343861758 Tel: 022-27821617, Mobile: 9820156561
Bangalore Email : sales@gte-india.com Fax: 022-27821617
Tel: 080-42400300 Web: www.gte-india.com InfoAxon Technologies Ltd Email: infodesk@beanarchitect.com
Email: enquiry@manashosting.com InfoAxon designs, develops and Web: www.beanarchitect.com
Web: www.manashosting.com Taurusoft supports enterprise solutions stacks
Contact us for any Linux Distribution leveraging open standards and open Mr Site Takeaway Website Pvt Ltd
at reasonable rates. Members get source technologies. InfoAxon’s Our product is a unique concept in
Linux Desktop additional discounts and Free CD/ focus areas are Business Intelligence, India usingwhich a person without
DVDs with each purchase. Visit our CRM, Content & Knowledge having any technical knowledge can
Indserve Infotech Pvt Ltd website for product and membership Management and e-Learning. create his website within 1 hour; we
OpenLx Linux with Kalcutate details Noida also have a Customer Care Center
(Financial Accounting & Inventory Mumbai Tel: 0120-4350040, Mobile: 09810425760 in India for any kind ofafter sales
on Linux) offers a complete Mobile: 09869459928, 09892697824 Email: sales@infoaxon.com help. We are already selling it world
Linux Desktop for SME users. Email: taurusoft@gmail.com Web: http://opensource.infoaxon.com over with over 65,000 copiessold.
Its affordable (Rs. 500 + tax as Web: www.taurusoft.netfirms.com It comes with FREE Domain Name,
special scheme), Friendly (Graphical Integra Micro Software Services (P) Web Hosting and Customer Care
UserInterface) and Secure (Virus Ltd Center forFree Support via Phone
free). Software Subscriptions Integra focuses on providing and Email and features like PayPal
New Delhi professional services for software Shopping Cart, Guestbook, Photo
Tel: 011-26014670-71, Fax: 26014672 Blue Chip Computers development and IP generation Gallery, Contact Form, Forums,
Email: info@openlx.com Available Red Hat Enterprise Linux, to customers. Integra has a major Blogs and many more. The price
Web: www.openlx.com Suse Linux Enterprise Server / practice in offering Telecom Services ofcomplete package is just Rs
Desktop, JBoss, Oracle, ARCserve and works for Telecom companies, 2,999 per year.
Backup, AntiVirus for Linux, Verisign/ Device Manufacturers, Networking Patiala
Linux Experts Thawte/GeoTrust SSL Certificates and companies, Semiconductor and Mobile: 91-9780531682
many other original software licenses. Application development companies Email: pardeep@mrsite.co.in
Intaglio Solutions Mumbai across the globe. Web: www.mrsite.co.in
We are the training and testing Tel: 022-25001812, Mobile: 09821097238 Bangalore
partners of RedHat and the first to Email: bluechip@vsnl.com Tel: 080-28565801/05, Fax: 080-28565800 Salah Software
conduct RHCSS exam in delhi for the Web: www.bluechip-india.com Email: tpvarun@integramicro.com We are specialized in developing
first time ever. Web: www.integramicroservices.com custom strategic software solutions
New Delhi using our solid foundation on
Tel: 011-41582917, 45515795 Software Development iwebtune.com Pvt Ltd focused industry domains and
Email: info@intaglio-solutions.com iwebtune.com is your one-stop, total technologies.Also providing superior
Web: www.intaglio-solutions.com Carizen Software (P) Ltd web site support organisation. We Solution Edge to our Clients to
Carizen’s flagship product is provide high-quality website services enable them to gain a competitive
Rainmail Intranet Server, a complete and web based software support to edge and maximize their Return on
integrated software product any kind of websites, irrespective of Investments (ROI).
To advertise in this section, consisting modules like mail sever, the domain or the industry segments. New Delhi
proxy server, gateway anti-virus Bangalore Tel: 011-41648668, 66091565
please contact scanner, anti-spam, groupware, Tel: 080-4115 2929 Email: ceo@salahsoftware.com
Somaiah (B’lore: bandwidth aggregator & manager, Email: santosh@iwebtune.com Web: www.salahsoftware.com
firewall, chat server and fax server. Web: www.iwebtune.com
09986075717) Dhiraj (Delhi:
Infrastructure.
09811206582) on Chennai Unistal Systems Pvt Ltd
Tel: 044-24958222, 8228, 9296 Unistal is pioneer in Data Recovery
011-2681-0602 Extn. 222 Email: info@carizen.com Software & Services. Also Unistal is
Web: www.carizen.com national sales & support partner for
Thin Client Solutions Tel: 022-25714500, 25714586, 25714585, Email: info@gujaratinfotech.com Email: info@nhindia.com
25714586 Web: www.gujaratinfotech.com Web: www.nhindia.com
Digital Waves Fax: 022-25706700
The ‘System Integration’ business Email: contact@cettm.mtnl.in Lynus Academy Pvt Ltd Network NUTS
unit offers end-to-end Solutions on Web: http://cettm.mtnl.in/infra India’s premier Linux and OSS India’s only Networking Institute
Desktops, Servers, Workstations, training institute. by Corporate Trainers. Providing
HPC Clusters, Render Farms, Complete Open Source Solutions Chennai Corporate and Open classes
Networking, Security/Surveillance RHCT, RHCE and RHCSS training. Tel: 044-42171278, 9840880558 for RHCE / RHCSS training and
& Enterprise Storage. With our Hyderabad Email: contactus@lynusacademy.com certification. Conducted 250+ Red
own POWER-X branded range Tel: 040-66773365, 9849742065 Web: www.lynusacademy.com Hat exams with 95% result in last 9
of Products, we offer complete Email: nayak.sujeet@gmail.com months. The BEST in APAC.
Solutions for Animation, HPC Web: www.cossindia.com Linux Learning Centre Private Limited New Delhi
Clusters, Storage & Thin-Client Pioneers in training on Linux Tel: 46526980-2
Computing ElectroMech technologies. Mobile: 09310024503, 09312411592
Mobile: 09880715253 Redhat Linux and open source Bangalore Email: info@networknuts.net
Email: ranga@digitalwaves.in solution , RHCE, RHCSS training Tel:080-22428538, 26600839 Web: www.networknuts.net
Web: www.digitalwaves.in and exam center,Ahmedabad and Email: info@linuxlearningcentre.com
Vadodara Web: www.linuxlearningcentre.com STG International Ltd
Enjay Network Solutions Ahmedabad An IT Training and Solution
Gujarat based ThinClient Solution Tel: 079-40027898 Maze Net Solutions (P) Ltd Company,Over an experience of
Provider. Providing Small Size Email: electromech@electromech.info Maze Net Solution (P) Ltd, is a pioneer 14years.We are ISO 9001:2000
ThinClient PCs & a Full Featured Web: www.electromech.info in providing solutions through on Certified.Authorised Training Partners
ThinClient OS to perfectly suite needs time, quality deliverables in the fields of Red Hat & IBM-CEIS. We cover all
of different working environment. Focuz Infotech of BPO, Software and Networking, Software Trainings.
Active Dealer Channel all over India. Focuz Infotech Advanced Education while providing outstanding training New Delhi
Gujarat is the quality symbol of high-end to aspiring IT Professionals and Call Tel: 011-40560941-42, Mobile:
Tel.: 0260-3203400, 3241732, 3251732, Advanced Technology Education in Center Executives. Backed by a team 09873108801
Mobile: 09377107650, 09898007650 the state. We are providing excellent of professional workforce and global Email: rakhi@stg.in
Email: info@enjayworld.com services on Linux Technology alliances, our prime objective is to offer Web: www.stgonline.com
Web: www.enjayworld.com Training, Certifications and live the best blend of technologies in the www.stgglobal.com
projects to students and corporates, spheres of Information Technology (IT)
since 2000. and Information Technology Enabled
Training for Corporate Cochin
Tel: 0484-2335324
Services (ITES).
Chennai Categories
Bascom Bridge Email: enquiry@focuzinfotech.com Tel: 044-45582525
For FOSS
Bascom Bridge is Red Hat Certified Web: www.focuzinfotech.com Email: info@mazenetsolution.com
partner for Enterprise Linux 5 and also Web: www.mazenetsolution.com
providing training to the individuals G-TEC Computer Education
and corporate on other open source ISO 9001:2000 certified IT Netweb Technologies
technologies like PHP, MySQL etc.
Ahmedabad
Company, International Testing
Centre, Specialised in Multimedia
Simplified and scalable storage
solutions.
Yellow
Tel: 079-27545455—66 & Animation, conduct MCP, Bangalore
Fax: 079-27545488
Email: info@bascombridge.com
MCSE 2000, MCDBA and MCSA
certificates, CCNA, CCNP, the Only
Tel: 080-41146565, 32719516
Email: info@netwebindia.com Pages
Web: www.bascombridge.com authorized centre by INTERNATIONAL Web: www.netwebindia.com
AND EUROPEAN COMPUTER
Brainnet UNION to conduct ICDL, Adobe New Horizons India Ltd Consultants
Kolkata Certifications, training on Web New Horizons India Ltd, a joint
Consultant (Firm)
Tel: 033-40076450 Designing, Tally, Spoken English. venture of New Horizons Worldwide,
Email: brainnet@brainware-india.com Conducts Corporate and institutional Inc. (NASDAQ: NEWH) and the Embedded Solutions
Web: www.brainware-india.com training. International certifications Shriram group, is an Indian company
issued. operational since 2002 with a global Enterprise Communication
Centre for Excellence in Telecom Bangalore foot print engaged in the business
Technology and Management Tel: 080-43567000 of knowledge delivery through Solutions
(CETTM), MTNL Email: gtec.indiranagar@gmail.com acquiring, creating, developing,
High Performance Computing
MTNL’s Centre for Excellence managing, lending and licensing
in Telecom Technology and Gujarat Infotech Ltd knowledge in the areas of IT, Applied IT Infrastructure Solutions
Management (CETTM) is a state of GIL is a IT compnay and 17 years of Learning. Technology Services and
the art facility to impart Technical, expericence in computer training field. Supplementary Education. The Linux-based Web-hosting
Managerial and corporate training to We have experience and certified company has pan India presence
Telecom; Management personnel. faculty for the open Source courses with 15 offices and employs 750 Mobile Solutions
CETTM has AC lecture halls, like Redhat, Ubantoo,and PHP, Mysql people.
computer Labs and residential facility. Ahmedabad New Delhi Software Development
Mumbai Tel: 079-27452276, Fax: 27414250 Tel: 011-43612400
TNS Institute of Information Mobile: 09393733174 (CCNP) Faculty , 3 Microsoft Certified GT Computer Hardware Engineering
Technology Pvt Ltd Email: aict.hybd@amrita.ac.in Faculties having state Of The Art IT College (P) Ltd
Join RedHat training and get Web: www.amritahyd.org Infrastructure Flexible Batch Timings Imparting training on Computer
100% job gaurantee. World's most Available..Leading Networking Hardware Networking, Mobile
respected Linux certification. After Centre For Industrial Research and Institute in Marathwada Phone Maintenance & International
RedHat training, you are ready to join Staff Performance Aurangabad Certifications
as a Linux Administrator or Network A Unique Institute catering to the Tel: 0240-3299509, 6621775 Jaipur
Engineer. need for industries as well as Email: aurangabad@cmsinstitute.co.in Tel: 0141-3213378
New Delhi Students for trainings on IT, CISCO Web: www.cmsaurangabad.com Email: franchise_gt@gteducation.net
Tel: 011-3085100, Fax: 30851103 certification, PLC, VLSI, ACAD, Web: www.gteducation.net
Email: nks@tiit.co.in Pneumatics, Behavior Science and Cyber Max Technologies
Web: www.tiit.co.in Handicraft. OSS Solution Provider, Red Hat HCL Career Development Centre
Bhopal Training Partners, Oracle,Web, Thin Bhopal
Webel Informatics Ltd Tel: 0755-2661412, 2661559 Clients, Networking and Security As the fountainhead of the most
Webel Informatics Ltd (WIL), a Fax: 0755-4220022 Consultancy. Also available CCNA significant pursuit of human mind (IT),
Government of West Bengal Email: crisp@crispindia.com and Oracle Training on Linux. Also HCL strongly believes, “Only a Leader
Undertaking. WIL is Red Hat Training Web: www.crispindia.com available Laptops & PCs can transform you into a Leader”.
Partner and CISCO Regional Bikaner HCL CDC is a formalization of this
Networking Academy. WIL conducts Center for Open Source Development Tel: 0151-2202105, Mobile: 09928173269 experience and credo which has
RHCE, RHCSS, CCNA, Hardware And Research Email: cmtech.bikaner@gmail.com, been perfected over three decades.
and Software courses. Linux, open source & embedded kr.gupta.ashish@gmail.com Bhopal
Kolkata system training institute and Tel: 0755-4094852
Tel: 033-22833568, Mobile: 09433111110 development. All trainings provided by Disha Institute Email: bhopal@hclcdc.in
Email: enquiry@webelinformatics.com experienced exports & administrators A franchisee of Unisoft Technologies, Web: www.hclcdc.in
Web: www.webelinformatics.com only. Quality training (corporate and Providing IT Training & Computer
individual). We expertise in open Hardware & Networking IINZTRIX E Technologies Pvt Ltd
source solution.Our cost effective Dehradun No. 1 Training prvinder in this region.
Training for Professionals business ready solutions caters of all Tel: 3208054, 09897168902 meerut
kind of industry verticals. Email: thedishainstitute@gmail.com Tel: 0121-4020111, 4020222
AEM New Delhi Web: www.unisofttechnologies.com Mobile: 09927666664
AEM is the Best Certified Redhat Mobile: 09312506496 Email: jai@iintrix.com
Training Partner in Eastern India since Email: info@cfosdr.com EON Infotech Limited (TECHNOSchool) Web: www.iintrix.com
last 3 years. AEM conducted more Web: www.cfosdr.com TechnoSchool is the most happening
than 500 RHCE exams with 95- Training Centre for Red Hat (Linux- Indian Institute of Job Oriented
100% pass rate. Other courses— Cisconet Infotech (P) Ltd Open Source) in the Northern Region. Training Centre
RHCSS,SCNA,MCSE,CCNA. Authorised Red Hat Study cum Exam We are fully aware of the Industry's Ahmedabad
Kolkata Centre. Courses Offered: RHCE, requirement as our Consultants are Tel: 079-40072244—2255—2266
Tel: 033-25488736, Mobile: 09830075018 RHCSS, CCNA, MCSE from Linux industry. We are committed Mobile: 09898749595
Email: sinhatuhin1@gmail.com Kolkata to make you a total industry ready Email: info@iijt.net
Web: www.aemk.org Tel: 033-25395508, Mobile: 09831705913 individual so that your dreams of a Web: www.iijt.net
Email: info@cisconetinfo.com professional career are fulfilled.
Agam Institute of Technology Web: www.cisconetinfo.com Chandigarh Institute of Advance Network
In Agam Institute of Technology, we Tel: 0172-5067566-67, 2609849 Technology (IANT)
provide hardware and networking CMS Computer Institute Fax: 0172-2615465 •Hardware Engg.•Networking
training since last 10 years. We Red Hat Training partner with 3 Red Email: info@technoschool.net •Software Engg. •Multimedia
specialise in open source operating Hat Certified Faculties, Cisco Certified Web: http://technoschool.net Training.
systems like Red Hat Linux since we Ahmedabad
are their preferred training partners. Tel: 079-32516577, 26607739
Dehradun Fax: 079-26607739
Tel: 0135-2673712, Mobile: 09760099050 Email: contact @iantindia.com
Web: www.agamtecindia.com Web: www.iantindia.com
RHCSS, CLP, CLE, LPI - 1 & 2. Q-SOFT Systems & Solutions Pvt Ltd Vibrant e Technologies Ltd
New Delhi Q-SOFT is in a unique position for Vibrant e Technologies Ltd. Is a
Mobile: 09910710143, Fax: 011-25886909 providing technical training required authorised Red Hat Test and Testing
Email: info@koenig-solutions.com Netxprt institute of Advance to become a Linux Administration Centre, has won the prestigious
Web: www.koenig-solutions.com Networking under one roof. Since inception, the award “ REDHAT BEST CERTIFIED
Netxprt Noida is a Leading commitment of Q-SOFT towards TRAINING PARTNER 2007-2008’’
NACS/CIT organization to provide Open Source training is outstanding. We Train on for Western region. Vibrant offers
We are Providing Training of LINUX to training on RedHat Linux RHCT and Sun Solaris, Suse Linux & Redhat courses for RHCE 5, RHCSS etc.
Professional & Cooperate. RHCE Training with 30Hrs. extra Linux. Mumbai
Meerut exam preparation module. Bangalore Tel: 022-26285066/6701
Tel: 0121-2420587, Mobile: 9997526668 Noida Tel: 080-26639207, 26544135, 22440507 Email: vibrant@vsnl.net
Email: Info@nacsglobal.com Tel: 0120-4346847, Mobile: 09268829812 Mobile: +91 9945 282834 Web: www.vibrantcomputers.com
Web: www.nacsglobal.com Email: anoop.vyas@netxprtindia.com Email: counsellors@qsoftindia.com
Web: www.netxprtindia.com Web: www.qsoftindia.com Ultramax Infonet Technilogies Pvt Ltd
NACS Infosystems (P) Ltd Training in IT related courses
NACS is a organization which is Netzone Infotech Services Pvt Ltd Software Technology Network adn authorised testing center of
providing training for all international Special batches for MCSE, CCNA STN is one of the most Prometric, Vue and Red Hat.
certification, and also NACS is the and RHCE on RHEL 5 with exam acknowledged name in Software Mumbai
authorized Training Partner of Redhat prep module on fully equipped labs Development and Training. Apart Tel: 022-67669217
and also having testing centre including IBM servers, 20+ routers from providing Software Solutions Email: unmesh.raote@ultramaxit.com
of THOMSON PROMETRIC and and switches etc. Weekend batches to various companies, STN is also Web: www.ultramaxit.com
PEARSON VUE. are also available. involved in imparting High-end project
Meerut New Delhi based training to students of MCA Yash Infotech
Tel: 0121-2767756, Fax: 0121-4006551 Tel: 011-46015674, Mobile: 9212114211 and B.Tech etc. of various institutes. Authorized Training & Exam Center.
Mobile: 09897796603 Email: info@netzoneindia.net Chandigarh Best Performing Center in Lucknow
Email:info@nacsglobal.com, Tel: 0172-5086829 for RH Training and Examinations.
mohit@nacsglobal.com. Neuron IT Solutions Email: stn2001@rediffmail.com LINUX & Open Source training
Web: www.nacsglobal.com We offer end to end services and Web: stntechnologies.com institute for IT professionals &
support to implement and manage Corporate Offering Quality Training for
Netdiox Computing Systems your IT Infrastructure needs. We South Delhi Computer Centre RHCE, RHCSS, PHP, Shell Script,
We are one-of-a-kind center for also offer Consulting services SDCC is for providing technical Virtualization and Troubleshooting
excellence and finishing school and Training in Advanced Linux training courses (software, hardware, Techniques & Tools.
focusing on ground breaking Administration. networking, graphics) with career Lucknow
technology development around Chennai courses like DOEACC “O” and “A” Tel: 0522-4043386, Fax: 0522-4043386
distributed systems, networks, Mobile: 09790964948 Level and B.Sc(IT),M.Sc(IT),M.Tech(IT) Email: yashinfotech.lko@gmail.com
storage networks, virtualisation and Email: enquiry@neuronit.in from KARNATAKA STATE OPEN
fundamental algorithms optimized for Web: www.neuronit.in UNIVERSITY.
various appliance. New Delhi Web Hosting
Bangalore Plexus Software Security Systems Tel: 011-26183327, Fax: 011-26143642
Tel: 080-26640708 Pvt Ltd Email: southdelhicomputercentre@gmail. Perfect Innovation
Mobile: 09740846885 Plexus, incorporated in January com, southdelhicomputercentre@hotmail. Web Hosting Spider
Email: info@netdiox.com 2003 is successfully emerged as com. • Web Hosting • Web Design
one of the best IT Company for Web: www.itwhizkid.com • Web Application Development
NetMax-Technologies Networking, Messaging & Security www.itwhizkid.org • SMS Hosting • Corporate Hosting
Training Partner of RedHat,Cisco Solutions and Security Training. • Dedicated Servers
Chandigarh Networking, Messaging & Security Ssytems Quest Puducherry
Tel: 0172-2608351, 3916555 solutions is coupled with the Making Tomorrow’s professionals Tel: 0413-3202726, 3246999
Email: mail.netmax@gmail.com expertise of its training; this has TODAY Email: admin@webhostingspider.com
Web: www.netmaxtech.com put Plexus in the unique position Bangalore Web: www.webhostingspider.com
of deriving synergies between Tel: 080-41301814
Networking, Messaging & Security Email: directorv@ssystemsquest.com
Want to register
To advertise in this section, Solutions and IT Training. Web: www.ssystemsquest.com
Chennai your organisation in
please contact Tel: 044-2433 7355 Trimax FuturePerfect FOSS Yellow Pages
FREE
Email: training@plexus.co.in A Div of Trimax IT Infrastructure and
Web: www.plexus.co.in Services Limited. Redhat RHCE, *
Somaiah (B’lore:
RHCT Training & Exam Center,
09986075717) Dhiraj (Delhi: Professional Group of Education
RHCE & RHCSS Certifications
MCTS, MCITP, MCSE 03, CCNA,
CCNP, Prometric Center.
For
09811206582) on Jabalpur Mumbai Call: Dhiraj (Delhi) 09811206582
Tel: 0761-4039376, Tel: 022-40681313, Mobile: 09987705638
Mobile: 09425152831 Fax: 022-40681001 Somaiah (Bangalore) 09986075717
011-2681-0602 Extn. 222 Email: naidu.vikas@gmail.com Email: futureperfect@trimax.in *Offer for limited period.
Web: www.trimax.in