Archive for the ‘My Code’ Category.

Revisiting

Firstly, a couple of updates on recent posts - I gave up getting my new wifi to work upstairs, its just too frustrating. I’ve also had further problems with the fan on my downstairs computer. The new fan is larger than the previous one, and catches on the motherboard, causing the machien to overheat again. However, I think I managed to solve this problem by wedging some paper underneath the powersupply.

So, I’m on school holiday now, so I have the time to resurrect a couple of projects I started a while ago. The first is multistanza, my free version of ubuntu’s multiverse repo. Now that I run gnewsense, not having packages like vlc or mplayer in main or universe is becoming quite annoying. I rewrote a substantial part of my multistanza creation script, so that it doesn’t require root, and doesn’t accidently include the non-free povray. My rewrite should also make it easier to support multiple archectures, as I am now working out the package url and wgetting it, rather than relying on the system-specific apt-get cache. I am also using my new(ish) hosting to host a repository - multistanza.freedomdreams.co.uk - but I must be careful not to pull too much bandwidth. I wonder if the people at gnewsense would be willing to host it for me.

The other thing I’ve had another look at is my Freedometer. This is a program that will scan your system, tell you how free it is, and help you make it more free. I wrote some code for it a while ago, but never publicised it. What I’ve done recently is clean up the code a little, and build a proper website, so that I can publicise it to try to find other people to work on it with me. At the moment, its written in python and only works fully on debian based distrobutions.

Reaction testing and removing languages

So, I’ve done a couple of interesting code related thing recently. I’ve created a reaction tester which someone was asking for on the schoolforge mailing list. You can try it, or if you really want to download it. If anyone else finds it useful, uses it for anything, can think of any (not too difficult) improvements then I would love to know.

In other news, I tried to slim down my mediawiki installation (used mainly for ADFA wiki) by removing language files, but seemed to get an error:

Warning: preg_match() [function.preg-match]: Empty regular expression in /path/to/wiki/includes/Linker.php on line 1259

Turns out the error was unrealted, and I got rid of it simply by clearing the cache DOH (add &cached=no to the end of the url). I’m not sure what was causing that though. Its supprising though, after actually deleting the unwanted language files, I managed to free up 19M of disk space. Quite a bonus when my account only has 50M of space! The moral of the story is, check something is working before trying to improve it.

Multistanza and Medibuntu

Note: If you just want to look at my bash script and related text files (without packages), you can download them here.

Following from my last post, I decided that the best way to try and solve this issue would be to create a free-multiverse repositroy. To do this, I hacked together a bash script that would compare sid-main with ubuntu-multiverse (using packages lists I downloaded manually and removed the headers from) and pull any of the packages that overlapped between the two. I also got it to read an extras file, for packages that are in multiverse but not sid main, but yet are still free.

So, I now have a demonstration free-multiverse (which I call multistanza). This is currently hosted on my own pc, so will dissapear at night. If you are interested, try this link. compare.sh is the main script and the repo an be added as “deb http://bjwebb.homelinux.com:81/multistanza/ binary-i386/”. I will look for some off site hosting if I decide to pursue this further. If anyone does use my repo, I suggest using it in conjunction with medibuntu (see below).

But, the question is. Is this the best way to pursue this? What I’ve done so far has been no loss to me, because I’ve learnt some more bash scripting; but it is only worth continuing if my new repositry will be of use to other people. Thus, it would be a good idea to know if this has been done already. As far as I know, it hasn’t quite been done the way I want it. However, there is medibuntu, which contains packages not allowed in ubuntu, and is separated nicely into free and non-free. In fact, since I have the repo added, some of the apps get pulled from medibuntu instead of my repo. Unfortunately, not all the packages in medibuntu are as new as the ubuntu ones (hence why my repo and medibuntu could be complimentary) and some are not there at all (vlc for example).

So, I think that the best and most consitent way of having a free “extras” repo, and to avoid duplication of effort, would be for medibuntu to offer all of the free packages in multiverse in their free repository. I think this would fit in with their goal, but I’m not sure if they’d agree. I will contact them about this issue, and see where to go from there.

Firefox Theme Mod

This is the beauty of freedomware, you can take it into your own hands and make it how you want.

I was using the theme Midnight Fox, but due to my dark kde theme, the history and autocomplete box were unreadable. Nevermind though, after reading an easy tutorial on editing themes, I was able to fix these problems myself. I’m uploading it here just in case anyone else finds it useful.

Note: If your setup is not similar to mine, with a dark system wide theme, it will probably look even more broke than the original.