Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-maximum-upload-file-size domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the math-captcha domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114
Daniel Mettler – Page 48 – A changelog by Daniel Mettler

an exec shield for o2

i’ve just applied ingo molnar’s exec shield patch to a current vanilla kernel rc:

The exec-shield feature provides protection against stack, buffer or
function pointer overflows, and against other types of exploits that rely
on overwriting data structures and/or putting code into those structures.
The patch also makes it harder to pass in and execute the so-called
‘shell-code’ of exploits. The patch works transparently, ie. no
application recompilation is necessary.

works fine. i haven’t noticed any significant performance decrease so far.

downtime of o2

heh.. today at 08:32 cet lovely o2 crashed due to overheating. I nearly burnt my hands when taking it out of its “glasshouse”. nothing serious though.

today is a hot day indeed ;)

Currently evaluating b2++ and WordPress

I’ve just installed WordPress and b2++. WordPress works, but with a few errors still. B2++ looks (code-wise) much more advanced, but so far it does not render its index page ;) Here are some screenshots:

wordpress_01.png
wordpress_02.png
b2++.png

Although I really would have liked to test the new Smarty templating engine of b2++ I have to postpone it till later. WordPress’ features are nice, but not overwhelmingly nice. It offers a better editor than MT and it doesn’t require site rebuilding upon changes.

I guess I will evaluate bloxsom soon. Until then, I won’t migrate anything.

‘gotmail’ slightly updated

btw. i’ve slightly updated the ‘gotmail’ script. now it features coloured output which makes it better suitable for console usage. if you pipe its output to a text-to-speech processor you might need to disable the color codes. the most recent version of the script can be found here:

https://news.numlock.ch/docs/gotmail

as an addendum to “Make your server play music and talk..” you should modify the crontab entry the following way to prevent cron from sending mail messages (this can be achieved by piping any stdout/stderr output to /dev/null):

e.g.
/etc/crontab:

# mettlerd: make hal read aloud my new mail every 10 minutes
*/10 * * * * mettlerd /usr/local/bin/gotmail|festival --tts >/dev/null 2>&1

[Update 20031101: minor fix to make gotmail display mailinglist digests correctly: use egrep’s “-m 1” option to prevent multiple listings of from and subject lines]

b2++ :)

rather coincidentally (*) i’ve noticed that donncha has commented on my recent question about b2, recommending b2++ instead of b2. well, b2++ certainly looks promising :) so if i will evaluate alternative blogger soft (it’s a matter of time only) i will probably evaluate at least b2++ and wordpress (the “official” successor of b2). both will be superior to mt for sure.. e.g. mt’s need for “rebuilding” the static pages after every tiny bit of site editing is pretty annoying imho.

(*) actually i’ve enabled mail-notification in mt and my smtp setup just works perfectly. nevertheless i haven’t received any notification messages so far. i suppose something must be wrong with either mt itself or my mt setup..

Fanless II

Now my graphics card (an old Geforce 2 GTS) is fanless too ;) Basically, I just removed its annoyingly noisy fan, leaving the passive cooler block only. I wonder how long it will withstand the heat :> Uhm.. actually this shouldn’t be a problem as there are similar, even higher clocked chips which are sold fanless today.. (AFAIK my Geforce is clocked at 250 MHz)

Finally, my main workstation is “silent” :)

A CD ripper/MP3 encoder for Linux

Currently I am ripping some of my CDs. The problem: It takes too much time. Fortunately there’s a very good CD ripper for Linux, unspectacularly called abcde.

With abcde, ripping your CDs and encoding the wav files to mp3 files can be reduced to the following two tasks:

1) Insert a CD into your CDROM drive
2) execute “abcde -o mp3” (on the console)

That simple. abcde rips the tracks, encodes them to mp3 format (with adequate settings like 128 kbit/s data rate) and even automatically tags the whole stuff correctly, using CDDB. I’ve already tried some commercial rippers/encoders for Windows, but “abcde” beats them all in ease of use, speed and quality of the output. Amazing..

Ripping CDs still isn’t a pleasure. But if you do it, do it right.

Make your server play music and talk..

To enable sound support on your Lex barebone (VIA Eden board), all you need to do is to compile and load the following driver:

VIA 82C686 Audio Codec (CONFIG_SOUND_VIA82CXXX)
sources: via82cxxx_audio.c
binary module: via82cxxx_audio.o

That’s it!

For playing MP3 files from the console, just

emerge mpg123

and execute

mpg123 mytrack.mp3

other variants include:

mpg123 -@ myplaylist.txt
mpg123 http://my.server.com/mp3stream

some other useful apps [TBC]:

aumix (Aumix volume/mixer control program)
bplay (No-frills command-line buffered player and recorder)
cymbaline (Smart command line Mp3 player)
cvoicecontrol (Console based speech recognition system)
darkice (IceCast live streamer delivering Ogg and mp3 streams simulatenously to multiple hosts. If you want to use your Lex as a streaming server.)
festival (Festival Text to Speech engine)
flite (Flite text to speech engine)
imp3sh (flexible playlist manipulation shell and song player/streamer)
jack-audio-connection-kit (A low-latency audio server)
mad (A high-quality MP3 decoder)
moosic (Moosic is a music player that focuses on easy playlist management)
mp32ogg (A perl script to convert MP3 files to Ogg Vorbis files)
mp3_check (MP3 consistancy checker)
mp3asm (A command line tool to clean and edit mp3 files)
mp3blaster (Command line MP3 player)
mp3c (console based mp3 ripper, with cddb support)
mp3info (An MP3 technical info viewer and ID3 1.x tag editor)
mp3splt (A command line utility to split mp3 and ogg files)
mpg321 (Free replacement for mpg123)
normalize (Audio file volume normalizer)
oggtst (A tool for calculating ogg-vorbis playing time)
ogmtools (These tools allow information about (ogminfo) or extraction from (ogmdemux) or creation of (ogmmerge) OGG media streams)
realplayer (for playing real audio/media)
saydate (A Linux shell program that talks the date and system uptime)
sidplay (C64 SID player)
soundtracker (SoundTracker is a music tracking tool for UNIX/X11 (MOD tracker))
sox (The swiss army knife of sound processing programs)
speechd (Implements /dev/speech (any text written to /dev/speech will be spoken aloud))
splay (splay is an audio player, primarily for the console)
trplayer (a console-based realplayer interface)
umix (Program for adjusting soundcard volumes)
vorbis-tools (tools for using the Ogg Vorbis sound file format)
vorbisgain (vorbisgain calculates a percieved sound level of an Ogg Vorbis file using the ReplayGain algorithm and stores it in the file header)
vsound (Sort a virtual audio loopback cable for RealAudio to wave convertions)
wavplay (A command line player/recorder for wav files)
xmp (Extended Module Player)

Average CPU load when playing MP3s is only about 5-7 %, so this clearly doesn’t hurt your servers’ normal operation. The same goes for flite and festival (two text-to-speech synthesizers)

Now you just need to write a little web app which lets you create playlists and start them on predefined dates and times :) Some ideas:

– Create your own customized raiser. There aren’t any limits regarding programmability. If you like, you can program your wake-up program years in advance ;)
– Make your server automatically create your wake-up program based on your organizer’s entries. Let it set your wake-up time based on your daily duties or let it read aloud your duties of the day!
– Use it for meditation by timing meditation music/messages
– Let your friends choose your wake-up sound via web (add an MP3 upload functionality to your app). Instead of “just” sending you e-greeting cards, they could wake you up with a happy birthday song or a personal message!
– Use your Lex as a superb answering machine. Welcome to “asynchronous telephone”..
– Couple it with your mail account. Receive e-mails with attached MP3s which are played automatically at arrival, whenever you read them or at arbitrary times.
– Let your Lex read aloud your e-mail or notify you whenever there are new important messages (use festival/mbrola or flite for speech synthesis).
– Listen to radio stations all over the world. Wake up as if you were living in Tokyo or Shanghai ;) [Limitations: Some radio stations use a proprietary Windows Media Player audio streaming format for which there aren’t any Linux decoders. Grmbl.]
– Use it as a digital sound recorder
– Use it to send voice mails
– Use speech recognition to control your server by voice-control

[TBC]

Cool, isn’t it? :)

Currently, I feed the output of the following script to a text-to-speech synthesizer (festival) every 10 minutes. Like this, I can check whether there is new important mail for me without having to switch on any of my workstations :)


#!/bin/bash

###########################################################################
# #
# gotmail #
# #
# A tiny bash-script which lists the most important headers of new mail #
# messages stored in maildir format. Suitable for feeding text-to-speech #
# synthesizers. #
# #
# Copyright (c)2003 Daniel Mettler, https://news.numlock.ch #
# #
# License: MIT License http://www.opensource.org/licenses/mit-license.php #
# #
###########################################################################

# new mail folders in maildir format (excluding the trash folder)
newmessagefolders=`find ~/.maildir/ -name new | grep -v ".Trash"`;

# welcome message ;)
echo "Hi $USER. HAL 9001 speaking. Checking your mail now.";

for folder in $newmessagefolders;
do
newmessages=`find $folder/ -type f`;
if [ -n "$newmessages" ]; then
# folder contains new messages. how many?
count=`echo $newmessages|wc -w`;
# note that bash does *not* follow the regular expression syntax
cutstart=`echo ${folder/*\.maildir\/\./}`;
echo -e "\nYou have ${count/' '/} new messages in ${cutstart/\/new/}";
echo -e "---------------------------------------------------";
for message in $newmessages;
do
echo;
# cat twice to make sure we always have the same order
#cat $message|egrep -i "^From:";
# remove brackets for text-to-speech processors
cat $message|egrep -i "^From:"|sed -e "s///";
cat $message|egrep -i "^Subject:";
done
fi
done

(Err.. formatting looks miserable in this posting as MT doesn’t seem to know the <pre> tag. Need to fix this later.)

/etc/crontab:

# mettlerd: make hal read aloud my new mail every 10 minutes
*/10 * * * * mettlerd gotmail|festival --tts

Feel free to extend and improve this idea (e.g. pull instead of push would be nice. But I would need to do some soldering to achieve this.. or wait.. actually i could “misuse” a joystick or microphone to control my server ;)

cyrus imap, openldap, sendmail, sasl on openbsd mini howto

andreas’ nice mini howto:

http://my.abstrakt.ch/blog/archives/000090.php

btw. i wonder why openbsd still sticks with the tedious “cd /usr/ports/my/app && make install clean” thingie? of course openbsd’s main focus isn’t on usability/ease of use. but gentoo’s isn’t either ;)