Monthly Archive for December, 2009

When Compiz won’t start..

So now that you know how to get Compiz working properly, what do you do if it still refuses to enable itself via the “Desktop Effects” program?

Justin had this exact problem on his machine. It appears that the compiz-gtk script wouldn’t start and my theory was that it’s unable to replace Metacity (for some reason).

So I fixed this by editing his gconf file directly
sed -i 's/metacity/compiz-gtk/' \
.gconf/desktop/gnome/session/required_components/%gconf.xml

This means that Metacity is never loaded to begin with, instead calling compiz-gtk to do its magic.

This is exactly what is set after successfully enabling Compiz via the “Desktop Effects” program, so we’re just bypassing whatever problem was stopping it from being enabled (like I said, I think it was unable to replace Metacity).

If you have the same problem, try this fix. If it can’t start Compiz it will safely revert to Metacity.

-c

Fedora 12 and Compiz (Settings Manager)

Fedora uses the older method of enabling Compiz, via the gconf plugin.

The “Desktop Effects” program under System -> Preferences runs the /usr/bin/compiz-gtk script (part of the compiz-gnome package) to enable Compiz, or fall back to Metacity (GNOME’s window manager).

gconf backend
The compiz-gtk script executes the command:
compiz --ignore-desktop-hints glib gconf gnomecompat

On systems here (with NVIDIA cards at least), the gconf backend package was not installed. This means that even though NVIDIA and 3D is all working, Compiz won’t start. So, installing the required gconf backend package should make it all work.

su -c 'yum -y install compizconfig-backend-gconf'

Now try again.

ccp backend
Upstream however, Compiz has moved away from gconf and is using libcompizconfig (ccp) and the CompizConfig Settings Manager (ccsm) to handle settings.

Installing the ccsm package under Fedora and changing Compiz settings using the graphical manager (CompizConfig Settings Manager) results in none of those taking effect.

This is because the compiz-gtk script is not loading the ccp module. So the workaround is to install ccsm and then modify the script to replace gconf with ccp.

su -c "sed -i 's/gconf/ccp/' /usr/bin/compiz-gtk"

Now try again.

Keep in mind that updated versions of the compiz-gnome package may overwrite this file, so you’ll need to edit it again in future if this happens.

Updated EFI GRUB2 tarball, including 64bit

I’ve updated the EFI GRUB tarball that I created for my how to install Linux on an Apple Xserve EFI only machine instructions.

The new 89MB file includes both 32bit and 64bit installers (sha1sum). For systems with a 64bit CPU, but not a 64bit EFI, installs of 64bit Linux are possible via the 32bit loader (bootia32.efi). Just boot it and select the relevant 64bit option from the GRUB menu.

It does also include a native 64bit EFI (bootx64.efi) loader which I have not been able to test because the Mac Pro I use does not have a 64bit EFI.

This version drops both Jaunty and Leonidas, but includes a newer Karmic kernel and support for Fedora 12 (Constantine). Thanks to sufehmi, there is also a sample GRUB and X.Org config file included for Debian/Ubuntu.

Instructions
This is covered in my original post, but it essentially consists of the following:

Grab a suitably sized USB memory stick and let’s prepare it. Please know what device it is you’re partitioning!! I’ll use sdz just for example purposes only.
Unmount it
su -c 'umount /dev/sdz1'

Partition and format it
su -c 'parted -s /dev/sdz mklabel gpt mkpartfs EFI fat32 0% 100% toggle 1 boot'

It should now automatically mount. If not, unplug it and plug it in again, or mount it manually.

Next you can extract my tarball onto the device, ensuring that it maintains the efi/boot/ directory structure on it and not create an extra directories because of the archiver. If it’s not right, then re-arrange things and eject the device.

You should now be able to plug it into your Mac and turn it on.

Hold down the Option key (Alt key on non-Apple keyboards) until you see the boot option. It should show “EFI” on the USB stick. Boot this and you should see the GRUB menu load. Choose the distro you want to install and away you go!

-c

Linux on Mac Pro with multiple drives, for real this time

Recently I wrote about wanting to run multiple instances of Linux on the Mac Pro at work, using multiple drives.

OK, so Intel based Macs have an EFI, not a BIOS and so a standard PC install won’t work (that’s old news). The most common way to dual boot a Mac is to use rEFIt which presents a graphical menu on boot and lets you choose which OS to boot.

Unfortunately, it’s not possible to use rEFIt when using multiple drives and MBR installations (as I recently discovered).

However, it is possible to use rEFIt with an EFI-only Linux installation on other drives. Yipee.

So here’s how it could look, for example..

Drive one:
EFI partition
OS X
Ubuntu
Windows

Drive two:
EFI partition
Fedora 64bit

Drive three:
EFI Partition
Fedora 32bit

Drive four:
Something else again..

Either way, the good news is that it’s possible to do with an EFI-only install, however not all distros support this yet. Fedora makes this possible by using efidisk.img (available in both 32bit or 64bit).

Simply download the one you want and dd it to a USB memory stick. Plug it into the Mac, power it on and hold down the Alt key until the boot menu appears. If you’re using rEFIt, then just reboot and it should detect it. Either way, you should see an icon for the EFI installer.

During Fedora installer, use the whole disk you want to install onto. This will create the required EFI partition and install the boot loader there also. Before you finish the install, switch to terminal 2 and sync the MBR table (this is because GRUB needs it):
gptsync /dev/sdb

Now when you reboot, rEFIt should see it as an entry to boot to, as should holding down the Alt key on boot.

For Debian and Ubuntu it’s a little more complicated (but not impossible). I wrote an extensive post about Linux on an EFI only machine, to which this applies.

If you want to use the 64bit EFI loader for a 64bit install of Linux, then the EFI in your Mac must be 64bit. Else use my 32bit loader and choose the appropriate option from the menu.

The other unfortunate thing I discovered is that the Mac Pro I’m using has a 32bit only EFI. This means that I can’t install a 64bit EFI-only version of Linux on it. Time to ask Mike for a new Mac I think..

Update: There is a way around this and my updated tarball makes it possible to install 64bit Linux on a Mac with 32bit only EFI.

Does your Mac have 64bit EFI?

Update: Actually, you might be able to install 64bit Linux on a Mac with 32bit EFI by including the “fakebios” GRUB2 option. I’ve updated the grub-efi tarball to include this and it works on my Mac Pro. Thanks to Martijn Broeders for this.

To install 64bit Linux onto a Mac using only EFI (and not MBR emulation) then your Mac must have a 64bit EFI. Run the following under OS X to discover whether you have 64bit or only 32bit:
ioreg -l -p IODeviceTree | grep firmware-abi

This should return something like:
| | "firmware-abi" = <"EFI32">

If you see “EFI32” like I do, then it means your machine can’t execute 64bit EFI loaders, so you’re stuck with 32bit, d’oh!. If you see “EFI64” then you should be able to install native 64bit Linux using EFI only, yay!

I discovered this while trying to load 64bit only my Mac Pro at work as an alternative to running Linux with multiple drives and MBR (which doesn’t really work) :-(

This is why the 64bit Fedora efidisk.img never worked on my Mac, but the 32bit one does.

-c

Linux and X.Org multitouch support

With X.Org 7.5, multitouch support under Linux has finally arrived and appears to be working very well. There’s a new video showing it off, along with instructions on how to get it going (most of it works out of the box on Fedora 12).

-c

Script for configuring ClamAV server on Fedora

In short, I’ve written a bash script (available from github) for configuring and removing instances of clamav-server on Fedora. It lets you create and remove individual instances with a specific user and port (if you specify them) and will install the required packages if not already present on the system.

In long, we use Clam AntiVirus as our antivirus protection for Digital Preservation Recorder and talk to it over the default port, 3310.

Installing the clamav-server package under Fedora however, doesn’t actually set up an instance. In fact, it doesn’t copy any system configuration files into place at all. This means that the system is left without any working ClamAV server out of the box.

Under Fedora, ClamAV server is configured on a per user basis. This is actually quite important (unless you run as root) because the daemon needs at minimum read access (and we’ve found also write) on the files/directory being passed for scanning.

The instructions on how to configure it are located under /usr/share/doc/clamav-server-[version]/ but I have taken these instructions and written a bash script to configure all of this for you.

The script is available from github. It can create or remove an individual instance of clamav-server using a specific username and port (if you want to specify them, else it defaults to clamav on port 3310). The script will also install any required packages, if you don’t already have them on the system.

Hopefully this is useful to someone else out there and not just us :-) If you find any bugs feel free to let me know.

Code from French Military used in Thunderbird 3

The French Military switched to free software in 2007 and has developed an extension for Thunderbird called “TrustedBird” which is co-branded with Mozilla and used in the recent Thunderbird 3.

The military found Mozilla’s open source design permitted France to build security extensions, while Microsoft’s secret, proprietary software allowed no tinkering…

The military uses Mozilla’s Thunderbird mail software and in some cases the Trustedbird extension on 80,000 computers and it has spread to the ministries of Finance, Interior and Culture.

With the French Police having switched to Ubuntu, it looks like the Government as a whole is migrating that way also.

Microsoft’s new “Patent Pledge for Open Source Developers”..

..is complete rubbish.

Essentially, Microsoft has made a pledge (note, not a promise!) NOT TO SUE “open source” developers who create software for “their flagship products” SO LONG AS THEY DON’T SELL IT.

If You engage in the commercial distribution or importation of software derived from an open source project or if You make or use such software outside the scope of creating such software code, You do not benefit from this promise for such distribution or for these other activities.

I’m pretty sure that will be in violation of anti-competitive laws in just about every country in the world.

Microsoft calls this promise:

The most comprehensive commitment to the promotion of interoperability in the history of the software industry.

HAHA, now that is funny. Guess they’ve never heard about a little thing called open standards and the free software movement.

The best KDE based distro

TuxRadar has put together a review of eight of the top KDE-focused Linux distros.

Not all distros are made equal, particularly if you’re a KDE user. KDE has had something of a rough time over the last couple of years. The transition from version 3.5 to 4.x hasn’t been easy, and over this period many distributions have decided to use either Gnome or stick with KDE 3.5 as their default desktop.

But we feel KDE 4 has now matured to a point where most KDE users can safely dump their old desktop and move on to the new one. There are very few stability issues, and most of the functionality found in 3.5 has been migrated to 4.3. The question is, which Linux distro provides the best experience for KDE users?

Their winner? openSUSE, and I have to say that I agree. The number one feature for me is their most impressive seamless integration of Firefox with KDE. Please, please, include this in other distros!