Thursday, 25 October 2007

Automatically Connecting to Wireless Networks

The Linux world still has the capacity to leave me shaking my head in bewilderment...

One of the things that Vista does really well is managing wireless network connections. Vista will automatically connect to an available wireless network without you having to do anything. If you look at a standard install of Linux, even an install of a "cutting edge" distro like Fedora 7, you would never guess that Linux offers the same functionality.

I have literally spent months looking for an easy way to connect to wireless networks. I looked at utilities like wlassistant and netgo; neither of which turned out to be much good. I even wrote my own bash script using iwlist to scan for available networks and iwconfig to connect. (This worked, but was let down by DHCP problems with dhclient when switching networks.)

The solution was installed on Fedora all the time. The only problem was that it was not enabled, and - worse - not visible. The solution is NetworkManager.

NetworkManager will automatically connect to an available wireless network. But that's not all it does. NetworkManager actively monitors your network connections so that if you plug in a network cable it will disconnect the wireless connection and use the faster wired connection instead; remove the cable and NetworkManager reconnects to the wireless network on the fly. Very, very, cool.

So how do you get it to work? To start NetworkManager manually you can just type the following on the command line:

/usr/sbin/NetworkManager

However, once you are happy NetworkManager is working for you, you will want to have it start automatically:

/sbin/chkconfig --level 345 NetworkManager on
/sbin/chkconfig --level 345 NetworkManagerDispatcher on
/sbin/service NetworkManager start
/sbin/service NetworkManagerDispatcher

Why was it so hard to find? Why isn't the Linux world trumpeting its existence? It is very strange. Perhaps the answer goes back to the issue of what Linux is for. Being a commercial rival to Windows doesn't seem to be what Linux is for- which is fine. So what are Redhat and Novell and Ubuntu doing?

There is more information on NetworkManager here and here.

Monday, 22 October 2007

VMWare - Bridging over Wireless

I couldn't get my VMWare Virtual Machines to connect to a network via my Fedora wireless connection. The solution is to use a patched version of the vmnet.tar file and then run vmware-config.pl again. vmnet.tar is located in /usr/lib/vmware/modules/source on my machine.

The patch is discussed here. It is available via the VMWare Communities page here.

Enabling Bluetooth

It's been a while since my last post. Mainly this is because Fedora 7 is working fine and I can just get on with my real job. I have to say it gives me a warm feeling to be using Linux: I don't have that nagging suspicion that I've paid to enter a pact where I'm allowed to use someone else's software in exchange for marketing my life. As a business desktop, Linux can best be described as practical. I've come to think of Linux as a screwdriver rather than an iPod.

Fedora has advanced in a few months to the point that it supports the D630's hardware natively; there is no longer a need to build the video and sound drivers, etc. One thing that I could just not get working however, was the Dell 360 bluetooth module. Finally, I found a discussion on an Ubuntu forum that explained that the problem only occurs on Dell machines with Vista pre-installed. (You may recall that Dell would not sell me a D630 without Vista installed.) The Vista bluetooth driver actually updates the firmware on the Dell 360 bluetooth module so that it can no longer be used by other Operating Systems, including Linux, but also XP. To fix the problem you need to install XP and downgrade the firmware by installing the XP bluetooth drivers.

So how to install XP? You can't install the XP drivers from a VMWare virtual machine, because the bluetooth module is obviously not visible to the host Linux OS, and so is not visible to the Guest OS. I don't have any unused space on my hard drive to create a new partition. How about installing XP on an external USB drive? Well it starts to install, but then won't boot because XP does not support booting from a USB drive. There is a way around this, however. You can craft a XP install CD to support USB drives: there are good instructions here if you need to do this. I didn't. I bought a second hard drive from Dell for £59 (about $120.)

Problem solved? Of course not. The D630 has a SATA hard drive and XP does not support SATA. What's more the Neanderthal XP installer allows you to install additional disk drivers only from the a: drive - and the D630 does not come with a floppy disk. To get around this one you need to craft another XP install CD to support SATA drives. This is not as onerous as it sounds. All you need to do is download the SATA drivers from the Dell website and then integrate them into the XP install image using the brilliant - and free - nLite Windows installation customizer. There are instructions here.

Once I had XP installed, I installed the XP bluetooth driver and that was it! When I restarted Fedora the Gnome Bluetooth Manager was showing the in notification area and running hcitool dev showed device hci0. All I need to do now is work out how to dial out...

Thursday, 9 August 2007

So... Can Linux be a business friendly desktop?

This can only ever be a preliminary opinion, of course... The answer is it depends on your business.

Unless you have the very latest hardware, the chances are that Linux will install perfectly on your kit. Linux is just as stable as Windows and vice versa, so much so that no one talks about Operating Systems crashing anymore. In terms of basic business applications, OpenOffice provides all the word processing and spreadsheet functionality that most users will ever need - although it doesn't look at good as Microsoft Office. So why wouldn't you install Linux?

If I look around my own business I can't see anyone who just needs basic OS and Office functionality. OK, we are Windows software developers, so our developers need to be running Visual Studio - which only runs on Windows. But then, the people in accounts use an accounts package - which only runs on Windows... and so it goes on. Unless you are starting your business from scratch, you will have already made a big investment in Windows software. If you are going to move your desktops to Linux, you are going to have to move your applications to Linux as well.

What if you start slowly? Just move one group of users at a time? If you do that, you have interoperability problems. Using Exchange? Forget it. Evolution just isn't up to the job as an Exchange client. That means making a strategic decision in advance to move key functionality to cross-platform software. In the case of mail, that would be something like Lotus Notes.

On top of application issues you have people issues. You will need to retrain your IT staff and your end users.

So why bother? Why would you want to take on that much pain? You wouldn't; of course you wouldn't. But perhaps your business is already running Lotus Notes, perhaps your business is using browser based applications, or Java applications; perhaps you only have a handful of Windows only programs. In that case, why not?

I can't help thinking however, that to use Linux as a business tool you have to lock it down. The real power of Linux lies in the fact that - unlike Windows - it isn't locked down. That's not a reason not to use it as your business desktop, of course. It's just that there may be better uses for Linux.

Wednesday, 8 August 2007

Desktop Linux

The normally excellent The Register website has posted an ill-judged report from LinuxWorld by Ashlee Vance which begins "The Linux desktop reminds us of a dog humping a table leg. It's both fun and disturbing to watch, but ultimately there's very little payoff from the exercise." Whose we? It is obvious from the article that Vance has never actually run Linux on a desktop. The Register would have been better off sending someone who knew what they were talking about, rather than someone reliant on second hand opinions and their own prejudices.

It's a shame because there is a debate to be had about "Desktop Linux" - or rather, Linux on the Personal Computer, as Linux itself comes with multiple "desktops."

Vance writes that Linux "suffers from limited driver, multimedia and power management support." That is simply untrue. In this blog, I've documented my experience in installing Linux on Dell's very latest laptop hardware. Yes, I have had to wait for drivers to get my DVD and sound working, but it only took six weeks for Linux to catch up. With hardware manufactures focused on the 90% of the PC market that is Windows, Linux driver support is remarkably good. Vance goes on "The Linux community ... may well make something Windows comparable by 2020" - which is breathtakingly ignorant.

So what is the "payoff"? The issue I've been trying to resolve for myself is what is Linux on the desktop for? For example, is it aiming to be a replacement for Windows? If it is, which Windows? Windows at home? Windows in business? Or both? However, I think I've been asking the wrong question. Linux is Linux. What Linux is for is to "manage the hardware and software resources of a computer." What people then do with Linux is an entirely separate question. Of course, the people at Redhat and Novell want us to run Linux on our business desktops: they want to sell us support stuff. What we have to ask is, is that a practical propostion: can Linux be a business friendly desktop?

The do question is important. Not least because the open nature of Linux means that you can do more with Linux than you can do with Windows. If that's something you want to do...

Monday, 6 August 2007

Installing Python 2.4

One of the things that spurred me on to look at Linux again was that I want to look at Numenta's HTM (Hierarchical Temporal Memory) neural network framework. (There is no Windows version.) The current version of the software is dependent on Python 2.4: it will not run with Python 2.5 which is installed on Fedora 7. So I needed to get Python 2.4 installed.

Building and installing Python 2.4 from the source files was no problem. However, when I ran python2.4 (or just python as 2.4 was now the default installation) I got “python: error while loading shared libraries: libpython2.4.so.1.0: cannot open shared object file: No such file or directory”. libpython2.4.so.1.0 was sitting happily /usr/local/lib/ of course.

The solution was to add the LD_LIBRARY_PATH environment variable:

LD_LIBRARY_PATH=/usr/local/lib/
export LD_LIBRARY_PATH

Adding these lines to my .bashrc file fixed the problem.

D630 Sound Update

If I enable software sound mixing (ESD) so that I can have System Sounds, things start going wrong. Sound on a video playback, for example, is hopelessly distorted. If, during playback, I mute the system sound and then enable it again everything is fine again - until the next system sound. It's not a major problem to not use ESD, it's just an annoyance.

Java in Firefox

For some reason when I installed the Java runtime, the Java plugin for Firefox did not get installed. To install it manually, you just need to go the Firefox plugins directory and create a link:

su
/usr/lib/mozilla/plugins
ln -s /usr/java/latest/plugin/i386/ns7/libjavaplugin_oji.so

To test if the Java plugin is working you can go here.

Video Enlightenment through MPlayer

I'm sitting in ForensiT's new office waiting for BT to turn up and connect us to the outside world. As the office is still an empty box, I've got some time to update this blog.

Last Christmas my wife and I got ourselves a HDD Sony camcorder; no more tapes; no more messing around transferring video off tape and onto a computer. When I plug the camera into my laptop, Fedora does that cool thing that Fedora does, and asks me if I want to import my photos. When I tried to play a video clip however, Totem just complained that I did not have a decoder installed to handle the mpeg2 file format.

Totem uses either the xine-lib or GStreamer libraries. On Fedora it uses the GStreamer libraries by default, so I set about making and installing the gstreamer-mpeg2 plugin. To cut a long story short, although I could make and install the mpeg2 plugin I got no where trying to play my videos. I've never been impressed by Totem and I'm even less impressed now... Then I found MPlayer.

Basically, MPlayer is awesome! You do have to make and install the software yourself, but it isn't difficult, and it is well worth the effort. There are excellent instructions here. MPlayer played my video clips immediately with no additional configuration.

The only problems I have found with MPlayer are to do with Beryl. With Beryl running, you get a “X11 error: BadAlloc (insufficient resources for operation)” error when you try to play a video. The solution is simply to use the X11(XImage/Shm) video driver: you can set this in the MPlayer “Preferences” on the “video” tab if you are using the GUI; you should also set vo=x11 in the .mplayer/config file in case MPlayer gets called from elsewhere. Using the x11 driver fixes just about everything. The only exception I found is playing wide screen videos: the x11 driver forces the video to play at 4:3. You need to switch to the Metacity Window Manager and change the MPlayer video driver back to “xv” if you want to watch wide screen videos in all their glory. The only other problem with Beryl is that the MPlayer skin stays in a rectangular window rather than showing up on its own.

My feeling is that this is a small price to pay. However, this is Linux and what I'm learning is that one size does not fit all – so another solution might suit you better. There is one other advantage with MPlayer, though. MPlayer can handle RealPlayer files. What's more, you can install a plugin so that MPlayer will play multimedia content embedded in Firefox. There are different versions available; I installed mplayerplug-in. (If you do this, SELinux jumps in when you try to watch a video. However, the SELinux Troubleshooter tells you what to do – you chcon a couple of files - and all is well.) After removing the links to the RealPlayer plugins in the /usr/lib/mozilla/plugins directory, I can now watch RealPlayer content in Firefox without having to launch an external viewer – something RealPlayer itself could never do.

Wednesday, 1 August 2007

VMware

What did I say about VMware being my "get out of jail free card"? Out of the box VMware 6.0 can't be configured to run on kernel 2.6.22.1. See this topic on the VMware discussion forum. If you do, check out the great post by Grogan on Jul 20, 2007 ;-) Fortunately, there is a great fix by "cf" called vmware-any-any-update113 available here.

Kernel Update Woes

After upgrading to the 2.6.22.1-33.fc7 kernel, my D630 reverted to the Metacity Gnome Window Manager; trying to run Beryl caused the machine to lockup. So I spent a boring hour or so rebuilding the Intel graphics drivers as I did before. When I finished rebuilding the drivers glxinfo still reported "direct rendering: No" This was a bit strange: /dev/dri/card0 was in place and the Xorg.0.log file reported no errors. More to the point, Beryl worked fine - so I didn't worry about it.

This morning I boot up my machine and the 2.6.22.1-41.fc7 kernel update is available. So, somewhat reluctantly given that I thought I would have to rebuild the drivers all over again, I ran the update. However, this time there was no problem with Beryl at all. Good news! I had no sound, of course...

Monday, 30 July 2007

D630 Sound fixed!

My thanks go to Mike for his comment here. The updated GATech driver fixed my D630 sound problem. I now have a "STAC92xx Analog" sound device.

I should go on holiday more often! I don't suppose anyone knows anything about Bluetooth? :-)

D630 DVD fixed

The latest Fedora kernel update 2.6.22.1-33.fc7 fixes the D630 DVD issue. All good things come to those who wait.

Of Linux, Holidays and Bluetooth

I've been on holiday. But, like a lot of people I guess, I'm not able to cut myself off from work completely and I still needed to check my emails. However, where I went holiday there is not even a phone, let alone a network. So what to do? What I've done in the past is to connect to the Internet via GPRS on my phone, and connect my laptop to my phone via bluetooth. This is fairly straight forward on XP, trivial on Vista, and on Linux?

The blue bluetooth symbol glows brightly on my D630. The lights are on, but there is no one home. The Dell 360 bluetooth card is not recognized. This is something of a surprise: the 360 card has been around for a while and seems to work with various Linux distros. I can only assume that it is not being discovered correctly by the kernel... So I'm faced yet again with a long hunt for drivers, patches, clues in discussion forums, whatever. Except I'm going on holiday and I really haven't got time for this. Fortunately, I've got an old USB Bluetooth adapter manufactured by a company called Bluetake. When I plug this in Fedora finds it instantly. But despite finding some excellent instructions here I just don't have the time to mess around getting it to work. This is Linux at its most hobbyist; this is Linux the Operating System for people who tinker in sheds. Why can't it just work?

I confess I gave up. I took my old Inspiron 1150 with Vista installed. The bluetooth connection to my phone worked flawlessly.

This is one of the great problems with Linux as a business desktop. Even if you are able to develop a standard loadset image that works with your hardware, there is always going to be some senior manger somewhere who will want to do something slightly out of the ordinary and connect to their PDA or phone or something. When the support call comes in someone is going to have to struggle with Linux to get things to work. Because hardware manufacturers target Windows, working with Windows will always be easier.

So why bother? Why spend your valuable time trying to get stuff to work with Linux when you can just plug it into Windows? Personally, I believe there are a number of reasons why the struggle is worthwhile. Here's just one.

Just before I went on holiday, Microsoft filed a patent for an "advertising framework" that would capture "context data" from your Windows PC so that advertisers could show you targeted adverts in any applications that you were using. According to The Register website: "Microsoft's envisions a "context manager" that would gather data from "various data sources" with a "profile manager" and "profile database" storing data "over a period of time" for use in "refining context data for advertisement selection." (See here.)

Now there are a number of reasons why companies take out patents. Sometimes it is a defensive measure: maybe Microsoft want to get a patent on this before someone else does; someone like Google. However, I can't help thinking of a presentation I attended a few years ago where a Microsoft employee talked about their vision of Office as a service. It could be that there will be more than one way to pay for that service - or maybe you won't get the choice at all. Either way, I don't want a "context manager" monitoring what I do on my own machine. Being able to read, and even compile, the code running on my machine has to be the best way of protecting myself.

Wednesday, 18 July 2007

D630 DVD Update

My thanks go to Julien for his comment here. Following his suggestion I downloaded the updated kernel-2.6.22.1-20.fc7.i686.rpm from the Fedora updates/testing/7/i386/ directory. The update does fix the DVD problem. Unfortunately, the kernel update also knocked out the D630s wireless configuration. The wlan0 device no longer exists :-(


Thursday, 5 July 2007

all-generic-ide

The ide-generic kernel module, ide-generic.ko, is not present on Fedora 7. Possibly that's one reason why the all-generic-ide option won't work.

I guess its possible to build it from the kernel source...

D630 on Ubuntu

There is an interesting post from on the Ubantu forum here. "Lek130" writes:


The issue still is that the d630 has some new components ... Device drivers updates for linux are not top prio for HW Vendors, I am afraid. That is an issue in itself.

I tried a few distros OpenSuse10.1, FedoraCore6, Fedora7, etc.
OpenSuse did not at even get close.
FC6 worked well from CD - no issue. But upgrading to F7 killed the system
F7 CD did not recognize the storage controller.

Feisty Fawn U7.04 was the one I could get quickly working.

Ubuntu 7.04 has the 2.6.20-16 kernel. F7 has the later 2.6.21-1 kernel. Given that FC6 worked, (I found myself that I could install from the FC6 CD,) it looks like something got broken in the later kernel.

Thursday, 28 June 2007

D630 Update

I'm getting no where quickly trying to get the DVD and sound to work on the D630.

There are a lot of posts on different Linux forums describing the DVD problem on similar - but not identical - chipsets. The best I found is here. The advice is to add the parameter all-generic-ide to the "kernel" line in the GRUB bootloader config file /etc/grub.conf:

kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 all-generic-ide rhgb quiet

Unfortunately, it doesn't work on the D630.

I have also tried different BIOS options. In the BIOS, under "Onboard Devices","SATA Operation" is set to ACHI (Advanced Host Controller Interface .) The BIOS says the factory default is ATA. Obviously that's not the Dell factory default. If you try to change it you are warned that "SATA Operation must be AHCI when the Flash Cache Module is enabled." Presumably, Dell have enabled the Flash Cache Module to allow the machine to support Vista ReadyDrive. I disabled the Flash Cache and set "SATA Operation" to ATA: Fedora would no longer boot. I did try booting from the Fedora 7 setup DVD (thinking that a reinstall might not be too high a price to pay to get the DVD working) but it was still not recognized - not even with all-generic-ide.

I've had no better luck with the sound card. I have rebuilt the ALSA (Advanced Linux Sound Architecture) driver, library and utilites but it has made no difference.

It is not just a case then, of getting the latest drivers or changing some settings. The brutal fact seems to be that the current builds of the Linux kernel and drivers simply do not fully support the GM965 chipset. I can probably live without the DVD and without any sound for a while until updates are released, which of course they will be. However, this does highlight one of the difficulties of choosing Linux as your OS - especially in a business environment. Businesses tend to have regular hardware refresh cycles; they need to be comfortable that their loadset images are going to work with the hardware they purchase. The dominance of Windows means that hardware vendors support for Linux will at best be an after-thought, or more likely just be left to the Linux community.

Monday, 25 June 2007

Dell D630 Wireless

The Dell D630 wireless card is supported by Fedora out of the box. For once, I don't need to build any software. All that is required is that you configure it for your network as below.

The two outstanding items are the DVD drive and the sound card. The DVD drive is probably the most important, so I'm going to look at that first.

Dell D630 Graphics Fixed!

I built the Intel 3D driver following the excellent instructions on the Intel website here. I've had no trouble at all building the drivers on Fedora 7 - so if you are thinking about it, don't be put off. Having built and installed the drivers however, I still had no 3D functionality. beryl no longer whitescreened: it didn't do anything. The Intel instructions tell you to run glxinfo to check that direct rendering has been enabled. You should see something like this:

$ glxinfo grep direct
direct rendering: Yes

(grep is one of the wonders of the unix world. I can't believe Microsoft didn't clone it in the early days.) What I saw was "direct rendering: no"

One of my problems is that I'm having to learn Linux as I go along, and it takes me a while to find out about the basic stuff that I really should know about. Every time the X Window System starts up, it creates a a log file at /var/log/Xorg.0.log. This log file is packed with information, and tells you just about everything you need to know about what's happening with your graphics setup. For example:

(II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
compiled for 1.3.0, module version = 2.0.0

I wish I'd checked this before upgrading the 2D driver. I would love to know if version 2.0.0 is installed when you install Fedora 7. If you know, please leave a comment.

Looking through Xorg.0.log I saw the following entry:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device)

There are lots of questions on the Linux forums along the lines The directory /dev/dri exists, but there is no card0 device. How can I create it? The answer is that you don't: the X server creates it as needed. What allows the X server to create the card0 device is drm. My mistake was that I hadn't rebuilt drm along with the graphics drivers. I rebuilt drm (again following the Intel instructions) and then rebuilt the 3D graphics drivers just in case. After a reboot /dev/dri/card0 was present and glxinfo reported "direct rendering: Yes"

I started beryl. Still nothing. By starting beryl in a terminal window with the -d switch, I could see errors like this:

$ beryl-manager -d

[...]

Xlib: extension "XVideo" missing on display ":0.0".
xvinfo: No X-Video Extension on :0.0

[...]

Checking for XSync extension : failed

No sync extension
beryl: No sync extension
Xlib: extension "SHAPE" missing on display ":0.0".

The X library "extensions" are loaded via libextmod.so, which was present on the system, so what was going on? The solution was simple (once I knew what it was.) All I had to do was to explicitly tell the X Windows System to load the module by adding Load "extmod" to the "Module" section of the /etc/X11/xorg.conf file:

Section "Module"
Load "glx"
Load "dri"
Load "extmod"
EndSection

That was it - job done! After a restart everything worked and beryl was back. I'm still struggling with the D630 screen. It is not as clear as when the same machine was running Vista, but that is only part of the problem. This a 1440x900 resolution screen that is physically only 30cm x 19cm in size; 14.1" wide aspect. My 19" desktop monitor runs at 1280x1024. Even on Vista most people would want to use larger scale 120dpi fonts. It requires a lot of fine tuning.

Friday, 22 June 2007

Building the Dell D630 Graphics Driver (Cont.)

Thanks to this post I realised that I was missing the xorg-server.pc file. This is installed by the SDK for developing X server driver modules. Doh! Well you live and learn. You can install the SDK from the Fedora xorg-x11-server-sdk package. That done, the driver built beautifully.

./autogen.sh --prefix=/usr
make
su
make install

If you don's specify the prefix, the drivers get installed to /usr/local/lib/xorg/modules/drivers/ rather than /usr/lib/xorg/modules/drivers/ which is the drivers directory used by Fedora.

And the driver has made absolutely no difference at all :-(

The system says it is still using the "Intel - Experimental modesetting driver for Intel integrated graphics chipsets" video card. More importantly, the display looks just like it did before. Was Fedora already using this driver? I haven't been able to find out. However, the job is only half done. I've built the 2D driver; I now have to build the 3D driver.

Building the Dell D630 Graphics Driver

Fedora 7 on the D630 is not a practical option as things stand, because of the lack of support in the OS for key components of the hardware. I could of course wait until that support arrives, but if I want to run Linux now I really only have one option: that is to enable support for the hardware myself. On the plus side, Intel have released open source drivers for the graphics card and (I believe) the sound card. I don't know about the DVD drive. On the downside, I need to build the drivers myself.

So, ignoring Intel's ominous warning that "Compiling and/or upgrading graphics drivers in Linux is a complex and error-prone task", I've downloaded the source code from Intel here. To download the driver software you need git, which is not installed on Fedora by default. However, you can easily install the git package using yum or pirut (Add/Remove Software.)

git-clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel

Once you have downloaded the driver software, cd to the xf86-video-intel directory that git creates, and see what happens when you start to compile the drivers:

./autogen.sh

This first thing that happened when I ran autogen.sh was that I got an error checking for intel-gen4asm. This was easily fixed by downloading and making the software:

git-clone git://anongit.freedesktop.org/git/xorg/app/intel-gen4asm
cd intel-gen4asm
./autogen.sh
make
su
make install

However, I'm now getting this error:

./configure: line 20243: syntax error near unexpected token `XINERAMA,'
./configure: line 20243: `XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)'

For once, there are plenty of hits on Google for this error, which is said to be related to the xineramaproto.pc file. However, I have the xineramaproto.pc in my /usr/lib/pkgconfig/ directory, which is on my PKG_CONFIG_PATH. I'm guessing it is an environment variable problem, but at the moment this is holding me up.

Tuesday, 19 June 2007

Installing Fedora 7 on a Dell D630 Laptop (Cont.)

The machine did boot. However, all is not well. The DVD drive, which caused the installation problems, does not show up. I've no sound. The sound card detected is the "Intel Corporation 82801H (ICH8 Family) HD Audio Controller." Which - presumably - is wrong.

The system is using an "Intel - Experimental modesetting driver for Intel integrated graphics chipsets" driver for the D630's Intel GMA (Graphics Media Accelerator) X3100 graphics card. This works up to a point. It is successfully driving the display at 1440x900 resolution, but the screen has an oddly milky appearance. Support for the GM965 Chipset as a whole is obviously an issue. I have a vision of looking in Windows Device Manager and seeing all those yellow exclamation marks in the device tree.

And tragically trying to run Beryl is a disaster. All I get is a screen whiteout. It's probably the experimental graphics card driver. All that graphics capability is going to waste... I need to get better hardware support from somewhere, or things are looking bad.

Installing Fedora 7 on a Dell D630 Laptop

I start by booting the Laptop from the Fedora 7 install DVD. On the "Installation Method" screen you are asked "Which type of media contains the packages to be installed?" I choose "Local CDROM" Immediately there is a problem. I get an error message saying "No driver found":

Unable to find any devices of the type needed for this installation type. Would you like to manually select your driver or use a driver disk

Selecting any of the listed drivers just brings me back to the same screen.

I try booting from a Fedora Core 6 CD instead of the Fedora 7 DVD. This time everything is fine. Obviously, the Fedora 7 installer doesn't contain any drivers for my DVD drive, or more likely the ICH8M Intel Ultra ATA controller it is hanging off of. Not good. Still, I should be able to get Fedora 7 loaded from CD instead of DVD. Accept... There aren't any CD images. The Fedora Project website states "Beginning with Fedora 7, it is recommended to use Live images to install on a system with a CD-ROM only." So I try that. The problem is the Fedora 7 Live CD doesn't work either! All I get is an error:

---------------------------------------------------
WARNING: Cannot find root file system!
---------------------------------------------------
Create symlink /dev/root and then exit this shell to continue the boot sequence.

For a few minutes it looks like I'm hosed and that I'm going have to go back to Vista. But then I have a better idea. I boot from the DVD again. This time when I'm asked what type of media contains the pacakges to be installed I choose "HTTP." I'm prompted to configure TCP/IP (and just accept the defaults) and the machine gets an IP address. I'm then prompted for a Web site name and the Fedora directory. It works! The installer is now pulling down the packages from a mirror site.

Trying to install Linux on the latest hardware is clearly a problem. I just hope the system boots when the installation is complete.

Decision Time

My new Dell 630 laptop has been delivered. It is time to put my money where my mouth is. Will Fedora be my main OS on my new laptop?

If you have read any of the posts here, you will know what the answer is already. Despite the problems and compromises, it's a no-brainer: I'm going with Linux.

Of course, because of VMWare I do have a get-out-of-jail-free card: I can run multiple OSs on the same system - and being a Windows developer I will definitely need to do that. But because I really want to explore Linux, Linux has to be the main OS. If I was configuring this machine for a colleague, I probably wouldn't make the same choice. Probably... But I'm going to keep that discussion for another time.

Interestingly, despite Dell saying "The fully configurable Latitude D630 can come pre-loaded with new Windows Vista, Windows XP or FreeDOS to suit your business needs..." Dell wouldn't sell me a D630 without Windows pre-installed. However, after some negotiation with our account manager a mutually acceptable deal was struck :-)


My first impression of the D630 was how much smaller it seemed than the older latitudes I've used in the past. This is the result, I think, of the wide aspect screen which makes the machine narrower - and lighter. It is not a wholly positive impression - the screen does seem small. Still, I guess I'll get used to it.

Monday, 18 June 2007

I love Beryl (True)

What is it about Linux? Perhaps because of the collaborative nature of the Linux community, because of the strict rules on how things are done necessitated by its collaborative nature, nobody wants to shout about anything, even when they have something to shout about. Fedora 7 is taken to be a "bleeding edge" distro. So why isn't beryl installed by default, or at least why isn't there an option to install it?

What's beryl? Beryl is an OpenGL accelerated desktop that gives you all the features you've heard about from Windows Vista: "glass" toolbars; 3-D Windows transformations; Windows "thumbnails." What's more, because it's based on OpenGL, you do not need 256Mb of dedicated Video RAM to get it to work. Beryl works beautifully on my old Toshiba laptop.

Now I have read articles where is beryl is discussed in dismissive tones as "eye-candy." Anyone who takes that position is betraying a profound ignorance of the computer market. As I have discussed elsewhere, the "wow" in Microsoft's multi-million dollar marketing campaign for Windows Vista is precisely this "eye-candy." Beryl blows it away.

So install it! On Fedora 7 it's right there. Just go to "Add/Remove Software" and install beryl-gnome - the "meta-package" to install all beryl components. Once you are happy that everything is running, you will want to get beryl to start automatically. Just type gnome-session-properties in a terminal window and add the Beryl Manager to Startup Programs. The default install location is /usr/bin/beryl-manager.

This being Linux, you can now spend many happy hours running the Beryl Setting Manager to configure all the different options with all their different parameters. Absolutely brilliant!

Friday, 15 June 2007

RealPlayer

One area where it might be thought that Linux lags behind Windows and OS X is in delivering multimedia content, and in particular video. Possibly this is because the idea of a free Operating System does not sit comfortably with the restrictions imposed by Digital Rights Management (DRM) and enforced - not to say embraced - by Windows Media Player, QuickTime and iTunes.

So what if I want to watch some free content, say from the BBC news website? Well, things aren't good. If you try to watch a news story you just get a error saying "Not yet supported."


The software that does not yet support the video format is the Totem Movie Player for the GNOME desktop. At this point you only have one option, and that is to install RealPlayer.

Now sometimes small things trip you up. How difficult could it be to get RealPlayer working with Firefox? I've been trying (on and off) for a week.

There are two ways to download RealPlayer: as a binary file - RealPlayer10GOLD.bin - and as a .rpm. If you go for the binary you have to make it executable first:

su
chmod +x RealPlayer10GOLD.bin
./RealPlayer10GOLD.bin

You then get prompted for the install directory:

Directory: [/home/David/RealPlayer]: /usr/share/RealPlayer

Note that the default install location is completely unhelpful...

Unfortunately, there is a good chance that the install won't run at all. Instead you will get an error along the lines of "error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory." RealPlayer, it turns out, tries to link to an old C++ library. We fix this by calling yum which installs compat-libstdc++-33:

yum install libstdc++.so.5

At least if you run the binary you see this problem early. If you use the .rpm everything appears to be OK until you try to run RealPlayer. As is so often the case with the Linux GUI nothing happens. You have to run RealPlayer from a terminal to see that the library is missing.

Run RealPlayer from the "Applications/Sound & Video" menu first. RealPlayer will then configure the (Mozilla) Firefox plugin for you. So we're good to go, right? Er... no. If I go back and try and watch the news story again all I see is this:


Now what I can do is launch the video in a standalone RealPlayer, although that is hardly ideal. Sadly, that is as far as I've got. I've spent a long time trying different configurations and on searching for a solution, but without success. The BBC website itself notes:
You may find that you are only able to listen to live radio using the Listen using stand-alone Real Player link.
Disappointing.

Thursday, 14 June 2007

Liberation Fonts

The font issue that I described here is a serious one. Red Hat have made a new set of fonts available, called Liberation, which are free to use and free to distribute. You can read more here: http://www.press.redhat.com/2007/05/09/liberation-fonts/

Firefox still looks crap, but Red Hat should be given a great deal of credit for beginning to address the issue.

Fedora 7

I've been running Fedora 7 for almost two weeks. To be honest, in terms of the user experience the changes over Fedora 6 are pretty minimal. The most notable features are the new Fedora default theme with its blue folders, and the advent of Fast User Switching à la Windows XP, Vista and OS X.


Like OS X, a "User Switcher" option appears in the Notification Area on the desktop next to the clock. Or, at least it should. I upgraded my previous installation of FC6 to Fedora 7 so that I could keep my home folder and settings (and all the work I'd done with Evolution.) The "User Switcher" does not appear in my upgraded desktop the Notification Area, although it does appear on the desktops of any new users I create. This isn't really a problem for me, and I haven't spent any time investigating.

Upgrading was easy. The biggest problem I had was that GRUB (the Linux boot loader) insisted on trying to boot FC6 - which no longer existed. I could hit a key to choose Fedora 7 from the menu, but I usually forgot. The answer was to edit the /boot/grub/menu.lst file and set the "default" value to zero so that GRUB would boot the first option listed (Fedora 7) rather than FC6. I suppose I could just have deleted the FC6 option altogether, but I was worried about screwing things up and not being able to boot at all...

Other than that, I had to rebuild my MadWifi wireless driver so that it would work with the new kernel, and - strangely - I had to reinstall the Java runtime. But that was it.

I continue to be very impressed with the Linux OS. My feeling about Linux "office" applications is less unequivocal. Fedora 7 comes with OpenOffice 2.2. Although OpenOffice applications are perfectly practical, because they are imitations of Microsoft Office applications you cannot help but compare them to the original: and if you do that, they are always going to fall short; they are always going to look and feel less slick and more clunky. I did download StarOffice, the paid-for version of OpenOffice from Sun. My advice would be don't bother. These is no difference in terms of functionality as far I could tell. StarOffice is supported, of course, but other than that there seems no reason to purchase.

Despite my misgivings about OpenOffice, and despite my frustrations with Evolution, I'm using Fedora as my laptop OS. Since installing Linux on an old Toshiba laptop about three weeks ago, I've only gone back to my Vista laptop once.

Monday, 4 June 2007

A final word on building Evolution 2.10

Happily I have now resolved the two errors that were causing me problems. The first error -"Could not connect to Evolution Exchange backend process" - was caused by the wrong version of evolution-data-server running in the background. The problem seems to have been related to the evolution-data-server entry in the bonobo-activation-config.xml file - which I swear I had already updated. The second error - "Could not create composer window" - was also fixed by adding an entry to the bonobo-activation-config.xml file: this time, for gtkhtml. The key here was to rebuild gtkhtml with --prefix so the new version got installed into a different directory. I then put the new path in the bonobo-activation-config.xml file so that it was the new version that got called by Evolution not the version originally installed. This is an important lesson learnt. There is so much integration between gnome applications, like Evolution, and the gnome desktop that you really need to keep any updated builds separate.

So what is Bonobo? Bonono "is the GNOME architecture for creating reusable software components and compound documents." (See here.) It is a set of CORBA interfaces

which will ultimately provide the ability to [do] a lot of things that users of GUI-systems such as MacOS and Windows have gotten used to, such as embedding spreadsheets in word-processing documents, reusable user interface controls, scriptable components etc. (Here.)

It's COM for Linux. I won't go any deeper into this now. Suffice to say, I think, that unlike COM, CORBA has never really been wholly embraced by developers. Rightly or wrongly, it has a reputation for being overly complex - as if COM is not complex enough. However, it is clear that by editing the bonobo-activation-config.xml file we have some control over which version of a component gets called.

So Evolution 2.10.2 is working! What's more, Fedora 7 ships with version 2.10.1, so maybe my efforts have been of some practical value: I will still be running software I build myself on Fedora 7. I did finally find some instructions for building Evolution - although much too late for me. The website is http://www.go-evolution.org/ Thanks to Novell for providing a link on the main Evolution site... not. I have to say I have to disagree with the author of the instructions. They start off saying "building it ain't really hard at all" which is true; but then in the very next sentence go on to say:

Normal users (who aren't planning to start developing Evolution) shouldn't be reading this. Really. I'm serious about this! You will probably not understand a single thing about this documentation if you don't have a strong Linux-development background!

This is developer bull. You do not need to know anything at all about development to make and install software on Linux.

But that is enough about Evolution. Fedora 7 is out and its time for something new.

Friday, 1 June 2007

Running Evolution 2.10

I wish I could say I was running Evolution 2.10. The truth however, is that despite having successfully built the software it isn't working.

The first error I get is "Could not connect to Evolution Exchange backend process" when trying to connect to Exchange:


My feeling is that this is related to having two versions of Evolution and evolution-data-server installed on the machine. If I force a shutdown with evolution-2.10 --force-shutdown I get the message "Shutting down evolution-data-server-1.8" which is the wrong version.

That's bad enough, but I can't reply to any mails at all without a "Could not create composer window" error - and a crash.


So why not just remove the old version of Evolution? The problem with that is the way that the Fedora Package Manager works - either though yum or pirut ("Add/Remove software".) The Package Manger is excellent at installing any dependencies a software package might need to run when it is installed, but when it comes to uninstalling the software things go a bit wrong. Evolution is dependent on Gnome libraries in order to run. So what do you think happens if you uninstall Evoluton? Gnome gets uninstalled as well. That's right, you lose your desktop. Genius!

Fortunately, I was running VMWare when I discovered this little quirk, so I could just rollback. However, this is a serious failing. You should surely be able to remove your email client without removing your desktop.

So perhaps I just need to find a way of getting Evolution-2.10 to run with the right build of evolution-data-server... But then, Fedora 7 has been released.

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.