Archive for the ‘Linux’ Category

Oracle slowly skewering MySQL?

In Linux, MySQL on August 23, 2012 at 1:18 pm

Recent Oracle behaviour on MySQL releases have baffled quite a number of MySQL followers. According to this:


a recent version: mysql-5.5.25, does not have the usual regression testing scripts available.   These scripts have been part and parcel of MySQL since 1999 and not having these for the first time is a real surprise for active MySQL developers.

So how important are these scripts? well it turns out they are very important as it contains a compilation of old and new scripts that verify the new MySQL version a)  does not have the old bugs identified with previous versions and b) contains the fixes for newer bugs.

In other words, a missing regression testing script means, the quality of this version is suspect.  Probably just what the powers that be in Oracle wants to happen.  As of this writing Oracle has already released 5.5.27, I wonder if that and .26 also have those scripts missing.

More than two years ago, I wrote about how Oracle only “committed” to a parallel release of the free version of MySQL up to 5 years from the closing of the purchase (of Sun and its bag of goodies) transaction.  After that it’s anybody’s guess. Five years hence is January 28, 2015.   Two and a half years to go, but before then I suspect we’ll see more reasons to ‘doubt’ the open future of MySQL.

VirtualBox: Installing Fedora 17 as guest OS in MacOSX host

In Linux, Mac OSX on August 17, 2012 at 9:33 am

Here’s a quick howto to install Fedora (in my case F17) in MacOSX Lion.

1) Download the Virtualbox from


2) Download Fedora live media installer from


3) Install virtualbox.

4) To install the downloaded OS, run Virtualbox and add a new OS, set the name to ‘Fedora’ or whatever, select the memory (the default of 768MB for most apps) then ‘Continue’, select ‘Create new hard disk’, then VirtualBox Disk image or ‘VDI’ for the virtual HD type, choose ‘Dynamically allocated’ next,  then finally set the storage size then ‘Create’. This should create the empty OS instance in your Virtualbox.

5) Right click on your OS Instance and select ‘Settings’. Then select ‘Storage’ and then click on the ‘Empty’ IDE icon. On the right panel, click on the CDROM icon and choose the Fedora ‘iso’ file. Click on OK.

6) Run the installation process, by right-clicking on the OS instance and selecting ‘Start’.  Continue with the usual OS installation.

7) After installation remove the settings done in step 5, so the virtual CD-DRIVE is empty (and so it will not be included in the boot options).

If all goes well, install the VirtualBox add-ons so you can properly resize the guest OS’ windows dynamically, enable cut-and-paste between OS’s and enable ‘Shared Folders’ etc.. To do so do the following:

1) Download the VirtualBox Guest Additions from


Note for F17 and VBox 4.1.8 users: choose VBoxGuestAdditions 4.2.0.RC1.iso as the 4.1.8 version has incompatibilities with the latest kernel which will be installed below.

2) Update your fedora with the latest  kernel, headers and compilers which is needed by the VBoxGuestAdditions installer (got this from http://www.sysprobs.com/install-fedora-16-virtualbox-guest-additions-get-working-gnome-shell-inside-virtual-machine)

yum -y update kernel
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

then restart linux guest.

3) Using the VirtualBox Manager, right click on the OS instance and click on ‘Settings’ then ‘Storage’, click on the ‘Empty’ IDE controller and click on the CD icon on the ‘CD/DVD’ drive on the right panel and choose ‘Choose a virtual CD/DVD disk file’ and choose the downloaded ‘VBoxGuestAdditions.x.x..iso’ file.  This should now make the file the content of the virtual CD drive within the fedora guest.

4) Go to the linux guest, open a terminal, su to root and cd to the CD drive and run “./VBoxLinuxAdditions.run“. Restart the linux guest.  After the restart you should be able to resize your guest OS window (with aspect changing dynamically) and be able to do ‘Full screen’ (that would be “command – F”).

5) Finally to create a ‘Shared folder’ between the Host and Guest OS, click on the ‘folder’ icon at the lower right window frame of the guest OS and add a folder in the host OS to share.  I shared my ‘Downloads’ folder in my Mac Host and called the share as ‘Downloads’ as well.

In the guest OS, create a directory where to mount the shared folder in e.g. mkdir /mnt/Downloads.

6) In the guest OS you can mount the shared folder interactively:

sudo mount -t vboxsf -o rw,uid=1000 Downloads /mnt/Downloads/
umount -f -a -t vboxsf

Note: if you’re thinking of putting something like this in /etc/fstab in the guest OS:

Downloads   /mnt/Downloads   vboxsf     rw,uid=1000    1    1

dont! it’ll hang your system. I suspect its the drivers not being loaded yet when the kernel runs mount on startup.

Installing DB2 in Linux

In Database, Fedora, Linux on August 17, 2012 at 9:18 am

here’s the lowdown on setting up a db2 database in your linux box:

1) Download db2 Express from


2) As root, extract the installer:

tar cvf db2_v101_linuxia32_expc.tar.gz

this should create a directory called “expc“.

3) do a ‘cd expc‘ and run the installer “./db2setup“. This will run the installer and ask you to create 3 different types of users, the admin, user and a fenced user.. take note of the names (you can use the defaults) and passwords.  Note that DB2 will create these users in your linux system.

4) After creating the users start the db2 server by  logging in as the db2 administrator (use the administrator username as defined in db2) or do an ‘su db2admin’ assuming db2admin is the admin user.

5) type ‘db2admin start‘.  This should start the db2 instance.

6) To add a new database, log in as the db2 user (you can also do an ‘su db2user1’, assuming db2user1 is the user username just make sure you do a ‘cd ~db2user1’ after as db2 requires the current user to be on a writeable directory).

7) Once you’ve logged on as the db2 user you can now begin creating your database. To create login to the db2 server:

db2 <enter>

this should give you the “db2 =>” prompt.

8) First create the database:

db2=> start database manager
db2=> create database test

db2 => activate database test
db2 => connect to test
db2 => create table employee ( Empno smallint, Name varchar(30),hiredate date)
db2 => select * from employee
db2 => quit

hope this helps.

Can’t Wait! Raspberry Pi!

In Automation, Embedded Computing, Java, Linux, Raspberry Pi on July 1, 2012 at 7:27 am

Sent off a reservation for a Raspberry Pi, a credit card-sized bare bones working computer that runs off an SD-card loaded Linux OS.  At $35 a pop, its a steal considering the hours of fun making apps for that thing =)

A good starting point for embedded and automation projects!

The Pi:


The best unix desktop is MacOSX

In Linux, Mac OSX on June 24, 2012 at 9:48 am

Yesterday, I got my first MacBook Pro.. no not the new 15″ Retina MBP, but the more sensible (ports and price-wise) 13″ 8GB mem MacBook Pro (I just cant live without the built-in ethernet port as I’ll never know when I need to do another protocol reverse engineering project).  Having used Ubuntu and Fedora Desktop — my last laptop was a Compaq Presario V3000 running Fedora 15 — I have to say the experience can be really frustrating:  unsupported devices, printing issues, buggy interface etc. I ended up having to do more ‘tweaks’ and ‘patches’ than I’d care.  While the Linux and the linux distributions are excellent (all our servers run on Fedora), the desktop has many issues.

So finally, after several months of waiting for the upgraded version, I got the MacBook Pro.  I can’t say I’m a newbie with Macs (the wife has a 2010 MBP model)  but this is the first time I’ve really noticed the difference between the OSX interface and Fedora’s GNOME desktop, migrating files does that to you.  What’s striking is that its not that different at all.

Here’s my soon-to-be retired Compaq’s Linux desktop:

Fedora 15 Desktop

Fedora 15 Desktop

and the OSX desktop:

OSX Desktop

OSX Desktop

I dont mean similarities in the space background of course.. but in the layout.  The new Gnome 3 default layout looks a lot like the default MacOSX layout.  The directory window gives it all away.. looks like the Gnome developers are closet MacOSX fanbois.

Fedora Gnome:

Fedora Directory Window

Fedora Directory Window

and its MacOSX look alike:

MacOSX Directory Window

MacOSX Directory Window

Even the default folders are similar.  I doubt this is a coincidence.

So yes, I’ve finally crossed-over.  With MacOSX I get the benefits of an iron-clad Unix OS (same with linux) but with the benefit of a well-designed and well-seasoned desktop.

I’ve already seen how future Linux Desktops will look like and it looks exactly like MacOSX’s.

HeidiSQL alternative for Linux

In Database, FlexOODB, Java, Linux, MySQL on October 30, 2011 at 8:40 am

Aside from Netbeans, an SSH client and a good text editor,  a  good database manager always comes in handy when developing apps.

I’ve been using HeidiSQL  previously to manage my MySQL databases when my laptop was on XP, in its current incarnation as a Fedora 15 development machine, I’ve been hard pressed looking for an alternative, HeidiSQL on Wine is simply unusable.   I had to content myself with MySQL’s WorkBench Tool.   WorkBench is free but I find the interface clunky.

Then I ran into DBeaver, its a Java app that has the familiar interface of HeidiSQL with the added difference that it works across platforms (of course).  Plus, unlike HeidiSQL which can only connect to MySQL (although I understand there’s work in making it work for MS SQL too),  DBeaver can also connect to other popular RDBMS:  Oracle, Cache, DB2, Firebird, Derby, H2, HSQLDB, MS SQL, Postgres, Sybase, SQLite etc.

Here’s a screenshot:

DBeaver Snapshot

DBeaver Console

Here’s a quick how to to install in your Linux box:

  1. Download DBeaver and extract in your drive (e.g. /home/<username>)
  2. Right-Click on an empty spot on your desktop and select ‘Create Launcher’
  3. Type in ‘DBeaver’ (or any name for that matter) click on ‘Browse’ and go to the /home/<username>/dbeaver directory and double click on the dbeaver file.
  4. To replace the default icon, you can click on the icon link of the create launcher window and select the file /home/<username>/dbeaver/icon.xpm. That’s it.

Thanks for a great tool DBeaver Team! =)

Oracle begins commercializing MySQL

In Database, Linux, MySQL on September 19, 2011 at 8:57 am

In early 2010,  I noted that Oracle will only guarantee support to the open source version of MySQL until the end of January 2015 (or 5 years after the end of the transaction — that being the purchase of MySQL).   A year and a half on and  it looks like its well on schedule  recently announcing that they’re now offering ‘commercial extensions‘ to the product.

The implication for this is obvious:  we’re going to see more of these feature sets and ‘improvements’ on the commercial version of MySQL as opposed to the community version as to create enough doubt for corporate users who are a class of their own and who would invariably go for a more expensive solution ‘just to make sure’.  The end result? why use open source mysql when you can buy? the purchase was, afterall,  sweet revenge, as  Oracle is able to effectively  throttle competition from left field.

Purchasing MySQL is a medium term insurance policy, one which will have a maturity date of January 28, 2015.

Notepad++ alternative for Linux

In Linux on August 18, 2011 at 6:34 pm

Nov 3 2011 note: let me save you time, I wrote this post in August 2011, IMHO Geany is the closest, feature-wise, to Notepad++ on Linux. If you want other alternatives you can read the original post…

As I write software for a living, I do a lot of text editing as well and for that I’ve been using Notepad++. It’s an excellent piece of software which, if I were to choose only 3 software apps to have as a developer, Notepad++ would be one of them (the 2 others would be Netbeans and SecureCRT). Having moved to using Fedora 15 recently, naturally I was hoping Notepad++ would have a linux version, but such is not the case. Notepad++ under Wine turned out to be practically unusable.

I’ve tried two alternatives: gedit and Bluefish. Both can do the job reasonably well though I’d rate Bluefish as the better of the two, however, both are neither Notepad++. When I checked the Notepad++ site again (who knows? they might have released a linux version in the week since I last checked!), I read that Notepad++ is based on the editing engine called Scintilla. The good thing is, the developers have also written an editor based on the engine and best of all it also runs under Linux. The editor is called SciTE.

The default installation of SciTE is pretty much like BlueFish.. however you have to tweak it a bit to bring out the powerful features of the application.

Default installation is very minimalistic

These are the features I miss the most from Notepad++ and which I want to have on SciTE:

  1. Singleton instance (I dont want multiple editors everytime I open a file)
  2. Show a files’ complete path (very important since I regularly compare files with the same name)
  3. Load previously opened files upon startup (if I was working on several files and had to do a forced restart I want the files in my previous session to be where I left them off).

To get the functionality I want, I checked out SciTE’s configuration page, fired up SciTE and opened SciTE’s user’s options file (that’d be under Options->Open User Options File) — alternatively you can edit the Global Options but you’d have to use root to edit — after some testing settled on just placing these few lines in the User Options File:

#option if you want to use the icons of the current GTK theme, personally I like the default icons

#auto maximize the window

#default tool bars, reminds me of NP++

#so you can see the full path of the file on top

#singleton instance — ie I dont want to see many editors, opening files will simply create a new tab

#make teh status bar at the bottom visible

#this will save the last session, so when scite is fired up the files from the previous session are loaded.

#save list of recent files

I saved the file, closed SciTE and when I fired it up I got the features I’ve been looking for.

Got my favorite Notepad++ feaures on SciTE!

With the small updates, my SciTE now shows the the full path’s of my opened files, runs as a singleton and ‘remembers’ my previous sessions. I’ll update this post if I missed anything.

Update: 2011-08-23

I’ve added this to make selections and searched words stand out (the default is greyed background):

#background select/find color

Update: 2011-11-03

Or you can just install Geany. Same features above “out-of-the-box”. Thanks to “tiny” for the suggestion =)

Fix for Fedora issues when printing to HP printers

In Linux on August 15, 2011 at 10:05 am

Today  I really had to fix my printing (or inability to print) problems using Fedora 15.   So far I’ve been trying to print on a network printer and hadnt had much luck there (I can see the printer, the print job seems to have been sent, but nothing gets printed).  I reckon I’ll give printing locally a try.  I attached the printer (its an HP 1020 laser printer) to my laptop and F15 detected the printer but still would not print.  Well according to some posts on the web, while F15 ‘detects’ the printer the appropriate HP plugin still needs to be installed.. hmm.. I thought I did that already, anyway here’s the quickest fix:

  1. sudo yum install hplip-gui
  2. sudo hp-plugin  <– running the plugin installer using  sudo — ie using your non-root account — will prevent “QGtkStyle was unable to detect the current GTK+ theme.” errors.

step 2 will launch the GUI installer and install the necessary components to (at least) print locally.  I’ll know later if this also fixes my network printing problem.

Install additional multimedia plugins on Fedora 15

In Fedora, Linux on August 6, 2011 at 8:38 pm

I’ve installed PiTiVi, a linux based video editor, but the editor doesnt come with the codecs (for viewing/playing multimedia VLC is great and comes with its own internal codecs).  To load all the codecs do the following:

1)  First add  RPM Fusion  in the list of repositories that YUM will use to search for installers:

sudo yum localinstall –nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

2) Next install the codecs.

sudo yum install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-bad-free gstreamer-plugins-bad-nonfree gstreamer-plugins-ugly gstreamer-ffmpeg xvidcore xine-lib-extras-freeworld

3) Restart the multi-media app and it should work.