Search Results: "Vincent Fourmond"

10 May 2008

Vincent Fourmond: 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: With that in mind, the following snippet worked for me, under the name 40-private-loop.rules:
KERNEL=="loop7", SYMLINK="videoloop", GROUP="cdrom"
Enjoy !

3 May 2008

Vincent Fourmond: 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.

1 May 2008

Vincent Fourmond: 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...

7 April 2008

Vincent Fourmond: Please, pretty please, do not group patches by files, but by topic !

I'm currently working on putting back vegastrike into shape, bringing slightly more recent code (only three years after the last sourceful upload). And I'm fighting with patches (a good dozen), trying to see what does not apply anymore and what still does, why some patch was written in the first place... I have two requests to the community about that (and, please, do flame me if you think differently ;-)...): Great thanks to all patch writers that think about the ones that could possibly follow them !

3 April 2008

Vincent Fourmond: mk-build-deps: create a dummy package depending on a package's build-deps

When I work on a package, I often find that I want to have build-deps installed in a way that I remember why I did install them in the first place. apt-get build-dep is not a proper solution for me for two reasons: As I'm starting to work on vegastrike, who's in great need of tender care, I though time had to find a more decent solution. The answer is mk-build-deps, a small Perl script that takes a control file or a package name and uses equivs to create a dummy package depending on its build-deps. Pretty useful (for me at least). Maybe it would be worth including in the devscipts package ?

2 April 2008

Vincent Fourmond: OOXML: Microsoft did win...

Bad news for the OpenSource/FreeSoftware community (or whatever you would wish to call it): ISO has just accepted Microsoft's Office Open XML file formats (see the suble alteration compared to a well known concurrent). Great. Even worse for me, it is apparently thanks to the French organization AFNOR. Fantastic. Now, we have two XML "office open document" formats accepted by ISO. That sounds so amazingly stupid that it's hard to believe... Just for information, the OpenDocument format, (the one from OpenOffice) has been accepted by ISO hardly more than a year ago !

28 March 2008

Vincent Fourmond: Thoughts about statsvn

Some time ago, I packaged statsvn, a pretty neat SVN repository analysis tool based on statcvs. To be truthful, I was quite amazed that no one had packaged it before, as I find it quite handy. It is currently in contrib, as it depends on statcvs that depends on libjfreechart-java that currently only works with Sun's java on AMD64 machines (at least, see the bug report). A few comments about it: though it can work fine with remote repositories, it is highly recommended that you either take down the number of -threads, as many repositories out there do not like too many concurrent ssh accesses, or you rsync the whole repository to your local hard drive and work from a checkout of the local copy, as it will burn much less bandwidth and server time. Of course, statistics of this kind are not to be taken too seriously, as they can be seriously biased by commit mistakes for instance, but they give the impression that work is being done, and that is pleasant ;-)...

25 March 2008

Vincent Fourmond: Flashing a Sony DVD burner

I'm the happy owner of a Sony DRU-800A DVD burner, and I wanted to upgrade the firmware, as I had some little burning problems I hoped the upgrade would fix. Of course, Sony's website provides only Win32 flashers. They run under wine, but they don't actually do anything. Apparently, the way these win32 ioctls are implemented rely on the old hdc=scsi deprecated kernel interface. The trick is that we need a 2.4 kernel to get it working properly. So here are the steps I took:
  1. Get a bootable sarge with a 2.4 kernel, and boot it with hdc=scsi(hdc is the device name of your burner). You might need to compile the kernel yourself for it to work properly. In any case, you should see something like that in the output of dmesg
    scsi0 : SCSI host adapter emulation for IDE ATAPI devices
      Vendor: PLEXTOR   Model: DVD-ROM PX-130A   Rev: 1.02
      Type:   CD-ROM                             ANSI SCSI revision: 02
    Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
    sr0: scsi3-mmc drive: 0x/50x cd/rw xa/form2 cdda tray
    
  2. Make sure wine is installed, the sarge version worked fine for me (more recent versions compiled by hand did not).
  3. Make sure there is an appropriate /etc/fstab entry for the SCSI CDROM device. I have something like:
    /dev/sr0        /media/dvd              auto    defaults        
    
  4. Make sure there is an appropriate device symlink in /root/.wine/dosdevices. With the above fstab entry, the following would work:
    ln -s /media/dvd d:
    
  5. Run the flasher as root (giving write permissions for all SCSI devices to a normal user does not work)
  6. Reboot (to your normal system), and check you firmware version number with
    wodim -scanbus
    
This did work fine for the aforementioned DVD burner. It did not get my DVD reader to get flashed, though. But it's worth a try, and once the sarge boot is setup, you won't lose too much time. As a conclusion, rush to get a sarge boot before lenny goes out and sarge is removed from the debian mirrors !

21 March 2008

Vincent Fourmond: Emacs mode for machine-readable copyrights

I've been thinking that something that might help a wider adoption of the machine-readable copyright format is a proper emacs major mode for it. Well, at least, it does for me... So I started to write one. It is loosely based on debian-control-mode, although there is hardly any code left from it now. It only features syntax highlighting for now (including warning for licenses which were not on the wiki page at the time of the writing, or were marked as needing more discussions) but, after all, this is only my first emacs major mode... The code can either be downloaded there, or from my bzr repository, in the debian-mr-copyright-mode directory
bzr branch http://people.debian.org/~fourmond/bzr/scripts
No debian package for that for now, as anyways it really should integrate dpkg-dev when it has matured somehow. Hope this helps !

Vincent Fourmond: Improvements for the machine-readable debian/copyright emacs mode

Since the last post, I have significantly improved debian-mr-copyright-mode, that now provides an interactive function, debian-mr-copyright-scan-files that shows which files are covered by which clause of the debian/copyright file. I've also significantly improved my understanding of font lock and emacs lisp in general... As a demonstration, the attached picture represents the results of debian-mr-copyright-scan-files on the monsterz source package (Sam's original example). The output clearly shows that some files are not covered yet... You can get the emacs mode there. Its is starting to be good, but of course, many more improvements are still planned - in particular, quotes for files probably don't work yet. By the way, imenu now works. A debian package should probably come soon.

16 March 2008

Cyril Brulebois: Getting things done

emacs-goodies-el pkg-games pkg-phototools Misc. Of course, that's just an excerpt of the actual todo-list

9 March 2008

Vincent Fourmond: ctioga's non-linear axes

Much as been done on ctioga since the last release, not even two weeks ago: small bug fixes, tangents improvements, the rebirth of a --subplot option, a saner framework for plot styles... But the most significant improvement in my opinion is the possibility to make non-linear axes: you just need to provide a two-ways transformation between the standard coordinates and the axis coordinates, and ctioga does the rest:
ctioga -N --xpdf --math --math-xrange 2:8 \
  'sin(x)' --xaxis bottom --new-axis biniou top \
  --axis-function biniou 1/x 1/x \
  --lines-color biniou Gray --no-title
As you can see, I did profit to add the possibility of background lines corresponding to the axes' major ticks. The only real trick that is left is to find a decent way to partition the target segment so that they ticks are "natural" (not 0.34759, for instance) and reasonably equally spaced. I thought other plotting programs had dealt with this, but in fact, that doesn't seem to be the case: I'll have to do that myself.

4 March 2008

Vincent Fourmond: Uniform probability does not apply to real life !

I've always been puzzled that, quite often, a package is totally silent for a long while (say a month or two), and suddenly, you get two or three bug reports the very same day, distant from any release or transition to testing. I've seen that mostly with libqt4-ruby and pmount. This seems to be rather general: it really looks like events of our lives don't even remotely follow uniform probabilities. I've had a recent confirmation with ctioga, a project of my own. I just need to decide to release a new version to realize just afterwards that I've got many more features to add (not less than 20 significants commits since the release a week ago !)... Life is not linear ! (and I won't complain).

26 February 2008

Vincent Fourmond: Today's dirty command-line trick: progress statistics for dd

Who has already been using dd for endless data transfer without really knowing what is happening ? That is rather annoying. Sure, when the target is a normal file, you can always use
watch ls -l target
But, that won't tell you the rate of transfer, and it won't work if the target is a special file (device, pipe, ...). Fortunately, dd accepts the USR1 signal to print out some small statistics... Well, combining that with the watch tricks gives this:
watch killall -USR1 dd
And there you go, dd is now regularly printing out statistics. Pretty neat, isn't it ?

20 February 2008

Vincent Fourmond: pdfnup and page size

I use a combination of pdftk and pdfnup, from the pdfjam package to arrange (PDF) graphs produced by ctioga into an array for printing. However, I find that a simple
pdfnup --nup 3x3 concatenated_graphs.pdf
does not produce an A4 output (even with --paper a4paper), but a PDF who has the same size as individual graphs. Painful. It did take me long to realize it is a feature of pdfnup, who asks pdfTeX to have the paper size adjusted to that of the input when the layout is symmetric and no orientation has been provided. To disable that, and get a real A4 paper, specify the orientation:
pdfnup --orient portrait --nup 3x3 concatenated_graphs.pdf

17 February 2008

Vincent Fourmond: Virgin Megastore France doesn't like Iceweasel

I wanted to have a look at the French Virgin Megastore website, and I got the attached image. It says: The version of your browser does not allow browsing this site under Linux. You must install Firefox. Well, I don't want to know how they are detecting the "correctness" of the browser (after all, this is Iceweasel, so it is Firefox), or why they are so stupid as to forbid browsing if the "correct" navigator is not used, but, well, they've just lost a customer.

13 February 2008

Vincent Fourmond: How to shut wine audio output

As I've mentioned before, I play to Morrowind (III) using Wine. Fine. Thanks to a nice guy on the AppDB Forum, I found out that what was causing Morrowind to segfault was simply that I had not set any audio device in my configuration... So I did with winecfg, and it worked, and I was quite delighted. So far, nothing fantastic. It so happens that I hate to play any game with the game's music/sounds/voices, as I prefer to be quietly listening to music of my taste (I have delicate ears). As in any other game, you can switch them off in Morrowind, which is what I immediately did. However, it happens that some sounds - so far, only the sound corresponding to a shield blocking an attack (a graceful and delicate sound as you imagine) - go through even with all sound volumes are turned down to 0. It is annoying to the point I had to stop using the computer for listening music and falling back to my old CD player. Painful ! Or at least so it was until today, when I finally took my courage and found out how to fool wine into believing it is playing sounds when in fact it is not. First step, create a null ALSA output device, by adding the following to your .asoundrc:
# Null audio output
pcm.null  
  type null               # Null PCM
 
Then, you need to have wine use it (and only this one). For this, a quick look at the Useful Registry Keys showed that I had to add the following to my .wine/user.ref configuration file:
[Software\\Wine\\Alsa Driver] 1202930020
"DevicePCM1"="null"
"AutoScanCards"="N"
"DeviceCount"="1"
Just make sure wine is using ALSA output, and that's all ! Morrowind plays, without sound and does not segfault ! I'll be able to listen to my music again... Note I'm unsure about the value 1202930020. The best is to add the key Software\Wine\Alsa Driver using regedit and then edit the configuration file -- or even do everything with regedit.

8 February 2008

Vincent Fourmond: Microsoft advertises embedded windows under "Embedded Debian" !

[embedded-debian-microsoft.png] Few days ago, I was looking at my gmail mails. As usual, there was a couple of ads on the right hand side of the screen (they never really bothered me before). But that day, there was something quite different: an advertisement for Microsoft under the term "Embedded Debian" ! Well, I can understand that Microsoft wants to advertise for the keywords "Embedded Debian". After all, if they do provide good embedded OS services, that is only fair. But to do so with a title "Embedded Debian" does not really qualify as fair use of the Debian trademark ! The trouble is that this is something hard to prove, as it appears seldom and apparently randomly. When I google for the terms Embedded Debian, I come up around every second time with nearly the same ad, but taking to www.microsoftembedded-de2.com. This domain does not appear to be connected to Microsoft anyhow (see its whois entry). Some other people tried and never saw the ad, as I did when I looked from another computer (a Windows one, funnily). The www.windowsembeddedsolutions.com link which is depicted above did only show up in my gmail account so far. However, that domain is owned by Microsoft, so they can't deny this comes from them. Why, are we scaring them so much ??

6 February 2008

Vincent Fourmond: Wine versus Vista for gaming

Another day starting well: apparently Wine is a better alternative than Vista for gaming (admittedly, this guy only tested four different games, but Wine was the clear winner). Great ! As for me, I finally got Morrowind working under Wine, which is one of the reasons why I haven't been that active for Debian recently.

5 February 2008

Vincent Fourmond: gs saved the day again !

Some time ago, I was delighted at the power of Ghostscript. Well, it saved the day again, with an article that didn't want to get printed. Quite naively, I always thought that doing first pdf2ps (or pdftops, based on Xpdf, that often produces smaller and nicer postscript) and then ps2pdf was a good way to deal with unfriendly PDF files. But, in real, nothing is better than working without intermediates. The following produces a pretty neat PDF file:
gs -sOutputFile=output.pdf -sDEVICE=pdfwrite \
  -dCompatibilityLevel=1.4 input.pdf  /dev/null
As side benefits, as this command also embeds postscript fonts, the output looks better in xpdf, and it is decently smaller !

Next.

Previous.