Vim Copying Issues

I came across an interesting issue today – I opened a file in Vim, and yanked (copied) around 140 lines. Then I opened up another file and pasted those lines – however I only ended up with 49 lines!

This caused me a lot of annoyance, until I finally found the fix – in the Vim configuration file, there was the following lines:

set viminfo='20,\"50    " read/write a .viminfo file, don't store more than
                        " 50 lines of registers

The 50 tells Vim not to store any more than 50 lines of data in the copy buffer. Boost that up to whatever you like, and that solves the limitation. :-)

For reference the system-wide configuration file should be in one of the following locations (depending on your distribution):

/etc/vimrc
/etc/vim/vimrc

Or you can create a local configuration file at:

~/.vim

Evolution Broken on Ubuntu 6.06

So I had just sat down at my computer, with pizza, ready to relax, and clicked on Evolution expecting to read my email…. but alas, it fails to start. :-(

After running it from the CLI, I got the error:
(evolution-2.6:9203): camel-WARNING **: Failed to initialize NSS

And then evolution just quits. :-(

The Workaround
Undoubtably Ubuntu will release a fix for this ASAP. But for those of you who can’t go 5mins without email, here’s a workaround (in newbie-compatible instructions):

Open a terminal (Applications->Accessories->Terminal).

Type the command: (press enter at the end of it)
LD_LIBRARY_PATH=/usr/lib/firefox evolution

This will start evolution. Keep the terminal window open in the background – if you close it, it will close evolution. Just use this workaround until an update is released to fix this. :-)

WTF is happening?
For the technical readers, here’s what’s happening:

This problem is caused by the upgrade of firefox just recently (upgrade to 1.5.dfsg+1.5.0.10-0ubuntu0.6.06.1), and the problem is that the location of the NSS libraries have moved from /usr/lib to /usr/lib/firefox. Evolution requires the NSS libraries to provide support for SSL and other encryption technologies.

Here’s the bug entry from Ubuntu for this problem.

The command “LD_LIBRARY_PATH=/usr/lib/firefox evolution” works by tells evolution to look in the /usr/lib/firefox directory for the dynamic NSS libraries.

Today’s technical lesson
In case you are interested, LD_LIBRARY_PATH is an environmental variable that tells programs where to look for dynamic libraries. It can be configured in /etc/ld.so.conf. By default, it looks in /lib and /usr/lib. Many distros also specify /usr/local/lib. (Interestingly, I just checked, and it doesn’t appear that Ubuntu has this file created by default).

After making a change in it, you can run ‘ldconfig’ to update the library cache based on the new settings.

Vista vs Linux

Steven J. Vaughan-Nichols (DesktopLinux.com) has written a review of him comparing Vista to Linux, on a step-by-step basis from install up.

You can read his whole review here. However, what you should definitely read, is page 3.

Steven came across big problems with Vista relating to hardware support, such as buggy drivers with missing features, and certain common hardware not being supported. It also sounds like Microsoft has been understating the true system requirements to run vista, and there are some interesting stats in the article.

I fail to see how Microsoft can claim that Vista is ready for people to use, when there is a lack of driver support and missing driver features – it all shows signs of being rushed out of the door – and I wonder what else got rushed – security testing perhaps?

What scares me even more are certain big organisations who are starting to role out Vista installations on a big scale, when the software is so new. It is also unfortunate that Dell has stopped offering WinXP on their desktops, consider that lots of people will still want XP for another year or two at least.

However, I feel the best bit in the article was “When I switched back to Vista, I tried to play Wilco’s Yankee Hotel Foxtrot CD. Whoops! Not a single sound emerged from my speakers. After a little investigation, I found that Vista disables media outputs that don’t incorporate DRM, when you try to play DRM protected media through them.”.

Vista certainly does deliver on the “WOW” experience. The “WOW, this really sucks” experience.

Mac Mini

In the weekend I went out and picked up a little Intel Core Duo 1.66Ghz Apple Mac Mini. I got the model with 512MB RAM and 60GB hard disk, and I am using it as my desktop/home server, freeing up my amd64 for developmental work.

Here’s what I love about it:

  • The unit is almost completely silent! I now leave it on all the time, as it doesn’t bother me with noise, and makes it useful as my home file server.
  • Low power usage – only about 23W whilst idle. (according to apple, and also various other people have measured similar results)
  • The DVD drive is also very quiet when playing DVDs.
  • The sound quality from the integrated audio is very good – just as good as my Creative Audigy LS in my old desktop.
  • It looks REALLY nice. :-)

However, in my adventures with it in the weekend, I found a few things that are a problem:

  • 512MB does not run MacOS very smoothly – if you are going to use MacOS (I used Linux of course), boost it up to 1GB.
  • The DVD drive seems to have read problems on a few very hot days I’ve had. :-/
  • It does not have a BIOS – instead, it has EFI, which means that installing Linux is not as simple as normal.
  • MacOS would crash at startup, leaving me with an all blue screen – I found that this occured whenever it was connected via the KVM! Some kind of nasty bug there…. :-/

Other cool stuff:
If you want a box to run Xen on, the Intel Mac Mini’s support the VT-instructions, that allow you to run unmodified operating systems (eg: MS Windows or legacy OSes) on Xen. If you are interested in that, check out the info here.

Overall, I think it’s a great little unit and would recomend it to anyone after a quiet desktop/small server/media center. :-)

Jedo Linux Status Report

In the last few weeks I have been working on the base packages for Jedo Linux. Today I have completed a bootable system and in another week, I will have finished tweaking it, and fixing small issues.

I would say, I am only about 2 weeks behind the (rough!) schedule given in my last status report, which isn’t bad going really. :-)

Once I have the base packages working reliably and problem-free, I will be turning my attentions to the package manager.

Whilst Portage is quite a nice package manager, the emerge program doesn’t suit my needs in the following ways:

  • strange options like –noreplace being needed for normal operation.
  • quite different options to RPM.
  • updating the ebuilds via HTTP is annoying.
  • limitations of various settings and strange configuration methods.
  • lots of features I have no plans of using, which effectivly adds feature bloat for me.
  • lack of various features that I want.

I will be writing my own package manager, based partially on Portage. Essentially, it will use the ebuild.sh script from Portage (with a whole bunch of changes) which handles the ebuild files.

I will then write a program called JPM (Jedo Package Manager) to replace emerge. This program will:

  • work out dependencies for installing/removing packages
  • have similar style options as YUM and RPM.
  • easy to configure
  • either using Perl or C.
  • easy to use binary or source packages.
  • considering adding bittorrent support for downloading packages.

So that’s what I’ll be working on for the next month. And hopefully in March, I will be ready to start working on the installer, and in April might be able to release a test ISO of the base system. :-)

Coreutils rm -rf problem

I’ve found an interesting problem when I was in the process of building base packages for Jedo Linux. I could compile coreutils okay, but I then found that the command “rm” when used with the -r option, would fail. As an example:

mkdir -p /tmp/junk/foo/bar/mydir
rm -rf /tmp/junk
rm: cannot remove `/tmp/junk': Function not implemented

After spending a long time looking into this problem, making sure my toolchain was okay, etc, I finally got a hint of the problem from this post, relating to a build problem with BeOS that causes the same/simular problem.
The author goes on to mention that it can be reproduced under Linux, by making /proc inaccessible at build time.

Since I’ve been building in a chroot, /proc wasn’t mounted. After mounting it and building coreutils again – it worked!

So: To anyone out there building coreutils – MAKE SURE /proc IS MOUNTED!! :-)

UPDATE
Interesting…. it seems that the problem occurs anytime if /proc is not mounted! I’m not sure if this is a requirement of coreutils, or some kind of weird bug….

Overhead Wire Tangle

A couple of months back they did some work on one of the lamp-posts in my street – I think they might have actually replaced it, but since I always walked past whilst heavily in though about Linux, I can’t be sure as I wasn’t paying too much attention…

However, either way it appears they bodged the job, and the pole appears to be at a slight angle, meaning that a lot of the lower wires and boxes such as fiber can no longer reach the pole.

See my photo of it here, which shows the mess the wiring has become.

I love how they have used some rope to hold the cables in mid-air. :-) The most amazing thing, is that this has managed to survive many strong, windy days for a few months now. But the wires are looking worse every day.

Windows Vista – How would you like to be screwed today?

I’ve heard about Windows Vista’s strong DRM, but I thought it was basically for multimedia playback and DRM’d documents.

However, the truth is worse. Peter Gutmann has done a cost analysis of Vista’s copy protection – and it doesn’t look good. Here’s my summary of this great report highlighting some of the issues that are in Vista and my thoughts about them.

Premium Content

Firstly, all those of you who brought nice, expensive HD screens and video equipment will be able to play HD content with them, right? WRONG, because it doesn’t support HDCP content-protection – infact: “None of the AGP or PCI-E graphics cards that you can buy today support HDCP”

What this means, is that Vista will deliberately cripple your playback to a lower resolution, and the new technology you brought isn’t going to be used to it’s true advantage. You’ll have to wait for new Vista-compatible hardware to come out and purchase that.

Of course, this is all to prevent piracy – but the real pirates have various ways around it (as they always do), and at the end of the day, the consumer suffers.

There is also an interesting side-effect of this feature, which criminals could use to take out surveillance video equipment connected to Vista using the DRM – “If it’s possible to convince Vista that what it’s communicating is premium content, the video (and/or audio) surveillance content will become unavailable”. Of course, if you are using one of the most well know security-flawed OSes for your security system, I wouldn’t have much sympathy.

Hardware and Drivers

Then there is the issue of open source hardware. It seems that the hardware for Vista, needs to have a unique fingerprint (Hardware Functionality Scan) to make sure it is “genuine” (aka: Microsoft DRM compatible) – “The only way to protect the HFS process therefore is to not release any technical details on the device “.

This is going to make getting specs to release open source drivers even harder from some vendors. And for windows users, it also adds bloat to drivers, as each driver for each model of device needs to contain unique code.

Now, to add to craziness all of this – Microsoft will have the ability disable drivers at will! “Once a weakness is found in a particular driver or device, that driver will have its signature revoked by Microsoft, which means that it will cease to function” – so if you have a piece of hardware that gets it’s driver DRM cracked, Microsoft can release an update to disable it.

This is bad enough, but where it becomes REALLY bad, is when you consider vendors who might not release a newer version of the driver to fix the problem – eg: for an old video card, a vendor might not care about fixing the driver, so Microsoft can re-release it. Fancy having to buy new hardware without warning? Not me.

Then there is all the overhead that the new bus encryption requires (yes, data being transferred inside your pc, will be encrypted!) as well as the increased development costs of new devices, and you have a whole bunch of nasties waiting for your average Joe Blogs to stumble into.

Opinion

All this adds up to make using Vista, look much more like a Faustian bargain, giving in your freedom and rights to Microsoft for “premium content” that you probably won’t be able to play on your hardware anyway.

Hopefully hardware manufacturers will put their foot down, and tell Microsoft “no way”. And the media companies should really consider if they want to put all their trust into Microsoft allowing them to run their premium content on Vista as “once this copy protection is entrenched, Microsoft will completely own the distribution channel”. And Microsoft has shown that when it is a monopoly, it certainly likes to abuse that power.

Lots of home users are also going to be bitten by this – and will warn others away from Vista. They will look at other solutions, such as Linux which will allow them to play whatever they want, however they want.

I think (and hope!) Vista will be the unravelling of Microsoft’s desktop domination – Various non-IT people I have spoken to lately (in particular small/med business owners) are going to avoid it as long as possible, because of the high cost of upgrading all their computers AS WELL as the additional problem of getting legacy applications to work on the new Vista, and having to perform staff training for the new releases of programs.

Linux is becoming a smarter alternative for the desktop every day now. And when people have to move from Windows XP, it is very likely we will see a massive uptake of Linux. Virtualisation and emulation technology will also make it far easier to deal with the issue of legacy windows programs.

MacOS is also a very nice alternative these days as well and the hardware is relatively affordable (and damn nice!), although MacOS could have DRM pushed into it should apple decide to do so, as it does contain a lot of propietary code.

Of course, as much as I’d like it to happen, I doubt Microsoft will be disappearing any time soon. It’s quite possible that they will move out of the OS market into other areas such as gaming (Xbox), music (Zune) and online services (MSN/Window Live), which they have been building quite a lot recently.

So, tell your friends, family and co-workers to stay away from Vista, and point them to other, Open and Free operating systems that don’t try to control and lock down their users. And with enough users moving to OSS, Microsoft’s desktop OS domination will start to unravel.

Think Freedom. Think Open Source.

INTERESTING COMMENTS

Jon “Maddog” Hall has some thoughts about how vendors might handle the hardware issue:

In the hardware space, what I would do as a hardware vendor is have two “models” of hardware. One with DRM, and one without. I would not publish the specs of the Microsoft DRM-crippled hardware and publish the specs of the non-DRM labeled hardware. If the hardware was designed right, this would simply be turning on or off a bit in firmware, plus the costs of the separate labeling, stocking, etc. The second cost is not to be under-rated, but it would keep open the market for companies and countries that value the experience of their customers and citizens and will not go along with Microsoft’s draconian FRM philosophies.

We did much the same thing back at Digital, where the hardware we had with Microsoft’s software in it was called “Multia”, and the hardware we had with Linux (or BSD, or anything else) was called “UDB” (Universal Desktop Box). Only the nameplate on the front and the software on the disk was any different.

Maddog’s thoughts make sense – there will be a large market of people wanting non-crippled hardware, and this is one of the ways a vendor could handle it.

Another way is to make hardware automatically turn the DRM on or off depending on the motherboard it is connected to – so, if you plug a video card into a Vista-Compatible motherboard it will run in DRM. Or, if you plug into a non-DRM motherboard, it will run in non-DRM mode. This could be done by passing a signal across the motherboard.

However, the best solution by far would be for vendors to refuse DRM – if (for example) ATI, Intel and Nvidia refused this, Microsoft would have no graphics drivers for most of the computers available on the market – and they would have to back down.