The Pastels

I just discovered the Pastels, in particular the best-of Truckload of Trouble. Fantastic!

Truckload of Trouble

I’m going to look at the whole C86 ‘scene’ since they are supposed to be so representive of that sound, in particular the first Primal Scream album Sonic Flower Groove seems interesting. It is supposed to be very Byrds-esque and apparently was a major influence on early Stone Roses.

Sonic Flower Groove

Until today I only really knew Primal Scream from after Screamadelica onwards. I can’t decide if this album cover is more or less embarrassing for them than the confederate flag on Give Out.

Making a shared data folder in Linux

I wanted to set the file permissions properly on our shared music folder (accessed by Samba/scp/directly on the computer by different users). Basically, I want anyone in the ‘data’ group able to read and write everything.

First, I created the data group.
sudo groupadd data

Then I edited /etc/group and made all the relevant users members of that group

Then I set the ownership and permissions on the directory using the following script. One note is that the last line sets the 'setgid' permission on the directories (chmod g+s ...) which makes the permissions 'sticky'.



echo "Changing Group ownership to 'data'"
chgrp -R data $DIR
echo "Changing permissions of files to ug=rw,a=r"
chmod -R 664 $DIR
echo "Changing permissions of directories to a+rx, g+rwx, g+s"
find $DIR -type d -exec chmod a+rx,g+rwx,g+s '{}' \;

Now set the umask so that the group gets write permission by default. In /etc/profile:
umask 002

Finally, set the same permissions in Samba too. In /etc/samba/smb.conf:

path = /data
available = yes
browsable = yes
public = yes
writable = yes
create mask = 664
directory mask = 775

Now files and directories are created group-writable.

drwxrwsr-x 2 user1 data 4096 2008-02-15 11:29 temp
-rw-rw-r-- 1 user1 data    0 2008-02-15 11:29 test


When you copy files via scp, the umask is not set properly because the bash doesn't read startup files in this situation.

In order to get scp to set the umask properly, you need to add umask 002 to /etc/default/ssh (in Debian/Ubuntu, on Redhat-derived systems try /etc/sysconfig/sshd).

This will set the 002 umask for all users. If you want something more fine-grained you'll need a more complex solution.

How to fix VLC crash on startup in Gutsy

IN Ubuntu Gutsy, when I tried to run the VLC it would crash (segfault) complaining of  “double free or corruption” in g_slice_alloc().

The problem is actually in the underlying WxGTK library that VLC uses for the user interface. It was a bug that didn’t cause any problems until some non-standard memory allocation function was fixed in glib and exposed the mis-use of this function in some applications. It also affects WxGlade and even the Gimp apparently.

Anyway, it’s dead easy to fix. Put the following in your environment:



to /etc/environment or

export G_SLICE=always-malloc
to ~/.bash_profile and/or ~/.gnomerc.

More old virtual machines

After my adventures with RedHat 7.2 in VMWare, I decided to make a redistributable VM that was more or less compatible. The main reason is that VMWare Player is not available out-of-the-box on Ubuntu Gutsy (that’s what you get for messing with proprietary freebies!). Instead, I’ve been playing with the open source rather excellent VirtualBox virtualization software.

Actually, the first thing I did was convert my RH7.2 VMWare image into a VirtualBox image. Through the magic of qemu-img I first converted it to a raw disk image: (In fact, you can use a VMWare .vmdk file directly in VirtualBox, but you won’t get some of the fancier features like snapshots.)
qemu-img convert redhat72.vmdk redhat72.bin

Then I used a VirtualBox tool to convert the raw image into the “vdi” VirtualBox format (you might need a lot of disk space for this step):

vboxmanage convertdd redhat72.bin redhat72.vdi

That image worked fine in VirtualBox (noticably slower than VMWare though, even with the vboxdrv kernel module loaded.) When it first loaded, the RedHat hardware utility kudzu discovered the changes in virtual hardware and set everything up with no problems.

I also created a CentOS 2 virtual machine for VirtualBox. CentOS 2 is a clone of RedHat Advanced Server 2.1, built from source with the RedHat trademarks removed and therefore it is permissible to redistribute it. This OS is very similar in vintage to RedHat 7.2, and most statically compiled programs will work on both platforms (which is what I need it for)

As per my VMWare image, I have installed subversion (3.4.2 from source, works with svn+ssh:// protocol but probably not for https://); GCC v3.4.6; Boost v3.4.1; and GSL v1.9. The source directories are in /root/temp/installation.tar.bz2. I also updated the OS using yum to get the final version of all the packages. I don’t think that CentOS 2 is still being updated though, so this is really not a safe OS to have on your network.

After installing I ran vboxmanage modifyvdi centos2.vdi compact which doesn’t do anything at all on it’s own. Apparently it only shrinks zeroed sectors, so first you need to run
dd if=/dev/zero of=filler
rm filler
then the modifydvi command again. This got it down to 2GB.

Anyway, if you’re looking for a virtual machine that’s 100% compatible with RedHat AS 2.1 and 95% compatible with RedHat Linux 7.x, you can download the VDI image for VirtualBox here. The root password is ‘centos2’ and the file weighs in at 560MB.