January 2012
MTWTFSS
« Dec  
 1
2345678
9101112131415
16171819202122
23242526272829
3031 

Configure Canon imageRUNNER 2525i Debian

- Download CQue 2.0.2 Linux Driver DEB 32/64-bit (v2.0.2) from http://software.canon-europe.com/products/0010804.asp

- Extract deb packages to a directory.

- Open cups via mozilla/iceweasel –> http://localhost:631

- On Cups:
- Add printer
- Socket:// printer IP
- Take the pcl ppd from the extracted deb directories
- Configure the printer/Adjust printer settings

- Open a terminal, become root and install g11a2eng.deb
- #dpkg -i g11a2eng.deb, maybe you have to install libxp6.

- Be careful with your iptables configuration.

Using strace to solve apparently installed font problems with gnuplot

The issue

During the execution of a gnuplot script, some special mathematical symbols could be correctly displayed on the X11 terminal. However, these mathematical symbols were not displayed whenever generating the same output as a png graphic file. An error concerning fonts was issued:

./prova.gnuplot_script_png > a.png
Could not find/open font when opening font LiberationSans, trying default
gdImageStringFT: Could not find/open font while printing string a with font Symbol
gdImageStringFT: Could not find/open font while printing string a with font Symbol

As shown in the next figures, the left one is the X11 terminal-output (let’s focus on the mathematical symbols on the bottom-half), and the right one shows the same script but this time it was the output png graphic file, clearly without any mathematical symbols on it:

Gnuplot and some irritating font path issue

Running gnuplot through strace

As it happens, the only way to be sure what’s going on when something goes wrong with a piece of software is to determine what’s happening behind the scenes. One feasible thing to do is to run gnuplot through strace, to have a look, firstly, at what kind of fonts it is trying to open and why it cannot accomplish something of that sort. According to the error messages, it was not gnuplot, but libgd (that is, a library) the one complaining about the font. Moreover, the error message seemed to be related not to the fact the font wasn’t there, but the font was not suitable to print some special strings:

gdImageStringFT: Could not find/open font while printing string a with font Symbol

A first running using strace, showed:

(…)

access(“/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf”, R_OK) = 0
open(“/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf”, O_RDONLY) = 4
(…)

So, gnuplot did open the font “LiberationSans”. This was the choosen font according to the script:

18 set terminal wxt enhanced font “LiberationSans,18″

Next step would be to check the Symbol font out:

(…)

access(“/usr/lib/X11/fonts/Type1/Symbol.dfont”, R_OK) = -1 ENOENT (No such file or directory)
access(“/usr/openwin/lib/X11/fonts/Type1/Symbol.ttf”, R_OK) = -1 ENOENT (No such file or directory)
(…)

So, according to the strace output, the Symbol font was not opened at all. That was the main problem, not the character encoding, as the error messages could suggest, but a trivial and mere font path problem issued by  libgd.

Fixing it

Libgd does have a session variable to manipulate and set up its font paths. Then:

export GDFONTPATH=/usr/share/fonts/X11/Type1:/usr/share/fonts/truetype/ttf-liberation/

Running the script again did not show any sort of error messages, and the png output file generated showed exactly the same mathematical symbols as in the X11 output.

My book has just come out :-)

It’s done! I got published, finally ! ;-)

My book is available on Amazon’s website:

http://www.amazon.co.uk/Mum-comes-home-twice-week/dp/3845445041/ref=sr_1_1?ie=UTF8&qid=1319777235&sr=8-1

So, my publisher has indeed taken its part on our previous deal. It is really amazing, bear in mind this is an amateur piece of work, but printed out and with covers! A paperback edition, a bit expensive (10 pounds for just less than sixty pages), but well, all things considered, I guess it is quite common: this is not going to be a best seller!

My publisher sent me a free-of-charge copy of the book, as agreed. So I have my own book on my hands, my first ISBN! Unluckily, it appeared there are some small typos within the text. That’s probably because either I missed them when I made my corrections, or they did, which is, I have to say, quite awful: we’re talking about a publisher here, for God’s sake! But, okay, let’s put it this way: as I told you already on a previous post, this sort of publisher is not like, well, you know …

So, now what?

I’m writing, I always am. Now, my next short story is called “The Back Alley”. I guess I’ll have to improve even further, not only my English skills, but my story-telling techniques as well. I want to thank all my friends, family and relatives for reading my short stories, sending me some feedback I could work with, and for, of course! buying my book on Amazon. It’s amazing what’s going on. Particularly, I wanna thank Esther, Pilar, Mercè, Isa, Ramón, Jordi, (the other Jordi ;-) ), Ida, Kees, Jos,  The Hole In The Wall staff in Stamford, UK, and a few more names. If I write about sad things it’s because I can discharge myself from all the sadness and put it on paper, thus living content and happy every single day in my life.

Hugs & Kisses

t.