Category Archives: Linux

Compiling Osra on Ubuntu Jaunty

This is a brief HOWTO on compiling OSRA, (Optical Structure Recognition) on Ubuntu Jaunty. To quote the OSRA home page, OSRA is

… is a utility designed to convert graphical representations of chemical structures, as they appear in journal articles, patent documents, textbooks, trade magazines etc., into SMILES (Simplified Molecular Input Line Entry Specification – see or SD file – a computer recognizable molecular structure format. OSRA can read a document in any of the over 90 graphical formats parseable by ImageMagick – including GIF, JPEG, PNG, TIFF, PDF, PS etc., and generate the SMILES or SDF representation of the molecular structure images encountered within that document …

Update: I’ve a newer document that shows how to install Osra on Ubuntu 11.10 (Oneiric):

Make a directory to compile the source:

mkdir /tmp/OSRA; cd /tmp/OSRA;

Be careful doing this in /tmp is cleaned upon reboot the directory may be removed.

Install dependencies needed by the OS:

sudo apt-get install libgraphicsmagick1-dev libmagick++-dev libgraphicsmagick++1-dev potrace gocr  libtclap-dev libopenbabel-dev libopenbabel3 openbabel libnetpbm10 libnetpbm10-dev

Don’t install ocrad and remove it if it’s on your system (you can probably reinstall if you need to after you get Osra to compile):
sudo apt-get remove –purge ocrad;

Source Code:

Instead of manually getting the source packages download the sources used to build the packages for Ubuntu if available.  Make sure the src lines are commented in, in your /etc/apt/sources.list . This will automatically download and extract the code into the current directory:

cd /tmp/OSRA; apt-get source gocr ocrad potrace;

This downloads Gocr 0.46 which the OSRA docs say may not work:

– GOCR/JOCR, optical character recognition library, version 0.43 or later (version 0.45 recommended, do not use 0.46! See special instructions for 0.47 compilation below) Continue reading Compiling Osra on Ubuntu Jaunty

Killing X

On Ubuntu it used to be that ctrl-alt-backspace would kill X (the backend of the various graphical user interfaces on Linux). In an aim to be user friendly this is now disabled by default. This can be a real pain if X locks up, you can’t kill it nor change to a console.

On Debian and Ubuntu you can install the dontzap command which will allow you to kill X:

sudo apt-get install dontzap

Then run dontzap:

sudo dontzap -d

Or you can the following section to your /etc/X11/xorg.conf file (which is what the dontxzap command does):

Section "ServerFlags"
        Option  "DontZap"       "False"

See Alberto Milone’s blog for more info:

( > 3.0.8) == true ?

I use whenever I’m planning a trip any where, it’s a good source to determine who flies to what destination and whose got the lowest price. Today, there’s a wee bug on their website where they tell me I should upgrade to Firefox, this would be sound advise except for the fact that I’m using a newer version of Firefox: Firefox versioning bug

So I think someone needs to look at the math used here, because 3.0.8 is greater than This is using Firefox on Ubuntu Linux.

Update: This may not be a problem and may be a problem with how Ubuntu build Firefox. In the Firefox “about:” page (type about: in the URL bar). It reports the following:

Firefox "about:" page.

There is a Ubuntu bug that may be related to this, and I’ve added a comment and the screen-shot that’s immediately above.

Red Hat 9

I have a Red Hat 9 server that I have to support for a wee while longer. I needed to install some packages and I didn’t have the original install CD’s nor access to Red Hat’s repositories.

After lot’s and lot’s of searching I found the ISO images at:

But, there’s too many users on Red Hat’s FTP server and I can’t get access … thankfully have a mirror:

So now I can download the ISO images, and mount them on the Linux box using the loop-back interface and install the packages I need.

I expect to have new hardware within a month or so, and I’ll probably be using BU Linux or Ubuntu 8.04.

Ubuntu Jaunty & ATI

This is quick’n’dirty writeup to help others who might have the same problem. I’ll clean this up later in the week …

Ubuntu Jaunty is the new beta version of Ubuntu. It comes with a new version of X.Org and the ATI drivers have been incompatible with this version of X.Org. ATI recently released drivers that support X.Org 1.6. If you have problems with X not starting follow the instructions here:

For me what happened is that X wouldn’t start properly and cause my Lenovo T400 to freeze and lock up. The laptop would boot but when X would start (when the login screen appears) I’d get a black screen with red lines at the top. To solve this I booted to runlevel 1, also known as failsafe mode. If your using a laptop with wireless, I suggest you connect directly to your router using a network cable, otherwise you may have to configure wireless manually (it’s not that hard).

When your system starts, select failsafe mode, on the next screen to appear choose the option to go to a “root shell with networking”.

Next remove the install ATI drivers and install from scratch the ones you need:

sudo apt-get remove –purge xorg-driver-fglrx xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install –reinstall libgl1-mesa-glx libgl1-mesa-dri
dpkg-reconfigure -phigh xserver-xorg

If this doens’t work for you see the Ubuntu page mentioned above.

Xen for Ubuntu Intrepid 8.10

I was in the process of figuring out and documenting the process of  compiling and installing an Xen enabled kernel on Ubuntu Intrepid 8.10. This was for a specific project that’s not going to come to fruition. I’m not going to bother as I also don’t feel like having my laptop burn a gaping hole through my lap as I wait for the kernel to compile, and well you know I still have some use for the 2 lads downstairs. And after years of compiling kernels, I really can think of more productive uses of my time.

The quickest way is to grab a Debian Xen enabled kernel, this isn’t recommended by Ubuntu and if your not comfortable hacking your system and having to compile modules (drivers in Windows speak) for hardware or proprietary hardware that Debian doesn’t include support for, then don’t even think of doing this and just use KVM.

Here’s how Chris did it for a system running a AMD64 processor, if you’ve an Intel processor you’ll need to use a different kernel:

If you want a later kernel (2.6.27 or 2.6.28) poke around:

That’s the approach I’m going to use, as I know that if I’ve problems or issues I’ll be able to figure it out. Anyways, the start of the orignal draft is below, preceded by a minor rant. When I get around to getting Xen on Ubuntu to work with a Debian kernel I’ll add a new post here. Continue reading Xen for Ubuntu Intrepid 8.10

Stuff I’ve read or reading …

Some links to stuff I’ve either read or plan to read which I think is interesting:

Python is not Java, tips for Java programmers starting w/ Python:
Python for Bioinformatics:

I need to know Selenium better, it’s possible that I might consider using it for a project I might be working on (that sounds like it might have some UI bugs/issues/problems):

10 things every programmer should read (this will take a while to wade through):

Xen Cluster Mgt using Ganeti for Debian Lenny:
Ganeti admin guide and install guide:

David Byrne (of Talking Heads) interviews Thom Yorke (of Radiohead):

With a great quote, that shows how well the record companies treat their performing artists (that’s sarcasm in case you don’t have a sense of humour). First Radiohead made zip/zilch/nada from EMI sales of digitized versions of their music:

Yorke: In terms of digital income, we’ve made more money out of this record than out of all the other Radiohead albums put together, forever — in terms of anything on the Net. And that’s nuts. It’s partly due to the fact that EMI wasn’t giving us any money for digital sales. All the contracts signed in a certain era have none of that stuff …

Yorke: … It’s about whether the music affects you or not. And why would you worry about an artist or a company going after people copying their music if the music itself is not valued?

Then he talks about how the music iteself isn’t valued, but the business processes surrounding the marketing and selling of music:

Byrne: You’re valuing the delivery system as opposed to the relationship and the emotional thing…

Yorke: You’re valuing the company or the interest of the artists rather than the music itself. I don’t know. We’ve always been quite naive. We don’t have any alternative to doing this. It’s the only obvious thing to do.

Boston Linux and Unix InstallFest XXXII

I won’t be able to make it, but if your interested in Linux and are in or around Boston/Cambridge, the BLU is having one of their installfests:

Boston Linux Installfest XXXII
When: Saturday February 28, 2009, 2008 from 9:00 am to 5:00 pm
Where: MIT Building E-51, Room 061
2 Amherst St, Cambridge
Plenty of free parking in front of the building.

What you need to bring: Your computer, monitor, power strips and your
Linux distributions. We do have copies of some distributions.
In general we have expertise with most distros, but if you need special
expertise, please email the BLU discussion list in advance.

COST: It’s free! However, we DO have expenses, and contributions are
welcome. Please consider contributing $25 per machine.

Our volunteers will help you to install Linux on your own system. While
Linux runs on most systems, some systems do have configurations and
hardware that may not be supported. Please consult the following web
pages for hardware compatibility. While we prefer you to bring your own
distros, our volunteers will normally have

Hardware HOWTO:
Linux Frequently Asked Questions:

Generally our volunteers have sets of the latest Fedora, SuSE and
Ubuntu distributions:
* Fedora – (Fedora 10)
* Open SuSE – (OpenSuSE 11.0)
* Ubuntu – (Intrepid Ibex 8.10)
* Debian –

In addition, you can run Linux on your Windows PC through a virtual
machine manager, such as Virtualbox. You can install this in your
Windows machine and run Linux as a guest OS, or install it in your Linux
machine and run Windows as a guest. VirtualBox 2.1
( is free and is available for Linux, Windows
XP and Windows Vista. Additionally, there are some VMWare clients that
are also free for Windows.

Please refer to the BLU website ( for further
information and directions. Parking is available in front of the
building on Amherst St. Enter the building, and take the elevator to
your left down 1 floor. Room 061 is opposite the elevator.

Php 5 on Ubuntu

This assumes that you want to use Php with Apache2 on Ubuntu 8.10 Intrepid.

First install libapache2-mod-php5:

sudo apt-get install libapache2-mod-php5

Which will install the following extra packages:

The following extra packages will be installed:
apache2-mpm-prefork php5-common
Suggested packages:
php-pear php5-timezonedb

And will remove apache2-mpm-worker (if you have it already installed).

The following packages will be REMOVED:

This will install core Php packages, if you need others search for them:

apt-cache search php |more

And install what you need.