MacOSX ate my pics

OK, so the 2GB SD card I use in my camera has its problems. Apparently, only 1GB of it are recognized by the OS (Linux) and/or the card readers I own. The problem seems to be common, as you can see by googling about it. More info, from the Wikipedia article for SD cards:

Devices that use SD cards identify the card by requesting a 128-bit identification string from the card. For standard-capacity SD cards, 12 of the bits are used to identify the number of memory clusters (ranging from 1 to 4096) and 3 of the bits are used to identify the number of blocks per cluster (which decode to 4, 8, 16, 32, 64, 128, 256 or 512 blocks per cluster).

In older 1.x implementations the standard capacity block was exactly 512 bytes. This gives 4096 x 512 x 512 = 1 gigabyte of storage memory. A later revision of the 1.x standard allowed a 4-bit field to indicate 1024 or 2048 bytes per block instead, yielding more than 1 gigabyte of memory storage. Devices designed before this change may incorrectly identify such cards. Usually by misidentify a card with lower capacity than is the case by assuming 512 bytes per block rather than 1024 or 2048.

For the new SDHC high capacity card (2.0) implementation, 22 bits of the identification string are used to indicate the memory size in increments of 512 KBytes. Currently 16 of the 22 bits are allowed to be used, giving a maximum size of 32 GB. All SDHC 4-GB and larger cards must be 2.0 implementations. Two bits that were previously reserved and fixed at 0 are now used for identifying the type of card, 0=standard, 1=HC, 2=reserved, 3=reserved. Non-HC devices are not programmed to read this code and therefore cannot correctly read the identification of the card.

All SDHC readers work with standard SD cards.[ref]

Many older devices will not accept the 2 or 4 GB size even though it is in the revised standard. The following statement is from the SD association specification:

"To make 2 GByte card, the Maximum Block Length (READ_BL_LEN=WRITE_BL_LEN) shall be set to 1024 bytes. However, the Block Length, set by CMD16, shall be up to 512 bytes to keep consistency with 512 bytes Maximum Block Length cards (Less than and equal 2 Gbyte cards[ref]."

I have had problems in the past with this issue, and could only retrieve the photos exceeding the "first GB" of the card with a tedious operation: copy some photos from the card to the internal memory of the camera (28MB), remove the card from camera, connect camera to computer, download the photos in the internal memory (and empty it), unplug and repeat. 1GB/28MB = boring as hell.

However yesterday I realized that I had a shinny MacBook with its MacOSX intact. I read somewhere that Windows would sometimes read 2GB cards that Linux couldn't, by the simple method of happily ignoring the f*cked up file system in them. Maybe MacOSX could, too.

Well, it turns out it couldn't. When I attached the card in the card reader (I didn't try with the camera directly), MacOSX found the device and mounted it, giving me a nice icon in the Mac version of "My PC". However, the directory the icon led to was empty. I thought "Tough luck, Mac reads nothing in the card", unmounted it and unplug it. Then I placed it in the camera again, turned it on and... there was no photo in the darned thing! MacOSX had erased them!

There is still the (likely) possibility that I made some deep mistake, but the explanation for now seems that MacOSX ate my pics. Sad.

Tags: , , , , , , ,

Creative Labs and the proprietary idiocy

Just when you thought that the world of proprietary software and silly "intellectual property" business couldn't do it worse, they surprise you!

This weekend I learned about a message from a big boss at Creative Labs to an individual nicknamed daniel_k at some Creative Labs forum. Please follow the link to the message, because it is very interesting. And don't forget to read some of the responses.

The short story is that Creative Labs produces some sound cards and their drivers. Apparently some of the drivers would not work for Windows Vista, and daniel_k managed to program drivers for Vista (and Linux, I think), and distributed them for free (asking only for voluntary donations). The result: an open message in a forum, asking daniel_k to cease and desist.

The rationale for CL to do that seems to be that they didn't release Vista drivers for the sound cards on purpose, so that customers would have to buy new cards if they switched to Vista. With daniel_k's contributions, such customers are not forced to dump the old card for a new one, so this costs CL money!

Another example of absolutely vile acts from vendors of proprietary software (were the drivers free software, this discussion would be moot), and one more reason to say fuck you all!

The good part is that the story is already being spread around the net, and a lot of customers and potential customers are becoming angry customers and potential customers. I wish CL the worst for their vileness and short sightedness on the issue. They should have supported daniel_k, and use the ensuing possitive feedback campaign... but they didn't. Shame on you, Creative Labs!

Tags: , , , , ,

IMAP access to GMAIL with KMail

I recently discovered that Gmail offers IMAP access to the service. I must admit that I have never used IMAP, but it is a very good idea for simplifying the access to one's account from anywhere, and having your e-mail always up to date in any number of computers. You can think of IMAP as all the good things of POP3 (custom UI, great flexibility) and web-mail (central repository of messages) together, without their drawbacks.

Although I think Google is an evil company that wants to take the world over, I have surrendered to their superb e-mail service, Gmail, with its huge inbox and fast and reliable access. I was happy with POP3, go figure with IMAP...

Of course, I have had to configure my e-mail client, KMail, to use IMAP. For that, I have followed the instructions, e.g., in

First, you have to allow IMAP connection to Gmail. For that, you just need to go to Settings in your Gmail account, then Forwarding and POP/IMAP, and Enable IMAP (I think it's on by default).

Second, create an IMAP account in KMail: Settings -> Configure KMail -> Accounts -> Add -> IMAP. You will be prompted for some info:

  • Account name: anything to let you identify it.
  • Login: your full Gmail address.
  • Host:
  • Port: 993

Small trick: the default Trash folder is "Local Folders/trash". If you keep this, when you "delete" a message from the IMAP account, it will be moved to the "General" KMail trash. The problem is that it means moving the message outside the IMAP tree, and I have found that the IMAP mechanism (probably as a security measure) keeps a copy of the message in the original location (i.e., it is actually not erased). To avoid that, you can put something like "Gmail IMAP/[Gmail]/Trash" as Trash folder, and make the deleted message be moved to the Trash inside the IMAP folder. There, it is deleted exactly as if you access your Gmail account from the web and click on "Delete".

Third, in the Security tab of the dialog window we have just filled, choose "Use SSL for secure mail download" in Encryption and "Clear Text" in Authentication method.

That's it, you're done!

So far I have only used IMAP at home (lousy 300 kb connection), and I think it is a bit on the slow side of the scale, but except for that, I am starting to love IMAP.

Tags: , ,

SpyPig: another annoyance against your privacy

I've read in a post in Genbeta [es], about a "service" for e-mail senders called SpyPig. It basically boils down to sending a notification to the sender of an e-mail, when the recipient opens it. This way, the recipient can not say that she hasn't read it.

I will deal with two issues: moral and technological. Morally, I think this kind of things suck. I have received these e-mails asking for confirmation of having been read, and I never found appealing to answer. But at least you were asked politely. What these pigs SpyPigs do is provide a sneaky way of doing it without the recipient knowing. Would you consider someone doing it on you a friend? Not me.

Now, technologically, the system is more than simple, and anyone with access to a web server could do it. The idea is that the sender writes the e-mail in HTML mode, and inserts a picture (can be a blank image) hosted at some SpyPig server. When the recipient opens the HTML message, the image is loaded from the server, and the logs of the server will reflect when the image was loaded, and hence the e-mail opened. When this happens, the server notifies the sender.

The bottom line of this story is that HTML IS BAD for e-mails. My e-mail readers never allow displaying HTML messages, and show me the source HTML code instead (of course, I can allow HTML, but why would I?). So this SpyPig thing will never work for against me. And this SpyPig story is just one more reason not to allow displaying HTML in the messages you read. Of course, for the e-mails you send, consider sending them in plain text. Your recipients will be a bit happier.

For more tips on what NOT to do on web/e-mail issues, check the e-mail/web tips section in this blog.

Tags: , , , ,

Windows 7 wishlist

I came across a blog post [es] talking about Windows 7, the planned sucessor of the current Windows Vista. The same can be found elsewhere, e.g. in Ars Technica.

The article summarized some features that Windows users would like to see in W7. You can also see a picture with the whole W7 wishlist. What struck me was that, although the Redmond giant tried its best to copy every single innovation from free software, they still missed important points that users value enough to make a wishlist out of them.

Some points in the list are new and exciting. Some others are everyday things for us free software users, and it's so amazing that Windows still does not include them:

  1. Request for an integrated font manager
    One of the problems of proprietary software: the pieces each programs uses (including fonts) are property of the maker, so sharing is largely hindered. In Debian we have things like Defoma, and font management is quite lean in any distro, anyway.
  2. Explorer toggle button to quickly show/hide hidden files or system files
    Files starting with a dot are hidden in Linux. All file managers I know of have the hability to show/hide them with a click or a shortcut (Ctrl-H in Thunar and Nautilus, no default but configurable shortcut for Konqueror).
  3. Network/Internet bandwidth monitor
    Most, if not all, docks/taskbars in FLOSS desktops (Xfce, GNOME, KDE...) have a widget for that.
  4. DirectX update on Windows Update/Microsoft Update
    I use Debian, and it manages the installed software with APT (other distros have other systems). With it, I run "aptitude update" and it searches the online repositories for the last version of all the packages that exist in them. When I do "aptitude safe-upgrade", it automatically upgrades all the packages for which there are updates, and notifies me if some upgrade requieres to install a new package (without upgrading it until I agree to install that new package). And it's been like this for years.

  5. Infinite desktop, virtual desktop idea
    Although it probably refers to zooming interfaces, Linux has had the idea of virtual desktops for years.
  6. Profile data: Move locations of all user folders and data to another location
    This is trivial in Linux since the dawn of its times.

  7. Option to "Reopen Closed tabs" in IE
    Firefox has this option through add-ons like Tab Mix plus. Not only that, but many other things are possible, like: periodic reloading of some or all tabs, closing all tabs but the current one, duplicating tabs (along with all their history), freezing tabs (so they can not be accidentally closed or moved away from), change the name of the tab...
  8. Auto clean of Temp folders
    Temporary file management in Linux is flawless. I never saw a tmp location full because the system forgot to clean it.
  9. Provide Manual Duplex Printing in Windows Pring Dialog
    It is really lame to need to ask the maker of a big, monolithic, OS for stupid changes like that. The printing dialogs should be made by the desktop environment (a small part of the OS), or the application, and it should communicate with the printing server (another smaaaaall part of the OS). Details like that one should be fixed by updates in only one/some small packages related to the desktop environment.
  10. IE should have a close button on each tab
    See point 7.
  11. Disk Manager needs to have the ability to expand partitions
    Tools like GParted make partition management a breeze. In Windows, you need commercial third party tools for that. Tough luck.
  12. Image (ISO, BIN) support in Windows
    What? In Windows you can not mount ISO images as if they were actual filesystems? In Linux, you sure can.
  13. Family license
    It must suck to buy a copy of the OS and being able to use it only in one PC. With Linux and free software, you obviously don't have this problem, and you don't need to go crying to your dealer for a more mercyfull license
  14. No dialog should take keyboard focus away from what you are doing
    With all serious desktop environments, you can configure this behaviour, as well as if focus follows mouse, or if you have to click on a window to make it active and so on.
  15. Patch operating system without having to reboot
    With Linux, you only need to reboot if you install a new kernel (you can't use a different kerner without rebooting). For everything else, you don't need to.
  16. Add folder size to data displayed by Windows Explorer
    Wow, it must suck being stuck with a single choice for a file manager (or any other task), and not being able to configure stupid things like that to your liking. Another con of Windows, I guess.
  17. Live CD or DVD to boot from to recover from a crash or virus that would allow to transfer files
    But there is a tool for that task on Windows! It is called "Linux Live CD", and many distros have it. I have read that it is pretty popular among some Windows users: when their system is utterly destroyed, a Linux Live CD can save the precious data in their disks.
  18. Disallow removable (USB/Firewire) drives to default to next available drive letter when the letter is already used by other network drives
    I know the issue of wanting to have permanent names for given devices, no matter what. The solution is called udev.
  19. Windows Mail should be minimizable to the system tray
    I use KMail and it is. Probably Thunderbird is, too. By the way... ever guess how similar to the former two Windows Mail is (by the looks in the Wikipedia article)?
  20. Command Prompt should be improved
    Hehehe. I have no words.
  21. Integrated Anti-Virus
    What is a virus? Please explain, I'm an ignorant Debian user!
  22. More desktop themes should be offered in the default installation of the next version of Windows
    I thought Windows users wanted consistency and simplicity, and everything to look the way uncle Microsoft wanted. In Linux, we have soooo much to choose from. You doubt it? Take a look at, or
  23. IE direct download - do not download to temp folder
    With any free browser (e.g. Firefox) you can choose the default dir for the downloads, and you can choose for each download where to put it (if you don't want it in the default folder). Is it not like that in IE?

Maybe some slipped through, but I'm too tired to be more throughout.

Tags: , , ,

handyfloss meets Windows Vista

The setup

A colleague wanted to edit a video (actually, three) for a presentation she intended to make in a laptop with Windows Vista and MS Office 2007. The video was a WMV, and the required edition included removing fragments, changing the speed of one of the fragments (and join it back with the others), and adding a soundtrack.

The problem

She could not, for the life of her, edit the damned thing on a Windows computer.

The solution

Why, Free Software, of course.

The motivation of this post

To help dispell two ideas: that "Windows is easy", and that "With Linux, you waste your time finding out how to do things".

The story

Part I - Linux

OK, so I proposed her to use some Free Software called Avidemux. Our first problem was that apparently Avidemux was unable to cut the video in pieces (it crashed at the attempt). After much perusing, and using the humble file command, I found out the reason: the WMV had no playing FPS set. Players, like MPlayer would reproduce it by guessing 25 or 30 frames per second, but editors need a precise value to count on. I readily fixed it by reencoding the video to 25fps with MEncoder:

% mencoder in.wmv -ovc lavc -nosound -fps 25 -lavcopts vcodec=wmv1 -o out.avi

Once a proper FPS given, I used Avidemux to split the file. However, I encountered a second problem: I couldn't split the file anywhere. I could only cut it at points 10 seconds appart. I had to sweat a bit more to fix that, but I also learned something more in the way. Most (all?) compressed video formats use at least two kinds of frames: normal frames and keyframes. The latter are the frames where any player can seek to in the video. According to the man page of MEncoder:

maximum interval between keyframes in frames (default: 250 or one keyframe every ten seconds in a 25fps movie. [...] Keyframes are also needed for seeking, as seeking is only possible to a keyframe - but keyframes need more space than other frames, so larger numbers here mean slightly smaller files but less precise seeking. 0 is equivalent to 1, which makes every frame a keyframe. [...]

So here you are: the problem was the default value of some variable called keyint. To make the video seekable to any frame (so it could be cut at any point), I set keyint to 1:

% mencoder in.wmv -ovc lavc -nosound -fps 25 -lavcopts vcodec=wmv1:keyint=1 -o out.avi

Once the movie was split into parts with Avidemux, and the unwanted parts were removed, the next step consisted on playing one fragment faster. The problem here is that I don't know how to make a variable FPS video, so we had to make it so all the video played at the same FPS, but a part was faster. How? Removing frames, of course. I used MPlayer to deconstruct the relevant fragment into individual frames (in PNG format):

% mplayer -vo png:z=2 fragment

The command above generates a whole lot of 0000xxxxx.png files, with frames ordered by the number in the filename. Next, I deleted every second frame. How? With a stupid GUI I don't know, but from the command line it is trivial:

% rm -f 00*[13579].png

Now, I just re-constructed the video with half the frames, to get an effectively double-speed video, with same FPS as original:

% mencoder "mf://*.png" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=wmv1

If I am allowed to say it, the effect is really great. You wouldn't tell the sped-up video from the original, except from the increased play speed.

Using Avidemux for joining the video fragments was a breeze, and it could even be done from the command line:

% avidemux fragment1.avi --append fragment2.avi --append fragment3.avi --save total.avi --quit

The last (Linux) part consisted on adding a soundtrack, which Avidemux can do, from a MP3, WAV, or another video. This was easy.

Part II - Windows Vista

OK, the last Linux step consisted on reencoding the video in some format that Vista could read. This was no immediate task, but after some tests, we made it. Windows Media Player could reproduce the movie with no problem.

Finally, we opened the wonderful Office 2007 in the shiny and new Vista laptop, and created a PowerPoint slide to insert the video (the rest of the presentation was already done). Everything seemed to work, but when we played the presentation, we discovered that either the video or the sound could be played (depending on how we had encoded the video in Linux), but not both simultaneously. WMP would play the videos just fine, but the embedded player in PowerPoint would not... go figure why. After at least 3 crashes of Office (yes, Office crashes), some bitching because we could not make any sense of the new Office interface (we are experienced pre-Vista and Linux users, and Windows is for idiots, right? We must be idioter than average) having to stand the fact that the semitransparent border of a window refused to disappear when we closed it (so we kept working with a blue-greenish stripe across a part of the desktop), and one Windows reboot (yes, Vista still hangs from time to time), we managed to insert and play the darned video. How? We just inserted two videos: one for which only the audio was playing, and another one for which only the image was showing. We then make these two objects to kick off at the same time, et voila!. Not the cleanest of solutions, but with Windows "everything just works", right?

The moral

The moral of the first step (the FPS not being set) was that I had to play around for a while with my Linux tools, but the culprit was MS, and their lousy WMV. I have never produced a video with no FPS (and all other necessary metadata) set, because my FLOSS tools do it automatically. Secondly, I didn't waste my time. Thanks to the usefulness of the FLOSS tools, I ended up learning something about movies, FPSs, and that they are required. I also learned about key frames, and seeking and cuting video streams.

On the other hand, for a much simpler job, we spent relatively (and maybe absolutely) longer with Windows, and we did lose our time with it. The problems we encountered with Linux were difficulties of the situation itself: the original WMV was flawed, the AVI we created had too high an inter-keyframe interval... and the FLOSS tools we used helped us fix them and learn in the process. In the case of Windows, the task was so simple, and all the problems we met were created by Vista. We didn't learn anything from all of our struggle, because we only struggled against Windows (the GUI, the crashes, how to encode the video in Linux so that Vista could read it, why the darned Office would not play the audio or the video), not our problem (editing and embedding the file). All the time was devoted to learning how to overcome the limitations and errors of our tool, not to how to use our tool to perform some task, learning about the task itself in the process. Thus, it was wasted time.

Tags: , ,

Exploitable bug in Oracle 10g databases

I read in The Register that a zero-day vulnerability has been reported in Oracle 10g databases. I am by no means an expert in databases ("not an expert", wow, what an understatement! I'm an ignorant), but I have my small war against people who regard proprietary DBs such as Oracle or IBM DB2 as far above free software alternatives such as MySQL or PostgreSQL. To put an example company with HUGE databases, Google uses MySQL. Actually, I just found in the previous link this post in an ex-Google employee's blog, and I plan to show it to any half-wit parroting the motto that "big commercial solutions" are by default better than "hobbyist things" like free software (specially for DBs).

So, when I read the Register headline, I immediately thought of writing a post on how "bad" Oracle was. However, after actually reading the (short) article, I decided to change the main point of the post. Actually, what this case shows is how "bad" depending on proprietary software is. Quoting the Register article:

Oracle has reportedly created a fix but is not willing to break its quarterly patch release cycle to issue an update. The database giant's next update is schedule for 15 January. In the absence of a patch no ready workaround is available, iDefense reports.

Holy crap! Oracle acknowledges that the bug is there, that it is dangerous, and that they do have a fix, but they friggin' don't want to release it!. Just because "it doesn't fit" in their well-laid plans! No need to say that with free software this can not happen: there is no reason to hold on on bugfixes. And even if there was, anyone can write a patch, and release it, so there is no vendor locking the users to it, and deciding what to release and when.

Tags: ,

Remote graphical applications with NX

I have been recently (re)made aware of NoMachine's NX communication programs by my colleage Txema. NX technology is a way of stablishing a connecting from one computer to another one, and create some sort of tunnel through which displayed info (graphics) is transmitted compressed. The communication, of course, is made through SSH secure connection.

Molden opening a file at Arina, a supercomputation cluster I have connected to from Bart, my computer at work, to which I have stablished a NX connection from Heracles, my computer at home. Screenshot taken from Heracles.
(Clic to enlarge)

Veteran Linux users will say "So what's the big deal?". Remote connections via telnet, and later with SSH, have been available a long time ago. Exporting the display (that is, making graphical programs opened in the remote computer appear in the local screen) has always been a simple task, and more recently even SSH tunneling has been made available for that task.

However, the key point here is the compression. When running a NX connection, we open a communication channel, running a custom application in the remote machine (for example, we can open the desktop environment, and work as if we were sitting in front of the remote machine), and all the information is compressed, so that the responsivenes of the remote application is as close as possible to applications run in the local computer.

Even though the core NoMachine's NX code is free software, the client and the server themselves are not, I think. That is a pity, but free alternatives, such as FreeNX are being built upon the free core. From here I wish the best of successes for that project.

Tags: , , ,

Vista vs Mepis

Wanna see how a humble GNU/Linux distro such as Mepis compares to Windows Vista? We are not talking of Ubuntu, Debian, Mandriva or SuSE Enterprise Edition here. No big-fat distros. Just Mepis, a distro that fits in a single CD that can be used to install it, or run it as a LiveCD.

You can read a throughout article at Enjoy!

Tags: , ,

Malware: Vista Capable

I read, via Kriptopolis (es), that "Tim Eades, senior vice-president of sales at security company Sana Security said that 38 per cent of malware is already Vista-compatible."

Apparently, and according to an article at, more malware than anti-malware has been already ported to Windows Vista.

Go, Vista, go!

Tags: , , , ,