All right, this post is just to stop somebody else’s suffering in figuring out why writing to stdin in QProcess on Version 3.3.x-8 of Q…/Free doesn’t work on Windows. Well, actually it works but just for the first line you write to stdin. There is a bug in qprocess.cpp at line 730:
void QProcess::writeToStdin( const QString& buf )
{
QByteArray tmp = buf.local8Bit();
tmp.resize( tmp.size() - 1 ); // drop the implicit \0
writeToStdin( tmp );
}
should be:
void QProcess::writeToStdin( const QString& buf )
{
QByteArray tmp = buf.local8Bit();
tmp.resize( buf.length() );
writeToStdin( tmp );
}
Verision 3.3.7-7 includes the latter method, same as the latest Qt 4.3 sources. So, it’s actually a regression in 3.3.x-8. If you require the latest Qt 3 / Q…/Free for your open source application and need to write to some other processes’ stdin, you can just use a wrapper workaround that uses the latter method and directly uses writeToStdin( const QByteArray& buf ) instead of the QString variant.
So Windows Vista finally allows to enable ClearType font smoothing for Remote Desktop / Terminal Services sessions.
If you try to connect to a machine running Windows Vista using rdesktop, you won’t get smoothed font typing since at the time of this writing rdesktop does not officially offer an option to control this feature. However, here is a workaround:
Continue reading ‘rdesktop: Connect to Windows Vista with ClearType font smoothing enabled’
Today I’m officially releasing my extended driver and mixer for the Wolfson WM8750 CODEC / sound chip that comes included in the latest Zaurus models.
The driver exposes the following new features:
- ability to set and control Treble, Bass and 3D stereo sound enhancement;
- ability to set and control various cut-off frequencies supported by the sound chip;
- output source selection (Autodetect, Internal Speaker, Headphone).
These features can be easily accessed via a Qt based mixer control app or directly via a /proc/driver/wm8750 kernel interface.

Both, the driver and the control app are available for Sharp ROM / Cacko ROM and pdaXrom beta 3 / pdaXii13.
Kernel patches are available for Sharp’s Linux kernel 2.4.20 and can be downloaded here:
http://www.katastrophos.net/zaurus/sources/wm8750mixer/
(No kernel 2.6.x support yet. Sorry folks.)
By default the audio driver is compiled into the kernel. Sharp didn’t compile it as module, so it can’t be easily replaced. Same goes for most third party ROMs. You’ll have to reflash your kernel to install the new driver.
In case you don’t want to roll your own kernel, I’ve made pre-compiled kernels available for all supported ROMs and models here:
http://www.katastrophos.net/zaurus/kernels/v55/
The control app and start up scripts are available as IPK here:
wm8750mixer_0.9_arm.ipk - WM8750 mixer for Sharp ROM / Cacko ROM
wm8750mixer_0.92_armv5tel.ipk - WM8750 mixer for pdaXrom beta 3 / pdaXii13
On a side note, we’ve been discussing the extended features of the WM8750 audio chip for quite some while in this thread over at the OESF forums. I have the feeling the driver and the Qt application have received a fair bit of testing. So, that’s why I am officially releasing it today.
As a follow-up to my previous post “SQLite performance tuning and optimization on embedded systems” here is a very basic patch that introduces support for timing SQL queries in the sqlite3 console shell.
SQLite 3.3.8:
Patch against shell.c shell.c
SQLite 3.3.9 CVS - shell.c rev 1.157:
Patch against shell.c shell.c
Two new shell commands are introduced in sqlite3:
.profile ON|OFF Turn profiling on or off
.timer start|show Measure elapsed CPU time
.profile ON will turn off output to stdout. Instead it will display CPU execution time for every SQL command processed.
Here is an example output:
sqlite> .profile on
sqlite> .read test1.sql
Exec time BEGIN; : 0.000 s.
Exec time DROP TABLE IF EXISTS playlist_view; : 0.020 s.
Exec time DROP TABLE IF EXISTS overview; : 0.000 s.
Exec time CREATE TEMPORARY TABLE playlist_view AS … : 0.180 s.
Exec time CREATE TEMPORARY TABLE overview AS … : 0.140 s.
Exec time SELECT DISTINCT genre, genre IN (”Progress… : 0.030 s.
…
Note: You can still override the output setting with the .output command after an .profile ON has been issued.
.profile OFF will turn off time-based profiling and reenable output to stdout.
.timer start will start a timer. You can execute a sequence of queries and then print the required CPU time via .timer show.
Use .timer start again to reset the timer. This .timer patch is based on SQLite ticket #1227 by Bartosz Polednia.
Timing is currently done using clock() which provides only a 10 ms precision for CPU time on most systems. This might be inadequate depending on your requirements. If you know a more precise way, please let me know.
Last weekend I had the pleasure (!) to install Tiger on an ancient PowerMac that doesn’t feature any DVD-ROM drive. I don’t happen to have the special CD-version of 10.4 and trying to boot from an external DVD drive somehow failed. However, this Mac already had Firewire, so here is a little hint on how to install Tiger using a spare Firewire drive:
First off, you’ll need psync. I’ve tried Carbon Copy Cloner, but for some reason that didn’t work.
So, if you have Fink installed, do this:
$ fink install psync
Format the Firewire drive with HFS Extended. You don’t need Journaling, so please disable it.
Now, assuming you’re Tiger Install DVD is mounted at /Volumes/Mac OS X Install DVD and your formatted volume is mounted at /Volumes/OSX, type this into your Terminal to clone the content of the DVD over to the harddrive.
$ sudo psync -d "/Volumes/Mac OS X Install DVD/" /Volumes/OSX
Finally make the whole copy bootable by blessing it:
$ sudo bless --folder "/Volumes/OSX/System/Library/CoreServices" --bootinfo
Now, you may unmount and install. Fin .
Since I’m in the mood to document various hardware modifications, here is a link for the archives:
http://www.katastrophos.net/macosx/9000pro-mod.html
This is a tutorial written in German for a mod I did way back. It describes how to modify the case of an Apple Cube to actually insert a better graphics card along with proper cooling of the components.
Much of the article deals with how to relocate the DC/DC board to the inside of the Cube to make way for the bigger graphics card. It goes on to describe how to modify the graphics card with a better heatsink. Finally, it shows how to cut the outer casing for proper cooling.
You might ask, why this is called Biohazard mod. Check out this and that.
So, finally as promised, here is my short picture walkthrough on how to do the Mac Mini external SATA hack.
I’ve added quite a few comments to the images.
And before you start complaining about the bad picture quality, I’ve shot the whole procedure with my non-HD DV cam, sorry. The pictures are from several takes, so they might differ at some stage.
Anyways, just click on the first image below to start the slide show - navigate by clicking the left or right side of the photo.
I hope you like it and please leave me a comment afterwards. Thanks!
Continue reading ‘The Mac Mini external SATA hack’
Comments
David, duplicity broken pipe, Mike, maximus, Mark, Mike
Ted, Ted, Emmanuel, Meme, Lara Boons, stwoods, NeoBetas, Dalain, Axely, sofiaa [...]
matthis, Andre, matthis, Andre, JB, slewis69au, sofaraway2us2, JavaHack, AGAWA Koji(atty), wirelessdreamer [...]
Keith Wedinger, Gregory Robinson, Carl Carter-Schwendler
Luís Miranda, Mico, Sriram M, Andrew Ferguson, Carl Stephenson, Todd, chencho, Morgan, Ryan, Ryan [...]
Meme