Feed on
Posts
Comments

I have been a happy user of a Lex Neo fanless server for a few years until two weeks ago, when it froze. It produced a continuous beep when I tried to reboot it, symptom of memory problems. It accepted to boot on an old 64Mbyte stick, but would not start on anything bigger :(. I left it running in this state until today, when it definitely stopped…

This tiny machine has been serving various duties at home, ranging from git server, backup relay to the (excellent) rsync.net service, file server, address book, note taker… and mail server, thanks to a combination of getmail, dovecot and spamassassin. This is where the story might affect you: Some of my email is trapped in the server for now, so you will have to wait even longer than usual for an answer from me.

I ordered a replacement one which should be there in the next week. Hopefully transition will be smooth and everything will be up and running quickly. Meanwhile I can answer new mail, so if you need a quicker answer, please send your mail again.

Suppose you are in the middle of a gdb session, and need to print the content of an array or a class implementing operator[]. Here is a simple way to do that which I just discovered:

(gdb) set $pos=0

(gdb) print array[$pos++]

content of array[0]

(gdb)

content of array[1]

(gdb)

content of array[2]

The blank “(gdb)” lines mean i just pressed “return”. In this case, gdb executes the previous command again, printing array and incrementing $pos one more time.

Hope this helps, and feel free to comment on any better way to achieve this!

Got published

I wrote a few KDE tips for a new French Linux magazine: Linux Pratique Essentiel. It’s the first time I write for a magazine, thanks to Diamond Editions for asking me to collaborate to this!

I bought the magazine and it’s quite good. It does a good job at presenting Linux software in a way “non-geek” users will appreciate.

It was also fun to find out that one of my ex coworkers, Dave Neary, wrote a big part of the Gnome articles. So this magazine is (partially) brought to you by ex wengo-ers :)

Update: I just received today a free copy of the magazine, thanks Diamond Editions!

As a follow up to a previous post, I am happy to announce I now have a job again! I start working for Open Wide on next Monday, as a GUI developer in the OS4I (Open Source For Industries) unit.

It feels good to get back to work, even if I didn’t have too much problem keeping myself occupied with Gwenview :-)

Thumbnail bars

Thanks to the hard work of Ilya Konkov, Gwenview now features nice thumbnail bars. You can find one in the new fullscreen bar:

Fullscreen thumbnail bar

And an expandable one in view mode:

View mode thumbnail bar, hidden View mode thumbnail bar, visible

As a consequence, I removed the “Preview” mode which was redundant. One less icon in the toolbar!

Zooming slider

By popular request, I moved the zooming actions to Gwenview status bar and introduced a zooming slider, as can be seen on this shot:

Gwenview with the new zooming slider

The nice thing about this change is that it removes quite a few buttons from the default toolbar. I am still not sure whether I like it or not, and would like to prettify the “zoom to fit” and “actual size” buttons. I think the button icons should be more distinct: the only difference between the current ones is a 5×5 pixel square.

I will probably play with it a bit more later. Maybe going as far as implementing the mockup mentionned in this post by Jos.

As you may remember, I have been trying to find a Qt/KDE-related, free-software-friendly job for a while. Unfortunately it didn’t work out, so I had to resign myself to look for a more ordinary position.

After publishing my resume on a popular french job website, I got literally overflowed by consulting companies willing to hire me. I had to take my resume down after three days in order to shut off the fire hose and prevent my answering machine from segfaulting.

Of course, it’s great to feel like everyone “wants me”, but it makes for exhausting weeks made of three or four interviews a day. And I am not talking about half-hour interviews: the average interview is two hours long, and requires you to meet two or three different people.

Now I am facing an interesting problem: which employer should I choose? This is a “good problem to have”, but it’s still a problem. Most of my potential employers are consulting companies, I am having a hard time trying to find out which one would be better than the others. Any hint on that?

On Gwenview side, I am slowly getting more active now that looking for a job is becoming less time-hungry. Today I improved zooming and scrolling by throwing away most of my previous code: it seems Qt image scaling has become fast enough that it’s no longer necessary to worry about threading it. It’s not finished yet, more on that later.

I also improved the way the thumbnail view reacts with regard to thumbnail generation and scrolling. From now on thumbnail generation stops when you start scrolling the view and resumes when you are done, generating thumbnails for the newly visible images. Hopefully I didn’t introduce any regression, feedback is welcomed!

I was asked by my wife if I could recover deleted pictures from a memory card for a coworker. Here is how I did it, it might be useful for others.

Dumping

The nice thing about Linux is that it lets you manipulate disks as files, making it possible to try every possible trick without fear of destroying data.

After putting the card into the card reader, I ran dmesg and found a few lines about the newly inserted device. From these lines I got the name of the raw device associated with the card. In my case it was mmcblk0p1.

I dumped the card by copying the device file to some tmp dir:

cp /dev/mmcblk0p1 ~/tmp/carddump

Getting a list of deleted files

After some googling, I found some useful information about fat32 and how to undelete files from here:

http://lists.slug.org.au/archives/slug/2006/05/msg00002.html

Fat32 keeps the file list at the beginning of the file system, and keeps name of deleted files except for the first character.

As suggested on above link, I had a look at the dump content with:

hexdump -C carddump | less

I found a set of IMG_nnnnJPG where nnnn is a number (and yes, that’s nnnnJPG, not nnnn.JPG). These were the “normal” files. I also found a set of MG_nnnnJPG. These were the deleted files I wanted to recover.

Using strings I grabbed a list of the deleted files:

strings carddump | head -n 2000 | grep '^MG_[0-9]*JPG’ > deleted.lst

(2000 is just an empiric value. After 2000 I didn’t get new file names).

Full path

fsck.vfat is capable of undeleting a file, but it needs the full path to them, not just the filename.

I mounted the card and had a look at the folder names to find where were the images stored. In my case, it was in /dcim/100canon.

Undelete!

Now I was all set. I made a backup of the dump (it’s faster to copy files on hd than from the memory card):

cp carddump carddump.old

Then ran this bit of shell script:

cat deleted.lst | while read x ; do
    sudo fsck.vfat -au /dcim/100canon/I${x/JPG/.JPG} carddump
done

(Note that I integrated the full path found before and did a bit of shell hackery to add back the missing dot before JPG.)

Mount the dump

I then mounted the dump to check the result:

mkdir foo
sudo mount -o loop carddump foo
gwenview foo

And was happy to found 167 new files, of which 165 were complete. Coworker is happy!

PS: This method only works for FAT32 (and FAT16 probably) and for files which have been deleted. It won’t work if the file system is damaged. In this case you will probably want to try specialized tools like Photorec or Foremost, as suggested by another user of the mailing list I quoted.

Thanks Aaron

Thank you Aaron for the very nice post about Gwenview. It’s true that I, mere mortal, can’t compete with your blogging rate :-). To answer one of the comments in Aaron post: In SVN, Gwenview does feature multiple undo/redo support. No need to fill a wishlist on b.k.o!

I was a bit worried about the way Solutions Linux would go this year. We had no proper booth and I was expecting either no one would find us or we would have to face a mass of angry users coming to us yelling that KDE4 was worse than KDE3.5, destroyed their data, flashed the BIOS of their computers and other nasty things.

We solved the booth issue thanks to Gérard Delafond, famous former KDE booth master, now working on AILES, an association promoting free software for health-care professionals. This year, the KDE booth were indeed a “virtual booth”, hosted in the AILES booth (who said virtualizations was only for computers?).

Before leaving home, I printed an A2 sized KDE logo (more precisely, 4 A4 sheets put together with duct tape) and a fake “KDE” label to hang alongside the “AILES” label.

Sébastien Renard (coordinator of the KDE French translation team) and me were the permanent demonstrators on the booth, but we got support from Charles de Miramon, Gaël Beaudoin and a few others. I was also very happy to meet Helio Castro for the first time.

I think the most asked question we got was “Can you show me KDE4?”. People were very pleased with what they saw and most of them had no problems with the fact that KDE 4.0 is for enthusiast users willing to try something new, and that they should not expect a drop-in replacement for their KDE 3.5 desktop.

I usually got visitors interested with Plasma + KWin. KWin is great to get people hooked. I continued with Dolphin and Gwenview or Okular. It was fun to demonstrate the new Gwenview without telling visitors I was actually its author. This way I got objective reactions to the application.

Quite a few of them leaved the booth saying they would give KDE4 a try at home. Not all of them were current KDE users.

On the last day, we had quite some fun demonstrating Plasma with the Fluffly Bunny Plasma background :-)

PS: Thanks to our booth neighbor traduc.org for sharing their food with us on the last day! Now we can say KDE actually eats all available resources :-)

Older Posts »