Problems with Qt Creator installed in /opt

I’ve been doing a bit of fiddling with using Qt for developing mobile apps. When I installed the Qt SDK I installed it to /opt. This means the user running the IDE does not have write access to the IDE which has caused a number of problems.

  • Updating the SDK: If you run the SDK as the normal user, the “Help > Start Updater” menu option still exists and appears to work. It seemed to detect that I had sudo access and asked for my password but then hung using 100% CPU. Instead of using that menu option, I ran /opt/QtSDK/SDKMaintenanceTool as root which works.
  • Running the QEMU phone emulator: This failed with “Qemu finished with error: Exit code was 1″. To fix this, I ran QEMU manually:
    /opt/QtSDK/Madde/bin/mad remote -r dfl61-harmattan_2.2011.39-5 poweron -fg
    This showed I needed write access to the qemu disk images. As I’m the only user on the system*, I gave all users access:
    chmod a+w /opt/QtSDK/Madde/runtimes/dfl61-harmattan_2.2011.39-5/arm-qemu-rm680-*

Hope this helps someone stumbling across this via Google

* = Yeah. There was no need to install Qt into /opt – it just seemed tidier than putting it in my home directory

Logitech C300 webcam on Linux

The Logitech C300 webcam worked fine with Fedora 15 as it shipped but a kernel update caused the audio to come out really squeaky/high-pitched/”chipmunk”ed.

I’m not the only one having issues with similar webcams:

  • https://bugs.launchpad.net/ubuntu/+source/linux/+bug/858412
  • https://bugzilla.redhat.com/show_bug.cgi?id=729269
  • https://bbs.archlinux.org/viewtopic.php?id=121607&p=3

Based on the patch in the third link in that list (for a few different webcams), I’ve found that the following trivial patch fixed the problem:

diff -uNrp kernel-2.6.40.fc15.orig/drivers/usb/core/quirks.c kernel-2.6.40.fc15.new/drivers/usb/core/quirks.c
--- kernel-2.6.40.fc15.orig/drivers/usb/core/quirks.c 2011-09-27 21:23:58.801051233 +0100
+++ kernel-2.6.40.fc15.new/drivers/usb/core/quirks.c 2011-09-27 21:30:35.184686232 +0100
@@ -44,6 +44,9 @@ static const struct usb_device_id usb_qu
/* Logitech Webcam C250 */
{ USB_DEVICE(0x046d, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },

+ /* Logitech Webcam C300 */
+ { USB_DEVICE(0x046d, 0x0805), .driver_info = USB_QUIRK_RESET_RESUME },
+
/* Logitech Webcam C310 */
{ USB_DEVICE(0x046d, 0x081b), .driver_info = USB_QUIRK_RESET_RESUME },

If you want to try that before Fedora make a fix available, it’s easy enough to build your own kernel

Simple graphical Javascript Timer

A while ago, for a friend’s party I wrote a very simple Javascript Timer.

The other day, my daughter (too young to understand a numeric countdown at the moment) was messing around at dinner (not unusual). I wanted a simple graphical way to explain that after a set amount of time I would take her dinner away to encourage her to eat up.

Slightly to my surprise I couldn’t find anything with Google (my Google-fu is obviously weak). So I extended my little timer so that it shows a green ball for each second remaining. As the time ticks down, the balls turn red.

I was originally going to use a progress bar but this way shows, at a glance, how much total time there was…

I think it’s working pretty well

My “YES to AV” masterpiece

The opinion-polls that show AV and first-past-the-post neck and neck make me sad. AV isn’t perfect but all its drawbacks (e.g. gerrymandering) apply to FPTP too. AV has the big advantage that tactical voting isn’t necessary – a huge drawback in the current system. The main argument against AV “people who vote for smaller parties get to vote twice” seems confused or intellectually dishonest.

I drew a beautiful masterpiece that sums up the situation to post to the b3ta AV image challenge but as a new member it turns out I’m not eligible to post until Tuesday.

Oh well, it reduces the number of people who will doubt my mental age to the readership of this blog entry…

RHEL5 and ext4

Using RHEL5.5 in order to upgrade an ext3 volume to ext4:

  1. yum install e4fsprogs
  2. umount <mountpoint>
  3. tune4fs -O extents,uninit_bg,dir_index <device>
  4. e4fsck <device>
  5. mount -t ext4 <device> <mountpoint>