Jesus and the Wrath of God

Good read!

Escape to Reality

blood-stained crossAre you familiar with the hymn In Christ Alone? Do you know this hymn is not hundreds of years old? It’s not even 20 years old. In Christ Alone is a very modern hymn. It was written in 2001 by Keith Getty and Stuart Townend.

I mention this hymn because it has these wonderful lyrics:

Till on that cross as Jesus died
The wrath of God was satisfied
For every sin on him was laid
Here in the death of Christ I live

“Wait a second, Paul. Are you saying God poured out his wrath on Jesus? That sounds twisted.”

I agree that there is something dreadfully wrong with the picture of a father killing his son to satisfy some legal need for blood. It falsely portrays God as guilty of filicide, the murder of his own child.

I know some people have been turned off from the gospel…

View original post 828 more words


South African Radio Stations via Rhythmbox

Since I run an Ubuntu desktop environment, I get to do with all the idiosyncrasies of service providers that imagine a “Windows only” world…  <sigh>

Here’s what to use to get radio via Rhythmbox or other music players:

  • Cape Talk 567 MW – rtsp://
  • RSG – rtsp://

If you have more streams (that you have tested!), please comment below and I’ll add them here.

LTSP notes

These are my personal notes wrt LTSP installations, tips and tricks that I have needed in various setups.  Instead of just storing these in my own notebook, I share them here for the benefit of anyone that may benefit from them.  Feel free to leave comments, corrections or suggestions.

Ubuntu 12.04 64bit Server with LTSP

i386 Clients that don’t support required ‘cmov’

Norhtec Surfboards with XCore86 processors:

  1. The last version of Ubuntu that has the ‘cmov’ instruction built into the kernel is 10.04.  I suppose it is possible to compile a custom kernel with ‘cmov’ support, but I think Ubuntu has removed code from their source, so one would need quite a bit of customisation to overcome this.  Not for me, I’ve wasted too much time on things I don’t really know enough about.
  2. Debian continues supporting ‘cmov’ up to the latest build.
  3. Debian LTSP implements NFS to connect from the chroot booted system to the server, Ubuntu uses NBD.
  4. With Ubuntu 10.04 Lucid, the NBD server listened on a port, typically 2000, 2001, 2002, etc.  Since 12.04 Precise (or maybe even the release before that?), the chroot booted clients connects with a named pipe instead of a port.
  5. To allow a 10.04 chroot client to connect to the 12.04 server, do the following
      1. $ sudo ltsp-chroot -a i386
        $ vim /etc/ltsp/update-kernels.conf

        Change the content to:
        BOOTPROMPT_OPTS=”append ro initrd=initrd.img quiet splash nbdport=2002″

        Now run:

        $ /usr/share/ltsp/update-kernels
        $ exit

        $ sudo ltsp-update-kernels

        Now the file /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default should reflect the changed connection method using a port.

      2. Change the nbd-server config as follows:
        $ sudo vim /etc/nbd-server/config
        user = nbd
        group = nbd
        includedir = /etc/nbd-server/conf.d
        oldstyle = true

        $ sudo vim /etc/nbd-server/conf.d/ltsp_i386.conf
        exportname = /opt/ltsp/images/i386.img
        readonly = true

        $ sudo vim /etc/nbd-server/conf.d/swap.conf
        port = 2002
        exportname = /tmp/nbd-swap/%s
        prerun = nbdswapd %s
        postrun = rm -f %

      3. A different way (which I only found out yesterday by going through the script), is:
        $ sudo ltsp-update-image -a i386 -o “quiet splash nbdport=2002”


Extra notes:

There is a file /etc/ltsp/ltsp-update-image.excludes which removes certain file from the chroot when the image is created.  Edit this to allow sshd keys, home directories and more to included in the image.

If the client doesn’t log in to the server due to ssh keys not in the ssh_known_hosts file, delete the /etc/ssh/ssh_known_hosts file in the chroot, run ltsp-update-sshkeys and then ltsp-update-image.

If the screen resolution notification pops up after logon, delete the users ~/.config/monitors.xml file.

To enable sshd on the thin client:
In /etc/ltsp/ltsp-update-image.excludes comment out:
# etc/ssh/ssh_host_*_key

In /var/lib/tftpboot/ltsp/i386/lts.conf add:

Printers connected to the thin client?
check the device the printer is on: ls -la /dev/usb/lp1 for example  (on wheezy)
then set lts.conf to:
PRINTER_0_DEVICE = /dev/usb/lp1
for the application MAC address

Lexmark Support fail!

Here is the exchange I had with Lexmark support regarding the Lexmark Prospect 205 printer/scanner/fax/copier.
I have highlighted some text in orange to make it clearer and clipped some standard template text for the sake of brevity, but otherwise I changed nothing.  Just did a cut and paste from gmail.
Lexmark have now removed the drivers in question…  but haven’t said a word about it.

Dear Roland,

Here is your Service Request # 1-11261004232

Thank you for the information and it’s clearer this time. Going back to your concern, I tried checking it from our website again and found out that this printer doesn’t have an Ubuntu drivers so this means that it is not compatible with it. I sincerely appreciate your patience.

If you have any more questions or concerns, please contact me at your convenience and I will be happy to assist you. (If I am not available, another representative may reply to your request.)

<clipped template info>


Lexmark eSupport Team
[THREAD ID:1-568IEH4]Please rate your e-mail support experience. Your feedback is extremely valuable to us. Please click the link below to participate in a brief Lexmark Customer Satisfaction Survey.
**********Original Message**********
I can understand why we have missed each other.  In the original thread I
referred to a “Lexmark Prospect 205 Scanner/Fax/Printer” which is what I
have.  That model definitely has a driver on your website and it works as I
said before. Does that make it clearer?
On Thu, Feb 14, 2013 at 9:18 AM, Lexmark Support <>wrote:>
Dear Roland,
> Here is your Service Request # 1-11261004232
> We have here the P250 printer as your printer and we don’t have drivers
> for Ubuntu with this type. May I know if you really have a P250 printer?
> If you have any more questions or concerns, please contact me at your
> convenience and I will be happy to assist you. (If I am not available,
> another representative may reply to your request.)<clipped template info>> Sincerely,
> Giovanni
> Lexmark eSupport Team
Eh, am I missing something here?  I think you should read my original mail
before firing off a canned response!Here is what I asked:I have installed the latest printer & scanner drivers for Ubuntu (32 bit)
from your support site on two machines.  On the one (running Ubuntu 11.10)
everything works 100%, printing & scanning over the network.  On the other
machine running Ubuntu 12.10 however I can print, but scanning produces the
error “Failed to open device ‘lexmarklegacy_1_0_0:libnet/00200075694B’:
Error during devce I/O.I have also engaged some non-lexmark forum on this matter and the full
thread is available here:<>
I posted as “lifeboy” and have provided this link so I don’t have to repeat
the volume of information I have provided there regarding my setup.To which you responded (totally unrelated and seeming not having read what I wrote!)
Here is your Service Request # 1-11261004232
> Thank you for contacting Lexmark. With regards to your concern, I regret
> to inform you that this printer is not compatible with Ubuntu and that you
> can’t find any drivers available from our website. I sincerely appreciate
> your patience.
>1. I *did download* the drivers from your website and you *do* support *
Ubuntu* and *Debian*.  And the printer works as well as the scanner from
one of my machines!!
2. I explicitly asked for technical help.  In the thread I referred to I
have posted extensive technical information that you should pass on the
your driver development team. The drivers where update recently with never
version, so don’t try to tell me you don’t support Ubuntu.
3. It seems that I should rather buy a printer from HP, Brother, Canon or
Epson, right?
4. Does you employer know that you’re not doing your job, by brushing off a
technical support request?I am appalled by this response. Can you please escalate this request to
your manager?thank youRoland Giesler, CEOOn Wed, Feb 13, 2013 at 10:13 AM, Lexmark Support
> wrote:> Dear Roland,
> Here is your Service Request # 1-11261004232
> Thank you for contacting Lexmark. With regards to your concern, I regret
> to inform you that this printer is not compatible with Ubuntu and that you
> can’t find any drivers available from our website. I sincerely appreciate
> your patience.> If you have any more questions or concerns, please contact me at your
> convenience and I will be happy to assist you. (If I am not available,
> another representative may reply to your request.)
<clipped template info>
**********Original Message**********
Roland Giesler <roland@***********t> Feb 15
to Lexmark
Again I don’t understand?  When I go to the Lexmark support site and select the Prospect Pro205 printer, I get the driver plain and simple:
Here is the site URL:
Select on the Downloads tab: “Unix /Linux” and then “Ubuntu 12.04”, I get the complete list of drivers.

Canonical: Killing Maverick Meerkat and plugging its burrows? (Solution available)

I really didn’t think that I would ever have to write this kind of post

Since the end of support for Ubuntu Maverick 10.10 in April 2012, the repos are suddenly (since when?) removed as well.  This is a very serious problem since we have a number of 10.10 environments which are extremely stable and in production, with only very occasional modifications needed.  However, it is not possible to add even a simple application like vim to any of these installations by using the repositories and standard Ubuntu provided tools, since the complete repositories seem to have been removed!

Now, I realise and support the fact that Canonical cannot continue to support releases indefinitely and that’s perfectly in order.  But, hey, even Microsoft of all companies have many of the patches and updates available that were previously released even for very old products.  Ubuntu is an open source system, we use it exclusively at clients and inhouse, but in this instance you are seriously letting us down. Why can the repos not simply stay online?  I’m not asking for new updates, but simply that what was there before stays there.  There is a community as well, you know, and by what reasoning do things simply get removed?

Consider this.  Our client wants to upgrade their systems to 12.04 and have budgeted for this in the next 6-12 months.  Neither they, nor we, currently have manpower resources available to upgrade their LTSP servers and applications and to ensure that it all works.  You know that it’s not as simple as clicking the upgrade button, so why are we being put in this position?  The forced upgrade cycle is one of the main reasons why we moved away from Windows, apart from the security issues inherent in that platform, yet now Canonical is putting us in the same position.

Here is a quote from Kate Stewart’s announcement to the Ubuntu Security Announcement List:

Since its launch in October 2004 Ubuntu has become one of the most
highly regarded Linux distributions with millions of users in homes,
schools, businesses and governments around the world. Ubuntu is Open
Source software, costs nothing to download, and users are free to
customize or alter their software in order to meet their needs.

Canonical, please but the repos back online where they belong.

Update: (Please see Kate Stewart’s comment as well)

The old repos are held at All one need to do to keep Maverick (or any of the other discontinued releases) alive, is the change the repositories.  It would be great if Ubuntu could add the “old” repository to the sources in the Update Manager.  For now one has to edit the /etc/apt/sources.list to reflect the repository.

Here are the ones I changed:

deb maverick main restricted
deb maverick-updates main restricted
deb maverick universe
deb maverick-updates universe
deb maverick multiverse
deb maverick-updates multiverse
deb maverick-backports main restricted universe multiverse

## Partner release are not in the old repositories.
### deb maverick partner

deb maverick-security main restricted
deb maverick-security universe
deb maverick-security multiverse

Once the changes have been made, do a sudo apt-get update and inspect the output for any repositories that are not found and correct the corresponding line accordingly.

MySQL: How to export data to csv with column headers

I recently had to export a whole number of tables from a MySQL database into .csv files, but to my surprise (or should I say disgust), exporting to .csv with headers is not possible by simply using to the “SELECT … INTO OUTFILE” syntax.  Fortunately all is not lost, although to me this is more proof that MySQL is not really suitable for large applications. Here is how I solved the problem.

I created a table (`tables_to_export`) with a single `tablename` column which I populated with the names of the tables that I wanted to export.  I then created a procedure to traverse this table by means of a cursor so I could build the sql statements required to get the desired export result.

Basically the trick is to create a text string of comma separated column names that is used to create a select union statement to combine the column names with the data.  There are quite a few examples of doing this with a single table and known column names, but I wanted to do this for a whole lot of tables in a loop.  I also need to repeat this export in future, so it made sense to automate the process.

Note: The ‘information_scheme’ database contains a ‘columns’ table that has all the column names, so I used that to get the names to create the string.  The

CREATE DEFINER=`root`@`localhost` PROCEDURE `export_important_tables` _
     (IN `quote` TINYTEXT, IN `delimiter` TINYTEXT, IN `export_dir` VARCHAR(200))
 COMMENT 'Export in csv format with headers'
/* This procedure has been created to add the column names as a header column 
   when exporting mysql tables.
   A table, 'tables_to_export', contains the list of tables to be exported

Usage example: CALL export_important_tables('"',',','/tmp/');

-- Declare some variables
   DECLARE myFile CHAR(30);
   DECLARE curs CURSOR FOR SELECT * FROM `foodmedb`.`tables_to_export`;
-- Declare a cursor
-- There don't need to be set (@variables don't exist outside the procedure, 
-- but I set them for easy reference anyway
   SET @myResult = '';
   SET @myHeader = '';
   SET @myCommand = '';
   SET @myCombined = '';

-- Do some very simple checking for valid parameters
   IF LENGTH(`quote`) > 1 THEN 
       SELECT 'Parameter Error:  may not be more than 1 character';
       LEAVE cont;
   ELSEIF `quote` = '' THEN SET `quote` = '"';
   END IF;

   IF LENGTH(`delimiter`) > 1 THEN 
       SELECT 'Parameter Error:  may not be more than 1 character';
       LEAVE cont;
   ELSEIF `delimiter` = '' THEN SET `delimiter` = ',';
   END IF;

   IF RIGHT(`export_dir`,1) != '/' THEN 
       SELECT 'Paramater Error:  has to end in a /';
       LEAVE cont;
   ELSEIF LENGTH(`export_dir`) = 0 THEN SET `export_dir` = '/tmp';
   END IF;

-- Initialise the cursor query
OPEN curs;

-- Set up a loop so we can traverse all the row in the cursor table
table_loop: LOOP

-- Get a filename
   FETCH curs INTO myFile;
   IF done THEN
      LEAVE table_loop;
   END IF;
-- Build a sql statement string that concatenates the column names from the 
-- information schema's 'columns' table to build a header for the csv file
   SET @myHeader = concat('SELECT GROUP_CONCAT(',char(39),`quote`,char(39),',
   COLUMN_NAME, ', char(39),`quote`,char(39), ' SEPARATOR ', char(39),`delimiter`,
   char(39),') FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE table_schema=',char(39),
   'foodmedb',char(39),' and table_name=',char(39),myFile,char(39),
   ' INTO @myResult');
   PREPARE stmt1 FROM @myHeader;
   EXECUTE stmt1;
-- Build the the sql statement string that will dump the data into the csv file
   SET @myCommand = concat('SELECT * FROM foodmedb.', myFile, ' into OUTFILE ', 
   char(39), `export_dir`, myFile, '-', DATE_FORMAT(now(),'%Y%m%d-%H%i%s'), '.csv',
   char(39), ' FIELDS TERMINATED BY ', char(39), `delimiter`, char(39), 
   ' OPTIONALLY ENCLOSED BY ', char(39), `quote`, char(39), ' LINES TERMINATED BY ',
-- Use Union to combine the two parts
   SET @myCombined = concat('SELECT ', @myResult,' UNION ALL ',@myCommand);
   PREPARE stmt2 FROM @myCombined;
-- Sweet, now the files are being written!
   EXECUTE stmt2;


CLOSE curs;


This stored procedure should function as it is above.  I have created parameters and some simple error checking to assist with using it more generally than just my particular use.

Please make suggestions and improvements and post them in a comment if you’d like.