Wednesday, 9 May 2007

Here Beginneth the Lesson

I'm running Fedora on VMWare. To get an Operating System to run smoothly on VMWare you need to install VMTools. Now if you are reading this, and you are not going to be running Linux on VMWare, I would still urge you to bear with me, because what I'm about to describe has got to be one of the most profound differences between Windows and Linux there is.

When you install VMWare tools - or just about anything else - on Windows you run a setup file; something like setup.exe. The setup file launches a Wizard, like InstallShield or Advanced Installer, you click "Next" a few times and your software just gets installed. Sometimes you may need to reboot, but that's about it. When you try to install VMWare Tools on Linux, things are kind of different...

Firstly, there is no setup.exe file. What you are presented with are two install "packages." One is a tar.gz file - basically a big zip file; the other is a .rpm file. One of the reasons that I chose Fedora is that it supports .rpm files. RPM files were developed by Redhat (RPM originally stood for Red Hat Package Manager) to make installing software simplier on Linux. The Package Manager unpacks the application files to the right places and can run the configuration scripts so that the application will run on your machine. Coming from Windows, that doesn't seem much to ask.

So I run the VMWare Tools .rpm file and eventually I get a messagebox saying that the software installed successfully- excellent. I click "Ok" and... nothing's changed. There's no dialog box, no readme file, nothing on the "Applications" menu, nothing at all to indicate what I should do next. So its off to Google... What I need to do is to is run a run a script (written in perl) called vmware-config-tools.pl. The script is installed in the /usr/bin directory. (I will be coming back to file locations in future posts.) I open a terminal, "su" to run as root, and run the script. I then get a truly magnificent message:

None of the pre-built vmmemctl modules for VMWare Tools is suitable for your running kernel. Do you want this program to try to build the vmmemctl module for your system (you need to have a C complier installed on your system)?
[Yes]


Just stop and think about that for a moment! The program is offering to compile a module -that is, actually build the binary code - on the fly. That is the difference between Linux and Windows right there. The program can only do that because the source code is open; the souce code is available.

So I hit return and keep hitting return to accept all the default answers. The program calls the gcc compiler and builds the VMWare Tools modules in front of my eyes.


As far as I can gather, there is nothing unusual about what has just happened; other applications can do the same thing. This is why you should install the Software Development software even if you are not doing any software development. I ran the .rpm file, but in this case I might just as well of run the tar.gz file to unpack the files. With some applications there will only be a tar.gz file, and you may have to do the compiling yourself. I hope though, that you are as excited by the possibilities as I am.

No comments: