Thursday, 31 May 2007

Building Evolution-Exchange

Nailed it! Thanks to this post I discovered that evolution-data-server doesn't build libexchange-storage by default because the libexchange libraries are dependent on openldap - and by default evolution-data-server doesn't link with openldap. Thanks a lot. To fix the problem I needed to build evolution-data-server again, this time specifying openldap:

sh autogen.sh --with-openldap=yes --prefix=/opt/evolution-data-server

Once I had installed the new build of evolution-data-server I could finally build evolution-exchange. Having run make install, the Exchange option was available in Evolution 2.10:


Finally!

UPDATE: Unfortunately, although the Exchange option was available, there was no where to enter the OWA URL! I had to rebuild evolution with openldap enabled: sh autogen.sh --with-openldap=yes --prefix=/opt/evolution

The documentation on building Evolution is non-existent; I have been entirely dependent on forums for scraps of information. This is not so much open source as obscure source software: you can have the source code but don't expect us to help you. But why did I expect anything else? I wouldn't expect much from a small "community" based development project, but there is no getting away from the fact that Evolution is Novell's baby.

Now let's see if it works.

Wireless Revisited

When I booted my machine this morning I got a message saying that updates were available. Dutifully I downloaded the updates and rebooted. When Fedora came back up I had lost my wireless connection. Not only had I lost the connection, I had lost my wireless device!

One of the automatic updates had updated the kernel, and this wiped out the wireless driver. To fix it I had to run the MadWifi make install again, and then run modprobe ath_pci. In other words, I had to reinstall the driver.

Now this is not too bad for me with my one machine, but what if I was a support engineer responsible for 100 or 1000 machines? Certainly most large enterprises don't just allow automatic updates to be run on Windows workstations without testing first, but if I was looking to move my organization to Linux I would want to look carefully at how updates are managed.

Wednesday, 30 May 2007

Building Evolution 2.10

To give a detailed account of the problems I've had building Evolution 2.10 would take me days. Instead I'm going to post an annotated list of the steps I've taken. I have now managed to successfully build and run Evolution 2.10, but it has been something of a vanity project: I did it so that I could learn to do it. With Fedora 7 due out in a couple of days - with hopefully an updated version of Evolution that will work with Exchange - there was probably no actual necessity for me to do this. Still, I did learn a lot.

To build Evolution, we first need to build the modules Evolution depends on. The Evolution website tells us these are libsoup, gtkhtml and evolution-exchange. The recommended way to download the source files is via svn - the Subversion version control system. So in a terminal window we start out here:

svn checkout http://svn.gnome.org/svn/libsoup/tags/LIBSOUP_2_2_98 libsoup
cd libsoup
sh autogen.sh
no gnome-autogen.sh in
You need to install gnome-common from the GNOME CVS

We're in trouble straight away. So install gnome-common:
su
yum install gnome-common
exit

Try again:
sh autogen.sh
make
su
make install
exit

Download and build
gtkhtml:
cd ..
svn checkout http://svn.gnome.org/svn/gtkhtml/branches/gnome-2-18 gtkhtml
cd gtkhtml
sh autogen.sh
***Error***: You must have intltool >= 0.25 installed

Trouble again. Install intltool:
su
yum install intltool
exit

Try to build gtkhtml again:
sh autogen.sh
checking for intltool >= 0.35.5... 0.35.0 found
configure: error: Your intltool is too old. You need intltool 0.35.5 or later.

Oops! yum has installed an old version. So we need to remove it...
su
yum remove intltool
exit

Download and build the latest version of intltool:
cd ..
svn checkout http://svn.gnome.org/svn/intltool/trunk intltool
cd intltool
sh autogen.sh
make
su
make install
exit

Back to gtkhtml:
cd ../gtkhtml
sh autogen.sh

***Error***: some autoconf macros required to build gtkhtml
were not found in your aclocal path, or some forbidden
macros were found. Perhaps you need to adjust your
ACLOCAL_FLAGS?

Groan... To fix this I added the
ACLOCAL_FLAGS environment variable to my .bashrc file and set it to the aclocal directory which was installed by gnome-common. .bashrc is hidden in your home directory and sets variables for your bash terminal.

export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"

Restart the terminal window and try to build gtkhtml again:
cd ../gtkhtml
sh autogen.sh
make
su
make install
exit

Now for Evolution itself. We don't want the new version of Evolution to clash with version 2.8 which is installed by Fedora. To do this we specify a new installation directory by using the --prefix configure parameter. We can pass this to configure via autogen.sh:


svn checkout http://svn.gnome.org/svn/evolution/branches/gnome-2-18 evolution
cd evolution
sh autogen.sh --prefix=/opt/evolution

But we get errors:
./configure: line 1354: GNOME_DOC_INIT: command not found
./configure: line 1359: syntax error near unexpected token `evolution,'
./configure: line 1359: `AM_INIT_AUTOMAKE(evolution, 2.10.2)'

To fix this, we update the
PKG_CONFIG_PATH environment varaible. We can do this in .bashrc again. gnome-common also created the /usr/local/lib/pkgconfig directory.

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Go again:
cd evolution
sh autogen.sh --prefix=/opt/evolution

checking for CAMEL_GROUPWISE... configure: error: Package requirements (camel-provider-1.2 libedataserver-1.2 >= 1.9.4 libegroupwise-1.2 >= 1.9.4) were not met:

Requested 'libedataserver-1.2 >= 1.9.4' but version of libedataserver is 1.8.3
Requested 'libegroupwise-1.2 >= 1.9.4' but version of libegroupwise is 1.8.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CAMEL_GROUPWISE_CFLAGS
and CAMEL_GROUPWISE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

This is seriously bad news. These libraries are installed by
evolution-data-server. The Evolution webpage didn't mention having to build evolution-data-server but it looks like we have no choice:

cd ..
svn checkout http://svn.gnome.org/svn/evolution-data-server/branches/gnome-2-18 evolution-data-server
cd evolution-data-server
sh autogen.sh --prefix=/opt/evolution-data-server
make
su
make install
exit

Amazingly it built! Update the PKG_CONFIG_PATH with the new libraries:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/evolution/lib/pkgconfig

Try Evolution again:
cd evolution
sh autogen.sh --prefix=/opt/evolution

checking for CAMEL_EXCHANGE... configure: error: Package requirements (libbonoboui-2.0 >= 2.4.2 libglade-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 gthread-2.0 gconf-2.0 camel-provider-1.2 libebook-1.2 >= 1.9.4 libedataserverui-1.2 libexchange-storage-1.2 >= 1.9.4 libecal-1.2) were not met:

Requested 'libexchange-storage-1.2 >= 1.9.4' but version of libexchange is 1.8.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

WHAT??! After a lot of messing around I noticed that the development packages for the installed versions of Evolution and evolution-data-server were also installed on the system. I removed these using the Package Manager (Add/Remove Software) and tried again.

cd evolution
sh autogen.sh --prefix=/opt/evolution
make
su
make install
exit

Success! All we need to do is add our path
/opt/evolution/lib/bonobo/servers to the /etc/bonobo-activation/bonobo-activation-config.xml configuration file (see here) and we're ready to run Evolution 2.10.

/opt/evolution/bin/evolution-2.10

Evolution even keeps your old settings.



Looking through this post, everything seems logical and straight-forward. In truth, it has taken me over a week to get to this point. It has been incredably frustrating. I have spent hours experimenting and googling. I've not found any clear instructions.

You may have noticed that despite building Evolution, I have not build evolution-exchange to allow me to connect Evolution to Exchange. This was the reason for building the updated version of Exchange in the first place. The reason I haven't built Evolution-Exchange is because I still don't know how to fix this error:

Download and attempt to build:
svn checkout http://svn.gnome.org/svn/evolution-exchange/branches/gnome-2-18 evolution-exchange
sh autogen.sh

checking for LIBEXCHANGE... configure: error: Package requirements (libsoup-2.2 evolution-shell-2.10 libedataserverui-1.2 libexchange-storage-1.2 libbonobo-2.0 libxml-2.0 gconf-2.0) were not met:

No package 'libexchange-storage-1.2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBEXCHANGE_CFLAGS
and LIBEXCHANGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

But, as far as I can tell,
libexchange-storage-1.2 is created by evolution-data-server...

Going Wireless

The problem with having Fedora installed on VMWare is that I can only use it when I'm sat at my desk. With the holiday weekend coming up, I wanted to give myself some options. I remembered that we have an old Toshiba laptop in a cupboard, so I decided to install Fedora on that.

Everything went very smoothly - I had no installation problems at all. However, having the laptop wasn't going to be much good without Internet access, so I needed to install my NetGear wireless card: just inserting it in the card slot didn't work ;-)

The Netgear card uses an Atheros chipset. Fortunately, there is great support for Atheros based cards on Linux from MadWifi.

The first step is to install the driver. You need to download the driver source files which come as a bzip2 tar file. The easiest thing to do is just double-click the file to get the archive manager to open it, and drag the compressed source folder somewhere convenient - like your home directory. MadWifi have some really good instructions for building and installing the driver here.

One of the biggest differences I've discovered running Linux after running Windows is that building the software should be seen as the first stage of the installation process, not the last stage of the development process. This is a result of both the software being open source, and needing to run on multiple versions of multiple distributions of Linux. The good news is that you do not need to know anything at all about developing software to build the source code.

There are standard methods of building software. The first thing you need to do is run a terminal window and cd to the source directory (which you have probably just unzipped.) Next you may need to run autoconf. This will generate a configure file, although often the configure file has already been generated for you. You now run configure. configure will set up the files needed to build the software on your system.

To make life even easier, many source packages come with a shell script called autogen.sh which does all this for you. If there's a autogen.sh file you should run that instead of autoconf and configure. Just type sh autogen.sh.

Whether you have run autoconf and configure, or just autogen.sh you should now be prompted to run make. If the software builds correctly (and this can take some time depending on the software) you can su and then run make install which copies the compiled software into all the right directories.

With MadWifi all you have to do is run make and then make install. Because MadWifi is a driver you need to add it to the kernel using modprobe. (See the MadWifi instructions.)

Getting the wireless card to function isn't hard, but there are some curiosities. Firstly, by default, two wireless "devices" get created by MadWifi. This is because MadWiFi supports virtual access points. The first device is wifi0, which I think of as the wireless card. The second device is ath0 which is the virtual device which is actually used by the OS. It is ath0 that you configure in order to connect you your wireless network. The only problem here is that it is wifi0 that is brought up when the system boots, and the system will attempt to get an IP address. This leads to a long pause on bootup until the "connection" times out. To stop this you can use the "Network Configuration" utility (from the System/Administration menu) to configure wifi0 to use a static IP address which can just be left blank.

The MadWifi instructions tell you how to configure the wireless connection manually, but what if you want to start the wireless connection automatically everytime your machines boots? Isn't that what most people want to do?

The answer is to edit your /etc/rc.d/rc.local file. This shell file gets run on bootup after the system has finished loading. You just need to add the wireless configuration commands to the file:

#Bring up the virtual card
/sbin/ifconfig ath0 up

#Set the authentication mode
/sbin/iwpriv ath0 authmode 1

#Specify the Wireless Network
/sbin/iwconfig ath0 essid network_name key password

#Get an IP address
/sbin/dhclient ath0


Not too difficult at all.

Tuesday, 22 May 2007

Evolution Exchange Bugs

Evolution appeared to have successfully connected to Exchange and synchronized my mail. However, when I clicked on one of my mail folders I immediately got an "Error while Refreshing folder" error saying "Lost connection to Evolution Exchange backend process"


To make matters worse, CPU usage hit 100% and stayed there until I closed down Evolution.

To cut a long and frustrating story short, this is a known bug. The "solution" is to delete the mail data that Evolution has cached by opening a terminal window and typing the following:

evolution -–force-shutdown
cd ~/.evolution
cd mail/exchange
ls (to get the name of the directory)
rm -rfv ./(name of directory)
Restart Evolution

I'm very grateful to the person who posted the fix here. However, this isn't really a fix. It doesn't stop the problem from occurring, it just removes the problem when it does. So why does it occur? My hunch is that the problem happens if you have your mail account open somewhere else. I'm still looking into Linux being my main laptop OS - I have (or had) my mail account open on another machine. Time will tell if just having my mail account on Fedora will prevent the problem from occurring.

But then there's another problem. Even when Evolution has correctly synchronized with Exchange and is happily connected, new mail does not show up in my Inbox. If I get new mail, the Inbox icon shows that I have an unread message, but the message itself does not appear in the Inbox. What's more, no amount of Send/Receiving or attempting to refresh the Inbox will help. The only way to see the new mail message is to shutdown Evolution and restart. This just about makes Evolution unusable as my default email client.

There is some hope, however. Fedora comes with Evolution 2.8, and version 2.8 of the Exchange Connector. New versions of both these pieces of software are available - although not via yum, or even via a rpm file. Looks like I might have to do a real Linux installation.


Banner1

Monday, 21 May 2007

Connecting to Exchange

I have to admit that this was the job I was dreading. I had visions of having to set up an IMAP connection to Exchange, with all the horrors of having to configure both Exchange and Fedora. In fact, it didn't turn out that way. Connecting to Exchange was relatively easy: the problems came after...

The Linux email client is Evolution. Despite being an open source application, Evolution seems to have been primarily developed by Novell who "sponsor" openSUSE and sell SUSE Linux Enterprise. The recommended way to connect Evolution to Exchange is via Outlook Web Access (OWA.) OWA is the Exchange webmail service and has been available since Exchange Server 5.0. OWA is enabled by default.

In order to connect Evolution to your Exchange server you need to install the Evolution Exchange connector. This is not installed by default on Fedora 6. Fortunately, with yum it is simple to install it:

yum install evolution-connector

Once the connector is installed, you can start Evolution.

If you are starting Evolution for the first time, the Evolution Account Assistant "Mail Configuration" Wizard will fire up to guide you through setting up your mail account. You click "Forward" to begin, and then enter your name and email address on the "Identity" page. Now the interesting bit. on the "Receiving Email" page you need to select "Microsoft Exchange" as the Server Type. If you haven't installed the Exchange connector, "Microsoft Exchange" will not be listed. You need to enter your user name and the OWA URL. This is not as scary as it sounds; the OWA URL is generally just something like:

http://exchange_server.mydomain.com/Exchange

Click the "Authenticate" button to enter your password and make sure that you can connect to your Exchange server. You can't click "Forward" until you do.




On the "Receiving Options" page, you need to add your GC (Global Catalog) server name. This is probably your Domain Controller, but depending on your domain architecture might not be. There are then some options to select. Perhaps the most crucial is "Automatically synchronize account locally." In other words, keep a copy of your email account on the machine so that you can read your email off line.



Why wouldn't you select this? After all, if you didn't want to access your email off line you could just type your OWA URL into Firefox and view your email that way - that's what it's for after all. The answer is that Evolution allows you per folder synchronization. In other words you can just keep email in specific mail folders locally on the machine. I would like my whole email account available offline, so I ticked the option. To finish setting up your account, you just need to click "Forward", give your account a name, click "Forward" again, and click "Apply" to finish. Evolution creates a new "Exchange" folder and then tries to connect to Exchange.



Unfortunately, it didn't work. What I got was "Error while scanning folders... Could not authenticate to server":



I quick check with Wireshark showed that once again the problem related to authenticating via NTLMSSP. There is obviously a problem with the way I have things set up on Fedora that I will have to investigate. To get things to work I edited my account settings (via "Preferences" on the "Edit" menu) and changed the "Authentication Type" on the "Receiving Email" tab to "Plaintext Password" instead of "Secure Password." I restarted Evolution; Evolution connected to Exchange, and began to synchronize my mail.

And that was when my problems began...

Wednesday, 16 May 2007

Why does Firefox look so crap?

With the best will in the world, Linux has not got the best looking desktop you are ever going to see. Vista looks fantastic: the text is crisp and clear and easy on the eye. Linux is... functional. Well, perhaps I can live with that. What I find harder to put up with is browsing the Internet. Web browsing on Linux is a disgrace. If there is one application that defines someone's use of their computer today it is their web browser, so it had better be good. Web pages on Firefox look bad. Even Firefox webpages on Firefox look bad. The problem though, is a Linux problem not just a Firefox problem.

Now there are somethings that you can do to make things less bad. The key thing you can do is install some of Microsoft's fonts! Some years ago Microsoft released a set of TrueType fonts that people could download for free to make their browsing experience better. Microsoft have since removed the download from their website, but the set of fonts was picked up by the Linux community who have clung onto them ever since - presumably because they are the only decent fonts they've got.

The problem is fonts ain't free - and the idea that something someone has created through their own skill, imagination and endeavour might have a value is of course an anathema in the Linux world.

There are good instructions on installing the Microsoft fonts here. I won't repeat them, but I did need to reboot before they showed up in the list of fonts available. (See "System" menu, then "Preferences" and "Fonts".) The msttcorefonts-2.0-1.spec file that the instructions tell you to download is worth looking through if you are interested in learning about what is going on behind the scenes. The Microsoft fonts are installed in a "msttcorefonts" directory under /usr/share/fonts and the directory is added to the list of available fonts by calling /usr/sbin/chkfontpath --add %{fontdir}. The /usr/bin/fc-cache utility is then called. This showed some "invalid cache file" errors on my installation. However, the cache files in question were not to do with the Microsoft fonts. They were all *-x86 cache files. I'm running 64-bit Fedora, and I assume that may be the problem. Where they came from I don't know; perhaps they were installed by Fedora.

Once the Microsoft fonts are installed you can set about tweaking Firefox so that it looks more like Internet Explorer, i.e., less ugly. In Firefox you need to go to the "Edit" menu, and then "Preferences." You can then choose "Content" and change the fonts. I've chosen to mostly use Verdana. To be fair, the actual text on most web pages is now ok, although not on this one :-( Where things still look bad is on pages like BBC news that use a lot of bold text. The way Firefox (or Linux) renders bold text is extremely poor. As yet I haven't found a solution.

Tuesday, 15 May 2007

Yum

When I was investigating the errors I got browsing the network I needed to install Wireshark. To install the software I used yum. yum is a is a software package manager and represents a massive leap forward over how things used to be on Linux not that long ago. No more decompressing tarballs and typing in long lists of commands from an install readme file: yum automatically works out dependencies, downloads the software and installs it for you. All I needed to do to install Wireshark was type:

yum install wireshark-gnome

The guys with the neck-beards (as Don Box calls them) must be shaking their heads!

You don't even need to go near a terminal window. You can browse and install software packages just by clicking on "Add/Remove Software" from the "Applications" menu. yum is a major step towards making Linux a business friendly operating system for the desktop. However, it is only a step.

Printing

Connecting to shared Windows printer is very easy. It is simply a case of clicking on "Printing" from the "System/Administration" menu, clicking on the "New Printer" button and following the prompts. You choose "Windows Printer via SAMBA" on the "Select Connection" page and type in the path. (You need to specify a username and password even if you are authenticating via AD.)

The most difficult task is selecting which driver to use for your printer. I resorted to Google for advice. With the correct driver installed, printing is not a problem.

Monday, 14 May 2007

NetBios Name Service

When I browse "Windows Network" it is the NetBios Name Service requests that Fedora issues on port 32770 that get blocked by the firewall. In fact it is not just port 32770: there are a range of ports. To date the port range that needs to be unblocked on the firewall is 32770-32796.

Connecting to a Windows Share

If you are reading this my guess is that you are probably in the same situation as me: you're looking at moving from Windows to Linux. Obviously, I want to make sure any information I give out here is as accurate as possible. Connecting to a Windows file share is a very common thing to want to do, especially if you are coming from a Windows background. However, for me, it wasn't without its complications.

In a previous post I described joining my Linux machine to my Windows domain. Once I did this I had no problems at all mounting a Windows share using "Connect to Server..." from the "Places" menu on the Fedora desktop. (I'm using the Gnome desktop, which is the Fedora default. If you are using a KDE desktop, the menus are probably different. This is something I hope to come back to.) However, I got "The folder contents could not be displayed" error when I clicked on the "Windows Network" icon.

Like most companies, my company runs a network firewall. Having tried everything I could think of on Fedora, I enabled logging on the firewall just to check whether anything was showing up. Sure enough, the firewall was denying connections from my Linux machine on ports 32770 and 32771. Once I enabled the ports I was able to browse the Windows Network with no problems at all. Very cool...

Ok, but what if the machine is not joined to the domain? This is where things got complicated. The bottom line is that I have not been able to mount a Windows share using "Connect to Server..." from the desktop. I've spent a long time looking at this, but I've got no where. What I can do is mount the share from the command line:

mount -t cifs -o user=username,password=password
//Server/Share /mnt/Name

So what's going on? One possibility I considered was the issue of SMB packet signing. (There is a good discussion here.) However, if that was the case I wouldn't be able to mount the share from the command line. I downloaded Wireshark (formally Ethereal) and saw that I was getting a STATUS_LOGON_FAILURE error:


Doesn't help much... I ran a Wireshark again, this time to capture what happened when I ran mount. The difference was that mapping a drive from the desktop involved Fedora attempting to connect using SMB via NTLMSSP (NT Lan Manager Security Support Provider) whereas using mount did not.


I'm sure there is a solution to this somewhere; either by changing the configuration of the firewall, or the configuration of Fedora. However, I'm going to have to leave this for another time.

Thursday, 10 May 2007

Camera

I needed to download some pictures from my camera. I usually need XP to do this because Canon have not released any Vista drivers. I thought I would plug the camera into Fedora and see what happens. I immediately got a "Camera Import" message saying "A camera has been detected." I clicked on the "Import Photos" button and it just worked brilliantly. Why can't Vista do this?

Connecting to Active Directory

As you may recall, my To-Do list looks like this:

  1. Connect to my company's Exchange Server and get my mail.
  2. Connect to my company's Windows 2003 Server and access files.
  3. Print stuff.
  4. Optionally authenticate via Active Directory.

As it turns out, the last and "optional" requirement is the first one that I've tackled. This is because it showed up on the "Create User" screen when I was installing. There is good news and then there is... well let me explain.

First the good news. Getting Fedora to authenticate via Active Directory turned out to be surprising easy. From the "System" menu you choose "Administration" and then "Authentication" - this brings up the "Authentication Configuration" dialog box. On the "Authentication" tab, you tick "Enable Kerberos Support" and click the "Configure Kerberos" button. The Kerberos "Realm" is just the DNS name of your domain; the KDCs are your Domain Controllers (port 88 by default); and the "Admin Servers" are your Domain Controllers again, this time using port 749.



Next tick "Enable SMB Support" and click the "Configure SMB..." button. The "Workgroup" is your domain; the "Domain Controllers" are your domain controllers. Simple.

Finally, tick to "Enable Winbind Support" and click the "Configure Winbind..." button. The "Security Model" needs to be "ads" and you just have to fill in the boxes with your domain details. Having done that, you click the "Join Domain" button and... not for the first time on Fedora nothing happens. I ran the "Active Directory Users and Computers" MMC Snap-in on a Windows machine, and sure enough my Linux workstation appeared in the default "Computers" container in AD. Would it have been so difficult to have a confirmation messagebox? I sometimes think that for Linux developers the GUI is an afterthought, and ease of use is not thought about much at all.



I logged off, and logged on again with my domain username and password - and it worked! Perhaps I shouldn't be surprised that this worked, but I was expecting the worst.

I then logged off again, and logged on with another Active Directory account. This time the logon failed with "Incorrect username or password." What was going on? It turns out that the reason the logon failed was that the user account did not already exist on the machine. There is a suble and important distinction to be made here between Linux and Windows. Linux only uses AD to authenticate the user's logon: the user's account exists on the machine. Windows also uses AD to authenticate a user's logon, but the user's account exists in AD.

So you may be wondering, with some justification, what's the point of authenticating via AD? There are some advantages, however. You can mount Windows network shares on the domain (via "Connect to Server..." on the "Places" menu) without needing to specify a username and password. Additionally, I hoped that I would be be able to browse my domain in "Windows Network." Unfortunately I'm getting an error:


There are obviously still some issues to be resolved.

Updates...

The 259 updates took 12 hours to install! During that time the machine was essentially unusable. This is a one-off, of course, but I'm not impressed...

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.

Tuesday, 8 May 2007

Installing Fedora

Installing Fedora on VMWare is a breeze. For anyone who doesn't know, VMWare Workstation is desktop virtualization software that allows you to run multiple operating systems simultaneously on a single PC. It must be one of the most innovative software products to emerge in recent years.

To install Fedora I downloaded the 64-bit Fedora Core 6 CD .iso files from one of the Fedora mirror sites. Whether choosing the 64-bit version was a mistake, time will tell. There are 6 .iso files, but you only need the first three if you do a default installation. Then I created a new VMWare Virtual Machine, pointed the CD-ROM to the .iso file, and clicked "Start."

The Fedora install program is very straight-forward and will seem quite familiar to anyone who has installed Windows. You are prompted about disk partitioning, but if you are installing to a clean disk you just need to accept the defaults.

One thing that is worth pointing out is the Network Devices screen. This asks you how you want to set the machine's Hostname. The default is to set the hostname "automatically via DHCP." Coming from a Windows background, this was alien to me. As far as I know, Windows DHCP servers do not set workstation hostnames (although I may have missed something.) On Windows the workstation hostname is set on the workstation. Because I'm running Linux in a Windows envirionment, I decided to set the hostname manually.

Fedora Network Devices screen

The final screen asks you about about what additional software you want installed. By default, "Office and Productivity" software is ticked: in other words, you get OpenOffice. Optionally you can check "Software Development" and "Web Server." Even if you are not planning to do any software development, I would say that you should tick the option. I'll come on to the reason later. Click "Next" and the installation is ready to begin.

It takes well over an hour, which is about twice as long as XP or Vista. Having said that, the installation is completely automatic, so you are not tied to the machine. Once the machine reboots, you need to answer a few more questions. You need to accept the license agreement. You can then set the Firewall settings: in addition to trusting SSH, I ticked Samba because I want to run in a Windows Environment. I accepted the default setting for SELinux - which is enabled. You then need to create your user account. This is just like creating an account when you install Windows, accept that the username is case sensitive as well as the password.


Fedora Create User screen
The "Create User" screen has an interesting option. There is a button which says "Use Network Logon..." If you click the button - and you know what you're doing - you can configure the machine to authenticate users via Active Directory using Winbind. However, you can also configure Winbind once Fedora is installed, so for now I've postponed this.

Click "Forward" and you are just about finished. You can now logon to Fedora for the first time. Fedora will try and connect over the Internet to see if there are any security updates available. There were 259 updates available after I installed Fedora: maybe Linux isn't so different to Windows after all...

Which Linux?

If you are planning to run Linux the first thing that you need to decide is which Linux you want to run. From the outside looking in, the dark continent of Linux looks depressingly tribal. LinuxCD.org boasts a 1000+ versions of Linux and BSD. What? And they think that's a good thing? I guess it depends on your point of view.

If you are coming to Linux from Windows you naturally want to know what's the best "distro" to install. Do you install openSUSE which is sponsored by Novell? Or Gentoo? Or Fedora which is sponsored by Redhat? Or Ubuntu which you are going to be able buy pre-installed on Dell machines? Or something else?

I'm going to stick my neck out here. You know what? It doesn't much matter. Linux is Linux: whichever "distro" you install you are going to get basically the same Operating System with the same applications.

It is time for me to fess up. I've been playing around with Linux for a long time. But "playing" is right: I've never really got to grips with Linux and I've never used Linux as my main OS. I first installed Linux from a Yggdrasil distro. I still have the CD which is dated "Fall 1993." The kernel version is 0.99.13. But then came Windows 95... Over the years I have regularly installed Linux to see what was happening. In the main it has been Redhat Linux that I have used. So, because I'm familiar with Redhat, but also because Redhat have a strong commercial rather than home focus, I'm going to install Fedora.

Here's the plan. My trusty Dell Inspiron 1150 laptop is slowly grinding to a halt. In a few months I'm going to buy a new one. Should I install Linux on my new laptop? Because I'm not brave/stupid (delete where applicable) enough to just dump Windows, I'm going to test Linux out on VMWare before making a decision. I must be able to:
  1. Connect to my company's Exchange Server and get my mail.
  2. Connect to my company's Windows 2003 Server and access files.
  3. Print stuff.
  4. Optionally authenticate via Active Directory.

That is a pretty modest set of objectives, I think. They are, of course, business focused objectives and the focus for this blog will be in using Linux for business.

It is time to download Fedora.

Why Linux?

I'm a Windows man. I spend my days sitting in front of Windows Vista writing software for Windows computers. My company is a Microsoft Certified Partner. I am a Microsoft Certified Professional. So what am I doing getting involved with Linux?

I don't have a simple answer to the question. Partly, I'm interested in Linux for the same reason I got interested in computers in the first place: I want to know how it works. Linux is important. It is important in my industry both commercially and - to some extent - technically. Linux also has an importance culturally.

So who is this blog for? Why do people blog anyway? Who do they expect is going to read their stuff? My hope is that if someone is considering moving from Windows to Linux they might come across this blog and find something I have to say useful. If that's you, please post a comment! Otherwise how am I ever going to know? The only other audience I have in mind for this blog is myself. If I can keep track of what I've done, hopefully I won't repeat my mistakes.

My plan is to keep my posts here short but frequent. I will also try to keep my posts as contemporaneous as possible with what I'm actually doing with Linux.

It's time to start.