Thursday, October 9, 2008

pmount switching to git

I've been neglecting pmount for such a long time I feel ashamed about it. Thanks to tailor and a neat post, I've just switched it to a git repository at git://git.debian.org/git/pmount/pmount.git to get more work done (I don't like bzr too much in the end, don't flame me, it's just a matter of personal taste...). I hope that I'll be able to reduce the amazing number of bugs that have accumulated there...

Thursday, September 18, 2008

pdfcrop vs pdfnup --trim

I make heavy use of pdfcrop (the version by Heiko Oberdiek included in texlive) for printing, as it allows to remove all the white spaces around the text before nupping and printing. However, with recent ghostscript, the bounding box detection is dreadfully slow, anything from one to ten seconds for a single page ! When you have a 60 pages article to print, it can be quite tedious...

Well, I've just discovered that the --trim option of pdfnup can do very similar things too. It removes a given amount of margins on the side, with the syntax 'left bottom right top'. Most of the time, a well-thought pdfnup --trim ... will work as well as pdfcrop while in the meantime being much faster...

Tuesday, August 19, 2008

What ctioga is missing

I haven't posted for a long while about ctioga, but that does not mean that development has stopped. It goes on, and features get added basically every single time I need them. Recent additions make it possible to tune a little more the look of the legends and add pure text lines in them.

I've however realized that now, what ctioga is missing the most is real flexibility over the coordinates. For now, all coordinate positions are either relative to the frame (such as for --inset) or to the graph (for --draw). What I really wish is a way to mix all kind of coordinates: real size (1cm), frame position and graph position. That will require quite a fair deal of work, of course, but that shouldn't be too difficult... I'll go on posting about it here.

Friday, August 1, 2008

CivCTP does not work with 2.6.25 kernels

Well, yes, I'm still playing old games like Civilization Call to Power, because I like... And I've recently had troubles getting it to play on a Debian/sid machine with a 2.6.25 kernel. I seemed to remember it was working fine before that, so I insisted, to the point that I switched back to a 2.6.18 kernel... And that worked ! I don't know what did change, but that is a weird bug indeed...

Friday, May 9, 2008

My lastest fight with udev...

Important note: This post has been modified according to a private remark from Marco d'Itri, thanks to him for his explanations !

I've been trying for a very long while to learn to write udev rules, but I've mostly been unsuccessful, or rather, successful by chance, which is hardly better, as it implies no understanding whatsoever of what I'm doing.

My game, today, was to create a symlink for a loop device (loop7) and set the device's group to cdrom (I might elaborate some time later why I need that). So, here is what I learned:

  • at least for the GROUP= directive, the latest item in the /etc/udev/rules.d directory rules
  • to test the modifications, the best thing is to generate a synthetic add using the following snippet:
    echo add > /sys/block/loop7/uevent
    
    Many thanks to Marco d'Itri for this information !

With that in mind, the following snippet worked for me, under the name 40-private-loop.rules:

KERNEL=="loop7", SYMLINK="videoloop", GROUP="cdrom"

Enjoy !

Saturday, May 3, 2008

vegastrike finally made it to testing !!

There you go, this is a celebration day, vegastrike has finally migrated to testing ! Vegastrike basically never was in testing, excepted apparently by mistake last year... Quite a fair amount of work, I'd say !

Well, now, I'll be able to package the official 0.5 release and take care of excessive dependencies.

Thursday, May 1, 2008

PDF conversion to grayscale

I had some trouble finding out how to convert a color PDF to a grayscale one. I found a post on an Ubuntu forum giving the following recipe:

pdf2ps -sDEVICE=psgray original.odf
ps2pdf original.ps new.pdf

This works, but this has the unpleasant side effect to increase the size of the PDF and to lower the quality (for a reason which escapes me). So I looked again in the magic pdfwrite parameters, and I came up with the following solution, which works on my box (though the above page suggests it shouldn't):

gs -sOutputFile=biniou.pdf -sDEVICE=pdfwrite \
  -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray \
  -dCompatibilityLevel=1.4 Plot.pdf < /dev/null

This works fine, does not lower the quality of the produced PDF and in the case I tried even made it smaller...