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.https://surveys.lexmark.com/survey/s?s=9972
**********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 <support3@lexmark.com>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.

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.

Ubuntu Lexmark Prospect Pro205 series printing

(OS: Ubuntu 11.04, 11.10, 12.04, 12.10)

History: Ubuntu 10.04

After downloading and installing the driver for my new Lexmark Prospect Pro 205 printer/fax/scanner/copier from Lexmark’s support pages, by unpacking it and doing

sudo ./lexmark-inkjet-09-driver-1.0-1.i386_ts.deb.sh

it tested fine by printing a test page.  However, printing from an application like LibreOffice Write, or any other application for that matter, just resulted in an error and not printout.

The problem may be seen without going to the command line by simply right-clicking the stopped printqueue item and viewing the detail.  The status from the printer is: “/usr/lexinkjet/lxk09/bin/printdriver failed”  (or some other file like in that bin directory)

The log at /var/log/cups/error_log shows:

 D [11/May/2011:14:50:51 +0200] [Job 32] envp[22]="DEVICE_URI=lxusb://Lexmark/Pro200-S500%20Series"
 D [11/May/2011:14:50:51 +0200] [Job 32] envp[23]="PRINTER_INFO=Lexmark Pro205 via USB"
 D [11/May/2011:14:50:51 +0200] [Job 32] envp[24]="PRINTER_LOCATION="
 D [11/May/2011:14:50:51 +0200] [Job 32] envp[25]="PRINTER=Lexmark_Pro205_USB"
 D [11/May/2011:14:50:51 +0200] [Job 32] envp[26]="CUPS_FILETYPE=document"
 D [11/May/2011:14:50:51 +0200] [Job 32] envp[27]="FINAL_CONTENT_TYPE=printer/Lexmark_Pro205_USB"
 D [11/May/2011:14:50:51 +0200] [Job 32] Started filter /usr/lib/cups/filter/pdftopdf (PID 15284)
 D [11/May/2011:14:50:51 +0200] [Job 32] Started filter /usr/lib/cups/filter/pdftoraster (PID 15285)
 D [11/May/2011:14:50:51 +0200] [Job 32] Started filter /usr/lexinkjet/lxk09/bin/printdriver (PID 15286)
 D [11/May/2011:14:50:51 +0200] [Job 32] Started backend /usr/lib/cups/backend/lxusb (PID 15287)
 D [11/May/2011:14:50:51 +0200] [Job 32] /usr/lexinkjet/lxk09/bin/printdriver: Permission denied
 D [11/May/2011:14:50:51 +0200] [Job 32] STATE: +connecting-to-device
 D [11/May/2011:14:50:51 +0200] [Job 32] Printer using device file "/dev/usblp0"...
 D [11/May/2011:14:50:51 +0200] [Job 32] STATE: -connecting-to-device
 D [11/May/2011:14:50:51 +0200] [Job 32] backendRunLoop(print_fd=0, device_fd=5, use_bc=1)
 D [11/May/2011:14:50:51 +0200] [Job 32] Ghostscript command line: /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -I/usr/share/cups/fonts -sOutputType=1 -r300x300 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=841 -dcupsMediaType=1 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -dcupsCompression=8 -dcupsRowFeed=1 -dcupsRowStep=1 -scupsPageSizeName=A4 -c -f -_
 (I highlighted the pertinent line above)

However, I found this line in /var/log/messages:

May 12 08:56:24 gts-server kernel: [214361.584639] type=1400 audit(1305183384.387:59): apparmor="DENIED" operation="exec" parent=15270 profile="/usr/sbin/cupsd" name="/usr/local/lexmark/lxk09/bin/printdriver" pid=28978 comm="cupsd" requested_mask="x" denied_mask="x" fsuid=7 ouid=0

This indicated that something call apparmor denies access to the printdriver file.

Reading up on this, I found that apparmor has a profile that protects CUPS by default in Ubuntu.  All one has to do to make printing work, is to tell apparmor where the Lexmark driver is and allow it to run.

This is what I changed in /etc/apparmor.d/usr.sbin.cupsd

  # backends which come with CUPS can be confined
  /usr/lib/cups/backend/bluetooth ixr,
  /usr/lib/cups/backend/dnssd ixr,
  /usr/lib/cups/backend/http ixr,
  /usr/lib/cups/backend/ipp ixr,
  /usr/lib/cups/backend/lpd ixr,
  /usr/lib/cups/backend/parallel ixr,
  /usr/lib/cups/backend/scsi ixr,
  /usr/lib/cups/backend/serial ixr,
  /usr/lib/cups/backend/snmp ixr,
  /usr/lib/cups/backend/socket ixr,
  /usr/lib/cups/backend/usb ixr,
 /usr/lib/cups/backend/lxnet ixr,
  # we treat cups-pdf specially, since it needs to write into /home
  # and thus needs extra paranoia
  /usr/lib/cups/backend/cups-pdf Px,
  # third party backends get no restrictions as they often need high
  # privileges and this is beyond our control
  /usr/lib/cups/backend/* Ux,

  /usr/lib/cups/cgi-bin/* ixr,
  /usr/lib/cups/daemon/* ixr,
  /usr/lib/cups/monitor/* ixr,
  /usr/lib/cups/notifier/* ixr,
  # filters and drivers (PPD generators) are always run as non-root,
  # and there are a lot of third-party drivers which we cannot predict

 # Lexmark Pro205 driver  /usr/local/lexmark/lxk09/* rix,  /usr/local/lexmark/lxk09/lib/* rix,  /usr/local/lexmark/lxk09/bin/* rix,  /usr/lexinkjet/lxk09/* rix,

(Again, I have marked the additions in red)

After restarting apparmor (sudo /etc/init.d/apparmor restart) the printer prints with both the USB and Wifi connections as it should.

The scanner also work 100% with the simplescan sane frontend, but only via the USB cable, not via wifi.

Faxing from the computer I haven’t addressed yet, since the print driver doesn’t expose the fax function.

Tom Bamford added this comment on the glug-tech(at)linux(dot)org(dot)za list:

AppArmor often gives me hassle when I’m working with files in arbitrary locations.

You can edit /etc/apparmor.d/usr.sbin.cupsd and add the path to the printdriver binary (/usr/local/lexmark/lxk09/bin/printdriver) under the existing entries for /usr/sbin/* etc. Or (less ideally) just put the cupsd profile into complain mode.

Trouble with the legacy-1.0-1 driver

When attempting to install the lexmark-inkjet-legacy-1.0-1.i386.deb.sh driver from Lexmark and lua error occurs.  Lexmark support has send me this advice.

  1. Please delete the tmp folder that was created after extracting the shell script.
  2. Extract the shell file (the extracted file)
    sudo sh –keep –noexec . This will create the tmp folder
  3. Edit run.lua found in /tmp/config/run.lua. Change ownhership to ownership.
  4. Go back to terminal and type cd ..
  5. Then type sudo sh startupinstaller.sh

It seems that this problem was reported here more than a year ago, but the driver has not been updated by Lexmark since.  Please message them and ask them to fix the simple mistake now!

Ubuntu 11.10

Installing these three drivers allows printing and scanning via USB of WIFI from Ubuntu.  Very nice!


Unfortunately I noticed today (18 Mar 2013) that Lexmark have removed these from their support site!

Ubuntu 12.04 & 12.10

These drivers (above) did allow printing with Ubuntu , but not network scanning with Ubuntu 12.04 & 12.10.

It now seems that there is only support for Fedora 10 and OpenSuse 11.0 / 11.1 from Lexmark.

Are they working of fixing the bugs for Debian based distros?  No-one knows, since they’re denying everything (head in the sand, hoping it will go away?)

Their helpdesk had this to say!

I have downloaded the Fedora driver and with see if I can hack to work on Ubuntu 12.04 / 12.10 and report back if I succeed.

Set the default font size and type for XMind

I have noticed that on all the machines that I have used XMind, the default font appears to be a poor choice. Today I got fed-up and decided to do something about it.  Most (if not all) of these machines are running Ubuntu.

I found the file defaultStyles.xml by simply issuing the command

locate defaultStyles.xml

On my home computer running Ubuntu 10.04 Lucid Lynx, it’s at /usr/local/xmind/plugins/org.xmind.ui.resources_3.0.3.200904291819/styles/defaultStyles.xml. Use your favourite editor (I use vim, but gedit would work just as well) to edit the file.  Since this is in a location outside of your home directory, you need to use sudo to edit the file, ie.

sudo vim /usr/local/xmind/plugins...defaultStyles.xml

Firstly: The default font is each element specified is


This led me to check the system font under System | Preferences | Appearance | Fonts. Lo and behold, the default application font-family is “Sans” and the default size “10”.
However, selecting the fonts dialog in Xmind only gives the option of size “12” or “14”, not “13”. But the default is set to “13”, which results in the last 1 or 2 characters begin cut of in the topic | subtopic box. Of course one can change the system font to some other font family (like Arial if you have the MS Fonts installed and you will be sending your mindmaps to windows users as well), but I
suspect using a TrueType font as system font may slow down your system or have other side-effect which I don’t care to explore at this stage.

So secondly, I changed the default font size in the defaultStyles.xml file from 13 to 12 where applicable and this took care of the cut of characters problem.

I may go back to this file to change the font-family from system to something else, but for now I’m happy knowing where I can go to change this if need be.

Additional tips and comments welcome.

Here are the links to download O2KSR1aDL.exe , WinXP-SP1a and WinXP-SP3

After searching the web for a few days and following hundreds of rabbit trails (mostly due to Google’s insistence on indexing those most annoying fake content pages that pretend to have whatever content one is looking for but actually don’t), I finally found a link to a site that actually still has the file and saved it here for others’ benefit as well.

(This is the English Language version – updated since the initial post)
And to make things easier while we’re at it, here are the links to WinXP SP1a and SP3 (the full download) as well

(I suppose I should find the other MS Office service packs and add them here as, since Microsoft will probably pull the same stunt with them in future)

For those that are new to this issue, here is a quick synopsis:

In order to re-install Office 2000 and subsequent service packs, MS Office SP1a is needed.  There is an installer on Microsoft’s download site, but it in turn attempts to download a file which Microsoft says has been automatically deleted due to some policy rule.  (Anyone ever heard of a policy change and putting the file back??).  The bottom line is that without installing SP1a, you cannot install the other service packs.

Microsoft officially doesn’t support Office 2000 any more, but there are legacy apps that have been created to run in Access 2000 for example, that just chug along somewhere with no-one having any desire or need to upgrade and “fix” them (and pay the accompanying new Office fee which can amount to as much as R4000 per copy of Office).  So, since this is Windows, a re-installation is often the only way to fix some issue, especially when a system has become really slow over time. So now you can re-install Office 2000, apply SP1a, then the subsequent ones and get on with your life.

Please note: I don’t run MS Office and haven’t for a very long time, but I had this problem with an application on a customer site, which prompted me to create this post. I use LibreOffice for new systems (running on Ubuntu), which offers significant advantages and features that MS Office doesn’t have and is significantly simpler to use than MS Office as well.