yahoo’s expired certificate screenshots

such a shame for such a big company…



was it so difficult to replace the cert a bit earlier ?

*edit
Yahoo changed today it’s certificate with another one…

libmysqlclient.so.12 => not found

I’ve upgraded my mysql from 4.0.X to 4.1.X…and some progs gave me errors that they could not start because they couldn’t find they proper mysql library…
The solution is to download a mysql package called MySQL-shared-compat. Unfortunately it only comes as an rpm…but..for us gentoo users there’s a nice solution to installing it.

Go download one of those rpms http://rpm.pbone.net/index.php3/stat/4/idpl/2144706/com/MySQL-shared-compat-4.0.25-0.i386.rpm.html and then:

rpm2targz MySQL-shared-compat-4.0.25-0.i386.rpm
tar zxvf MySQL-shared-compat-4.0.25-0.i386.tar.gz
cp ./usr/lib/*.so.* /usr/lib/

and you are done…all progs continue to work just like before.

gentoo “broken” world file

Yesterday, I did an “eix xpad” and I saw that there were newer versions than I had installed…That was weird because I daily do my “emerge -uDav world”. That was not the first time though such a thing had happened. So I opened my “/var/lib/portage/world” file and started checking for some of my packages that should be in there, like gimp, k3b, etc. There were just not there.
What I did was copy the world file to the root dir and then “regenworld”. Magically around 40(!!) new packages appeared inside the world file.
“emerge -uDav world” gave me aroung 20 packages to upgrade. Then I did an “revdep-rebuild” and my system is rocking again 🙂
I still don’t have an explanation of why did this happen…why weren’t these packages inside the world file…possibly broken emerge commands…but why ?

flawless fbsplash

I’ve recently faced some problems with my fbsplash installation during a kernel upgrade. Until kernel linux-2.6.11-gentoo-r9 I had no problems at all…when I tried upgrading to linux-2.6.11-gentoo-r11 I had kernel messages all over my splash screen…

The solution was not quite obvious…I re-read the fbsplash HOWTO and I started checking out everything it says…
I ended up changing my lilo.conf to something that looks like this:

image = /boot/bzImage-2611-r11
root = /dev/hda6
label = G2.6.11-r11
append=”gentoo=nodevfs,video=radeonfb:ywrap,1024×768-32@85 splash=silent,fadein,theme:KillBillTux-Yellow quiet CONSOLE=/dev/tty1″
initrd = /boot/fbsplash-killbill-1024×768
read-only # read-only for checking

along with a nice re-emerging of splashutils.
Then it came to me…why have the bootsplash in the default runlevel and not on boot ? so I could get my bootsplash from the very beggining…like some modern distros like Ubuntu does.

rc-update add splash boot

And I thought that would be enough…wrong! Read again fool! http://gentoo-wiki.com/HOWTO_fbsplash#Adding_Background_To_All_Consoles

As the splash script requires ‘local’ to be run first, adding splash to runlevel BOOT will force local to execute earlier, which may cause some problems, eg. when you are using some web services in local (eg. ntp)

now what ? What if we create another “local” named local2 and put all our previous commands there ?

cp /etc/conf.d/local.start /etc/conf.d/local2.start
cp /etc/conf.d/local.stop /etc/conf.d/local2.stop
cp /etc/init.d/local /etc/init.d/local2

then edit /etc/init.d/local2 and change all occurances of local with local2
then it’s time for:

rc-update add local2 default

and…drums rolling…. it works!

collectd ebuild part2 – the rejection

my collectd ebuild that I had posted to bugs.gentoo.org was tagged as a duplicate of http://bugs.gentoo.org/show_bug.cgi?id=107076 even though it was created after mine…anyway 🙂

I might try to build an ebuild on something else someday 🙂

HOWTO extract rar files with rox

What’s easier than a single click extraction of rar files through rox ?

  • vi /usr/local/bin/urar
  • and paste inside:

    #!/bin/bash
    cd `dirname “$@”`
    unrar x -y `basename “$@”`
    mkdir “unrar done”

  • chmod +x /usr/local/bin/urar
  • then right click on a rar file…go to customize menu and drop /usr/local/bin/urar to the new window that appears.

    Now when you right click on a rar file you will see on the menu “urar”…just click it and you will have your rar files extracted to the current dir. It’s easy to modify the previous script to extract the files to a new dir if you want. It will also create a dir named “unrar done” to notify you when the process has finished.

    What needs fixing ?

  • Passworded rar files
  • some fancier method of telling us the extraction process is over instead of a mkdir…maybe with a small pygtk program to make it open a small “notice” on the current X display ?
  • collectd ebuild

    Last night I decided to create a gentoo ebuild for collectd. It’s the first ebuild I create…so bare with my errors…

    The ebuild is here: http://bugs.gentoo.org/show_bug.cgi?id=107052

    To emerge it follow these simple steps:

  • add PORTDIR_OVERLAY=”/usr/local/portage/” to your /etc/make.conf
  • mkdir -p /usr/local/portage/sys-apps/collectd/files
  • download the ebuild and put it inside /usr/local/portage/sys-apps/collectd/
  • download the rest attachments and put them inside /usr/local/portage/sys-apps/collectd/files/
  • cd /usr/local/portage/sys-apps/collectd/ ; ebuild collectd-2.1.0.ebuild digest
  • emerge collectd
  • I think the ebuild is not “stable” yet…it has only been tested on 2-3 x86 machines so I’ve added the ~x86 keyword for it…

    Feedback is more than welcome…thanks!

    collectd multiple sensor patch

    Collectd is a very nice program that runs in the background and gathers statistics about various kind of stuff like cpu load , disk activity, memory ,fan speed, temperatures, etc, and then puts them all in nice rrd files. It even has a set of scripts to create the graphs. I had only one problem though, but it was fixable.

    Collectd includes sensor.h from lm_sensor package that contains all the functions about your working temperature/fan sensors. It works fine if you only use 1 sensor. But I use 2!

    it87-isa-0290
    Adapter: ISA adapter
    CPU core: +1.78 V (min = +1.66 V, max = +1.84 V)
    DDRAM: +1.31 V (min = +1.17 V, max = +1.33 V)
    3v3 I/O: +3.22 V (min = +3.14 V, max = +3.47 V)
    +5V: +5.09 V (min = +4.76 V, max = +5.26 V)
    +12V: +12.42 V (min = +11.39 V, max = +12.61 V)
    -12V: -11.47 V (min = -7.17 V, max = -16.76 V)
    -5V: -4.03 V (min = -2.48 V, max = -10.02 V)
    Stdby: +5.09 V (min = +4.76 V, max = +5.26 V)
    CPU Fan: 4166 RPM (min = 1599 RPM, div = 4)
    BOX Fan: 1506 RPM (min = 897 RPM, div = 8 )
    IT87 T°: +37°C (low = +15°C, high = +55°C) sensor = thermistor

    lm90-i2c-0-4c
    Adapter: SMBus Via Pro adapter at 5000
    LM90 T°: +47°C (low = +15°C, high = +60°C)
    Athlon T°:
    +53.5°C (low = +15.0°C, high = +70.0°C)
    LM90 Crit: +70°C (hyst = +60°C)
    CPU Crit: +80°C (hyst = +70°C)

    As you can see I use both it87 and lm90 to get correct results. Collectd creates its rrd databases inside /var/lib/collectd. The sensor rrd file it creates are in the form:

    sensors-fan1.rrd
    sensors-fan2.rrd
    sensors-fan3.rrd
    sensors-temp1.rrd
    sensors-temp2.rrd
    sensors-temp3.rrd

    That means it can’t distinguish the different chipsets and overwrites the values if you have 2 chipsets. What I did was patch collectd to rename the rrd files in order to include the sensor name as well. I now have:

    sensors-it87-fan1.rrd
    sensors-it87-fan2.rrd
    sensors-it87-fan3.rrd
    sensors-it87-temp1.rrd
    sensors-it87-temp2.rrd
    sensors-it87-temp3.rrd
    sensors-lm90-temp1.rrd
    sensors-lm90-temp2.rrd

    The patch is here: Collectd-multi-sensor.patch.gz
    Just apply the patch inside the src dir , recompile and install.

    I am in doubt whether I should contact the author or not about this simple patch…anyway…If you use collectd and have more than 1 sensor running…tell me if it works for you…

    cheers!

    graffiti

    A great graffiti group…that’s art….

    http://www.banksy.co.uk

    I think this is my favorite: http://www.banksy.co.uk/outdoors/images/newfullsize/trooper.jpg

    No more classical Trigonometry? Here comes Rational Trigonometry

    At least that’s what an australian academic, Dr Norman Wildberger, says. He says he managed to rewrite the classic geometry theorems and formulas without using trigonometric functions. His book might be worth a look.
    From his introduction:

    Rational trigonometry
    The new form of trigonometry developed here is called rational trigonometry, to distinguish it from classical trigonometry, the latter involving cos θ, sin θ and the many trigonometric relations currently taught to students. An essential point of rational trigonometry is that quadrance and spread, not distance and angle, are the right concepts for metrical geometry (i.e. a geometry in which measurement is involved).
    Quadrance and spread are quadratic quantities, while distance and angle are almost, but not quite, linear ones. The quadratic view is more general and powerful. At some level, this is known by many mathematicians. When this insight is put firmly into practice, as it is here, a new foundation for mathematics and mathematics education arises which simplifies Euclidean and non-Euclidean geometries, changes our understanding of algebraic geometry, and often simplifies difficult practical problems.
    Quadrance measures the separation of points, and spread measures the separation of
    lines. It turns out that

    quadrance = (distance)^2
    spread = ( sin (angle))^2

    although the actual definitions used in this text are independent of distance, angle and the trigonometric functions. They are ultimately very simple, based on finite arithmetic and algebra as taught in schools.

    no more cosθ and sinθ ? One thing’s for sure…he will be strictly judged by millions of mathematicians for every word he’s written…math people are crazy people and they don’t like others playing smart on them…

    good luck to Dr Wildberger…

    crude script for sfv checking

    Most of the times, when I download something and there’s an sfv file available I check the files against the sfv. That saves me from a lot of trouble later on…
    What I wanted though, was to have the sfv check program create a dir inside each folder it checks that would include the details from the sfv scanning. That way you can instantly know whether what you have downloaded 1 week ago is ok, or there are bad files inside, or missing files. I sometimes used to check what I downloaded against the sfv file but I forgot to move it to my “complete” folder. So I made a VERY crude script that does exactly what I want. It uses pure-sfv (which I think is a bit faster than all the others I’ve tested) and then parses the output to create a dir that looks like this:

    [ 49 OK, 0 BAD, 0 MISSING, OUT OF 49 ]

    Here’s the script…
    #!/bin/bash

    THEOLDDIR=`ls -1 | grep "MISSING, OUT OF"` ; rm -rf "$THEOLDDIR"
    ACTION=`pure-sfv *.sfv | egrep "different CRC|Tested|No such file" > check.tst`
    THEBADONES=`grep different check.tst`
    THEMISSONES=`grep "No such file" check.tst`
    LINECOUNT=`wc -l check.tst | cut -d" " -f 1`
    OKFILES=`tail -n1 check.tst | cut -d" " -f5 | cut -d"," -f1 `
    BADFILES=`tail -n1 check.tst | cut -d" " -f7 | cut -d"," -f1 `
    MISSFILES=`tail -n1 check.tst | cut -d" " -f9`
    while read line ;do
    BADIS=`echo $line | cut -d" " -f 1`
    if [ $BADIS != "Tested" ]; then
    if [ -e $BADIS ]; then
    mv $BADIS $BADIS.bad
    else
    touch $BADIS.missing
    fi
    fi
    done < check.tst
    echo "$THEBADONES"
    echo "$THEMISSONES"
    echo "$OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES]"
    mkdir -p "[ $OKFILES OK, $BADFILES BAD, $MISSFILES MISSING, OUT OF $[$OKFILES+$BADFILES+$MISSFILES] ]" ; rm -f check.tst

    USE IT AT YOUR OWN RISK!!! IT MAY DELETE ALL YOUR FILES. IT WON’T BE MY FAULT!

    and yes I know the code sucks. If you don’t like it don’t use it.

    HOWTO mount iso images with rox

    1) create the file mountiso.sh:

    #!/bin/bash
    STR="/tmp/iso_image_link"
    echo "Mounting $1"
    ln -sf "$1" $STR
    mount /mnt/image

    then chmod +x mountiso.sh and put it in your /usr/bin/ directory

    2) edit your /etc/fstab file and add an entry that looks like this:

    /tmp/iso_image_link /mnt/image iso9660 ro,noauto,user,loop 0 0

    3) open up rox and find a .iso file. Right click on it and go to File/Set Run Action. Then type there:
    mountiso.sh "$@"

    Now when you click on an iso file inside rox that will call mountiso.sh which creates a symlink from the file you want to mount to /tmp/iso_image_link. This way the “name” of the iso is always the same (/tmp/iso_image_link). The entry on the fstab file sets a static mount point for the iso images.

    This way you can mount dynamically named iso images through the /tmp/iso_image_link symlink.

    Enjoy.

    Batch resizing of images in linux with ImageMagick

    Overwriting the current pictures:
    mogrify -quality 85 -geometry '2048x1536>' *.jpg

    Creating new pictures:
    for i in *.jpg; do convert $i -quality 85 -geometry '1024x768' small_$i; done

    Really usefull when you have to convert many pictures at once.

    Microsoft Intellimouse Explorer 2 side keys with gentoo

    First of all read this great HOWTO: HOWTO_Mouse_Nav_Buttons. I am using Fluxbox and gdm so the point where it says about sticking “imwheel -f -k -p -b “67”” in my .xinitrc does not work. What I did was add “imwheel -k -b67” to my .fluxbox/startup. Using a .imwheelrc file that’s inside that HOWTO I am now able to go back and forward pages in Firefox using the side buttons.
    I will start checking out .imwheelrc to see if I can come up with any good general shortcuts using the side buttons.

    First Post with Opera

    Hello all, this is my first post with the Opera Browser. It’s the first time I install it and I only did it because yesterday Opera celebrated it’s 10th Birthday and gave away registration keys for free. I would never install a browser that’s adware, and now that I had the chance to legally have the full browser in my hands…I thought I should give it a shot.
    My first impressions are quite good. It’s certainly faster than firefox, eats less memory, it’s quite stable with plugins like acrobat and mplayerplug-in…and it has a nice interface. I can also visit some webinterfaces of machines like cisco 340AP that firefox could not. Firefox needed to enter the login/password everytime I went to a different page in the webinterface…but Opera does not have a problem with such things. It also has built in mouse gestures, where in firefox I had to load an extension for this.
    I had around 7-8 extensions in firefox that made my life easier. The only thing that I really miss in opera is the BugMeNot extension :(. I haven’t really looked into Opera so I don’t know if it’s possible to load “extensions”…if there is a way…I am sure someone will write a BugMeNot one.
    The only problem I faced so far was at my e-banking site. It did not load the menu right…I don’t know if this is an Opera fault or mine. Maybe some javascript setting. I will look into it though.

    That’s it for now…I go back to studying…September exams are coming. Good luck to everyone.