Paul's Computerblog

Contents
  1. DigiGuide - 19th May 2010
  2. DVD player - 17th May 2010
  3. Upgrade woes - 29th April 2010
  4. LAMPP - 23rd April 2010
  5. My Return - 21st April 2010
  6. Frustrations - 26th April 2007
  7. A Major Malfunction - 12th March 2007
  8. SpamAssassin rules - 18th February 2007
  9. Danger! Danger! - 17th February 2007
  10. BOINC - 17th February 2007
  11. SpamAssassin 3.1.5 - 16th February 2007
  12. Mandriva 2007 - 14th February 2007


DigiGuide

19th May 2010
Managed to get DigiGuide working, but as per usual with Linux, not without the usual amount of trouble. I downloaded the mandriva 2007 wine rpm from winehq, but it wouldn't work, giving me a "Floating Point Exception" error. This held me up for a while. So, I downloaded the source and tried to compile it. It soon backed out, saying that my version of "Flex" (Fast Lexical analyser) was too old, So, I got version 1.1.35 of Wine and compiled it. After an hour, and using wine to run the setup programme, it worked, albeit somewhat slower than under Windows, but it works...

DVD player

17th May 2010
Finally got a DVD player up and running. Having used VLC before on Windows XP, I decided to try it, and guess what happened? Yes, despite following the instructions rigidly, it wouldn't work.
So, I decided to try a different route and found LinDVD already installed on my system. Of course, this being Linux, it didn't work properly first time, oh dear me no. I had problems with the sound and then found that the DVD stops playing after a few minutes.. Both of these were easily fixed.

The LinDVD instructions and help page were barely adequate. I was told that screen grabs of images "are stored in the Capture subdirectory of the LinDVD directory". Great, where was this exactly? I met a stony silence, so did a search of my hard drive. Found the images in $HOME/lindvdcap, not quite where I was told it would be.

Now all I need to do is find a codec for Windows Media 9 videos....but thats for another day...

Upgrade woes

29th April, 2010
My vesion of GIMP is rather old (vintage 2007) and needs a radical upgrade. So, with no luck finding an rpm that was suitable (indeed, many of the webpages seem to be inaccessible). So, on the GIMP's advice that installing from source is not difficult, I decided to give it a go. So, I got the latest GIMP source and tried the usual ./configure && make && make install route. It ground to a halt, as I needed a recent version of intltool. So, I installed this, no problem. Then the installation of GIMP ground to a halt. I needed something called "babl". So, I got that and I wouldn't install. A quick check of the internet, and I found I needed to do "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" and this worked fine. So I tried babl again, and an error message shot back: I needed GEGL. Got this, installed it, tried again. This bombed out. I needed a recent GLIB. I installed this.

Now, at this point, the installation of GEGL ran OK until it came to autodetect the GLIB installation. It found my recent install, but also an older one and suggested I remove the old one or fiddle with some settings. Now this, I wasn't prepared to do. I have no idea the effects that removing a library will have on my previously installed applications, so I backed out.

Acting on advice from the GIMP website, I decided to try (as root) "uprmi gimp" but all it said was that "The package(s) are already installed." Yes, I know GIMP is installed, I want the new one installed! How hard can this be?

My return

21st April 2010
After a catastrophic crash that resulted in my notebook being wrecked, I have decided to migrate all my files to Linux, where hopefully I can spend more time learning the nuances of this OS. At present, all I have done is use it to collate statistics. Now, I have an incentive to do something more.
So, there I was, the notebook wouldn't boot up. I got the Windows XP screen, but it went black rather than load up the OS. Fortunately, the computer had "The Tech Guys" programme included, and, although it couldn't repair what was amiss, I could use it to get a DOS window up, where I used the xcopy command to transfer files from the hard drive to a USB pen. Multiple trips upstairs with the pen, then copy more files later, and I was ready.
I managed to upgrade Firefox and OpenOffice too, and got the plugins for Java and Shockwave Flash installed too. The first one of these was a bit tricky in that I had to follow recent instructions for Java (create a symbolic link to libnpjp2.so), and the Bejewelled Blitz page on the Facebook Mindjolt page gave me the link to find the Adobe plugin. Again, the instructions were not write, as all the "untar" command did was produce the .so file itself, which I could then place in the firefox/plugins/ directory. A quick tweak of the "start" and "fast shortcuts" menu and the new applications opened rather than the old ones.
There are some problems though. Firefox is prone to crashing for no reason at all, and it does it quite frequently. I suspect the problem is due to my plugins. For instance, when looking at my homepage, Firefox will crash after a few minutes, leaving the Applet Window visible until I close it down. The OS also seems a bit slow when opening up mutliple applications (usually OpenOffice + anything else!)
At the moment I am trying to get DigiGuide working with Wine, but all I get on the command line is "Floating Point Exception". The very latest of Wine wouldn't work as it suffered from a lack of library dependencies, and this is one area I don't want to get into.
...and despite Linux evangelists saying how newcomers would be dazzled by the array of software choices on display, I must report the opposite. I had a diagram that I wanted to modify. Its based on a screen shot of a flash application. Of course, PrintScrn wouldn't work (nothing is easy in Linux it seems), so I used the Gimp, which was overkill for what I wanted. I then wanted to modify the image to draw two small red elipses on it. Dozens of image manipulating tools and not one of them did what I wanted. I had to download and install KPaint, which, despite being very old did what I wanted.

I wish Linux was a bit like Windows, where things just work.

Frustrations

26th April 2007
It has been a frustrating couple of weeks. My PC crashed twice and lost my emails.

The first time, I was trying to customise Kmail so that, when new email arrived, the TARDIS landing sound effect would be triggered. I found a suitable sound file and tried it. My PC froze. After waiting for ages, I did a hard reboot (power off). When the PC came back up, there were inode errors galore, so I had to do another fsck. When the PC came back up, all my emails had gone. Fortunately, I had everything pre-February on CD, and all my mails from mid March onwards were still on gmail (I no longer use uk2.net's email), but it was annoying. To put it lightly.

I found another sound file, tried it, and it worked fine. A few days later, the PC froze again, and another, much longer fsck was needed. Fortunately, I had lost nothing this time!

This is not the only thing to irk me:

Kooka works much slower than under SuSE;
SpamAssassin no longer works;
My desktop clock keeps gaining time- as much as 7 minutes in 2 1/2 weeks;
Firefox (which I keep open all the time) seems to be a resource hog. The longer it is open, the slower my PC runs. Now, I have read that my version of Firefox has memory leak issues, and I did try to update, downloading a more recent version. But where were the instructions on installation? On the website, according to the "README" file. And were they there? Not as far as I can see!

Bloody annoying.

A Major Malfunction

12th March 2007
I've noticed that my PC was running slower and slower, and attributed this to BOINC. I tried nice-ing them to a very low priority and eventually suspended the projects to which I am connected, and my computer inadvertently rebooted. When it came back up, I was presented with dozens of inode erros, requiring a fsck. This done, I noticed that the PC did run faster but spamassassin didn't work anymore. Running "spamassassin --lint" from the command line caused loads of erros. The spam threshold for spam detection is now 99, not 5! So, I reduced the threshold of uk2.net to 8; anything above this is regarded as spam and returned to the sender.

I have no idea what happened over this weekend!

SpamAssassin rules

18th February 2007
As good as SpamAssassin is, it does need to be tailored to the individual, and providing your own rules is quite simple. I placed the yellow sections below in /.spamassassin/user_prefs after all the other provided settings:

body DEAR_NOTHING_TEST /Dear,/
score DEAR_NOTHING_TEST 6.0 6.0 6.0 6.0

The above is the basic syntax for a rule; on seperate lines, provide the body (the actual test), the score and an optional description. Inoticed that SpamAssassin had a default score of 5.0; anything above that, after the application of Bayes, and rules, is marked as spam. The tag "body" indicates that the test is aimed at the body of the email, not the subject, and not the header.
So, what does the above test do? Well, I am assuming you are familiar with perl (Practical Extraction and Reporting Language). I noticed I am getting a lot of spam starting "Dear," - if these scammers are to send me email, then at least put my name in the salutaion. So, giving it a score of 6 takes it over the spam threshold and into the bin it goes. There are four scores above for network and bayes situations. RTFM. The /i indicates case insensitivity.
Yes, you can give scores negative values too. Depending on how much of a value you give it, this will elp to separate the wheat from the chaff.

#Viagra etc.
body __VI_TEST /\bv.{0,10}gra/i
body __CI_TEST /\bc.{0,10}lis/i
body __XA_TEST /\bx.{0,10}nax/i
body __VA_TEST /\bv.{0,10}ium/i

meta VI_CI_TESTS (( __VI_TEST + __CI_TEST + __XA_TEST + __VA_TEST)>0)
score VI_CI_TESTS 6.0 6.0 6.0 6.0

This next bit introduces metarules, or rules built on rules. The names of the tests are preceeded by a double underscore character. What do the tests above do? Well, they look for indications on words, again case insensitive, that start with "v" and end with "gra"; up to 10 non-whitespace characters (in perl syntax, ".") can separate these two fragments. So, Vokfekgra will be picked up, as will Viavvggra and, obviously Viagra, and the same for Cialis, Xanax and Valium. The \b flag simply means "word break", so "Viagra" will be picked up, but "poopopViagra" won't.
The line beginning "meta" simply says that more than zero of the preceeding, double underscored tests must be true, so any combination will be picked up.
Incidentally, the hash symbol indicates a comment; these lines are not parsed by SpamAssassin.


#Watches
body __ROLEX_WATCH_TEST /rolex/i
describe __ROLEX_WATCH_TEST Rolex

#Watches
body __OMEGA_WATCH_TEST /omega/i
describe __OMEGA_WATCH_TEST Omega

#Watches
body __BREITLING_WATCH_TEST /breitling/i
describe __BREITLING_WATCH_TEST Breitling

body __CARTIER_WATCH_TEST /cartier/i


meta WATCH_TESTS ( (__ROLEX_WATCH_TEST  + __OMEGA_WATCH_TEST  +  __BREITLING_WATCH_TEST + __CARTIER_WATCH_TEST) >1)
score WATCH_TESTS 6.0 6.0 6.0 6.0

Do you want a new watch? I don't!
Incidentally, many of these rules are included in SpamAssassin; these are just ones I put in to target specific junk.

# .*com etc.
body COM_TEST /(?:\+|\*|\-)com/
score COM_TEST 6.0 6.0 6.0 6.0
describe COM_TEST garbled top-level com useage e.g mydomain.*com

This rules checks for +, * and - immediately before the "com" in a top-level web address. Since these characters inclusion is not legal, why would anyone put them there and ask you to remove them? ("http://www.myspamhome-com, replace - with . to make it work") Obviously the sender has something to hide. Into the bin it goes.


#Fifth Third Bank
body FIFTH_THIRD /fifth third/i
score FIFTH_THIRD 6.0 6.0 6.0 6.0

#Fifth third bank subject
header SUBJ_FIFTH_THIRD Subject =~ /Fifth third/i
score SUBJ_FIFTH_THIRD 6.0 6.0 6.0 6.0

Fifth Third Bank? Push off!
This introduces a new type of test - header checking; i.e. does the Subject contain "fifth third"? Note the ~ symbol.

body BULLISH_TEST /bullish/i
score BULLISH_TEST 6.0 6.0 6.0 6.0

Typical rule here: the word "Bullish" is only used in spam to try and entice people into pump and dump scams. Needless to say, I'm not interested!

#score BAYES_95 6.0 6.0 6.0 6.0
#score BAYES_99 9.0 9.0 9.0 9.0

These are examples of rules I tried which didn't work, so I commented them out. What they say is that, any Bayes scoring which is more than 95% certain of being scam, assign it a score of 6. Unfortunately, this was giving spam (non ham) messages high scores, dumping them in my spam folder.
Once that is done, run the following command from a shell:
spamassassin --lint
The lint (shecking) routine grumbled about something, in a file I had never touched, but it seems to have updated spamassassin with the new rules.
Now, I can say that, with all the procedures followed in this article, my undetected spam has gone down to maybe 2 or 3 per day. IF I'm unlucky.

Danger! Danger!

17th February 2007

Never had this happen before. Was sat at home, pickling my brains in alcohol, when the PC started making a very loud two-tone noise, like a siren. I naturally shut the machine down and did a quick Google. It seems that this is a warning from the BIOS that something is overheating inside the case, usually an indication that the CPU isn't seated properly or than the fan isn't working as it should. So, a quick removal of the case, making sure the fans and CPU assembly were secure, and, thanks to cotton wool buds, makng sure the fan blades were clean and free from any eccentric oscillations, and everything was fine. I think I must have jarred something when I was moving the case to get the ADSL cat5 cable stuck in the network socket.

BOINC

17th February 2007

Resurrected two dormant BOINC (Berkely Open Source Infrastructure for Network Computing) projects of mine; seti@home and einstein@home . Take a look...there might be something there you want to participate in. And if nothing there does, theres a more comprehensive list here. Why waste those CPU cycles when you're asleep, brewing coffee etc.: ;)

SpamAssassin 3.1.5

16th February 2007

Spam, spam, bloody spam. I'm sick to death of the bloody sight of it. Before I opted for a makeover of my computer/internet connection, I was getting up to 20 messages an hour, only a few of which were ham (i.e. not spam). I'd tried SpamAssassin during my brief experimentation with SuSE 9.2 and was impressed by it, and I was eager to pick up the mantle again.

My free email account on uk2.net had SpamAssassin installed. I can't recall which version, but it is at least a few years old. I collected stastics on the amount of spam identification it could do, and found that about 1/3rd were being correctly assigned. Only a few were false negatives (ham identified as spam). However, it looked like the Bayesian filtering mechanism, to learn from spam so that it could auto-identify rather than rely on rulesets, was not working. Technical support assured me that it was. After 264 ham had been categorised and nearly 3000 spam, Bayes wasn't working.

Setting up SpamAssassin on Mandriva is simple; a matter of running a wizard, and then letting it run. You can select ham and spam and then right click to run the filters, choosing the correct one. After a few hundred spam and ham have been identified, the Bayesian filter should activate, making those pesky Viagra/Cialis, Fifth Third Bank, Replica Rolex Watch and Pump and Dump scams, to use a horrible cliche, "a thing of the past". I know I should use the latest release, 3.1.8 but 3.1.5 came with the GNU/Linux distribution and I didn't make to mess around with make files, rpms, tarballs or anything else that makes me twitchy.

Well, nearly.

Seems you have to do a bit more to get Bayes to run. And yes, its another configuration file:

If you want user-specific settings, you'll need to edit ~/.spamassassin/user_prefs (where the ~ indicates the path to your home directory).

For global settings, etc/mail/spamassassin/local.cf is the file you need. You'll need root access for this one.

You'll see two lines containing the following use_bayes and bayes_auto_learn; these will be preceeded by # symbols. Remove the # and make sure that the lines read

use_bayes 1

bayes_auto_learn 1

Bayesian classification should now be working, as you when enough emails arrive. Open a message in (for instance kmail) and view it in the Preview Pane; you'll see a rectangle which will give SpamAssassin's score for spam. Hover your mouse over that, and you should see "BAYES__" message strings after a while.

You should try it. Heres the link.

Addendum: after a while, I felt that I had trained SpamAssassin enough and had incorporated enough rules (see above) to remove the junk I was getting. I elected to move my web-based email from uk2.net to Gmail. This has many advantages: I can download my emails via POP3 to my home PC; its free; it has 2 GB of storage space, and best of all, it has a near 100% successful spam filtering system. Now, all mail sent only to paul@paullee.com gets sent to GMail, from where I download it. Everything else gets sent to the Black Hole this is trashcan@uk2.net. So, I won't be reading emails addressed to chadwick@paullee.com,. spurs@paullee.com, websitepaul@paullee.com etc. etc. etc.

Mandriva 2007

14th February 2007

My beloved, if sadly obsolete SuSE 8.2 proved to be incapable of dealing with my new Sky Broadband line, so it became necessary to upgrade to a newer version of GNU/Linux. I had been using SuSE for about 7 years and been mostly impressed (though 9.2 was a mixed blessing as it wouldn't work with my scanner or printer, so I had to take the retrograde step back to 8.2). Since starting to use the GNU/Linux OS in 1997, it has been mostly a good experience; although compiling a new kernel with my first version, Redhat 5.2, was a disaster as it broke my dial-up internet connection, and the technical support to get XFree86 working was a shambles (translated "you have x days of support, but we're not going to reply for so-many-days, so you don't get much help"); I have never used Redhat since, except at BAE SYSTEMS. I eventually got X working via trial and error with screen refresh rates, resolutions and mouse selections.

SuSE was a lot better; X worked out of the box, although WinModems never did. Upgrading through various version of 6.* and 7.* intermittently caused the sound card to cease working, as drivers were issued and re-issued.

Now, I felt it was time for a change. I had read good reviews of Mandriva and settled on this, purchasing the PowerPack version from France. Installation was so simple and I settled back for a good session of tinkering with my new toy.

First problem, and it made my heart sink. No X-windows. Reminded me of the bad old days of RedShat 5.2.

Research on the internet suggested a few solutions; it seems the problem was my nVidia GeForce2 graphics card's drivers, which I gather are proprietory and not open source. I tried the following approach:

su password
make backup of /etc/X11/xorg.conf, just to be safe
in xorg.conf, go to the section labelled "Device" and change
Driver "nvidia"
to
Driver "nv"

Shutdown the computer and re-started it. X now works fine. But this first problem left me wary. Suppose you were told by zealots that Linux was better than Windows, and decided to try it out, only to have to fiddle with the guts of the machine and alter configuration files. Would you be impressed? I wouldn't, and I suspect it would put many casual users off continuing with any type of Linux. A black mark against Mandriva for this; this should have been noted and changed during testing.

Despite this, Mandriva worked first time; ethernet, audio etc. I'll try playing a DVD movie at some point.

Hmm. scratches beard Now I think of it, both SuSE 8.2 and 9.2 had problems, requiring installation of SCSI modules before the main installation. Makes you think if Linux will ever get it right...


Return to my homepage or mail me