Archive for the 'Windows' Category

Q…/Free: Bug in QProcess writeToStdin

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.

rdesktop: Connect to Windows Vista with ClearType font smoothing enabled

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’

duplicity 0.4.2 on Cygwin

Ben Escoto has released version 0.4.2 of duplicity. My previous patch for version 0.4.1 already included most of the changes in 0.4.2.
For the sake of completeness, here is my updated patch bundle which adds Cygwin / Windows support and fixes some problems in the FTP backend:

http://savannah.nongnu.org/download/duplicity/duplicity-0.4.2.tar.gz

To install it you’ll need the same prerequisites as for rdiff-backup, most notably librsync. Please refer to these instructions on how to install it.
Additionally you should install the Utils/gnupg package in order to get the encryption working.
Here is how to compile and install duplicity:

Continue reading ‘duplicity 0.4.2 on Cygwin’

Workaround for broken Windows Sharing on Intel OS X

So, it seems Apple broke Windows Filesharing / Samba with the 10.4.5 update on Intel-based systems. Windows clients are unable to connect to OS X shares, because the server refuses the password.
There are several threads describing the issue in detail:
http://www.123macmini.com/forums/viewtopic.php?t=4555
http://discussions.apple.com/thread.jspa?threadID=401714&tstart=0

Here is a temporary workaround for the problem:
You’ll have to change the authentification settings on your XP/2k box and here is how to do that:

Start -> Run “secpol.msc”
In the tree open and click Security Settings -> Local Policy -> Security Options
Scroll the left pane down to ‘Network Security: LAN manager authentication level’
Change this to ‘Send NTLMv2 response only’

It works for me. Please let me know, if it works for you too…

Update: Apple has released OS X update 10.4.6 which resolves this problem.

Docks…

I am lazy - very lazy. ;)
That’s also why I can’t stand the default Windows ways of starting applications, ie. Start -> Programs or Quicklaunch bar. Either too many clicks or extreme cluttering.

Having said that, I’ve been a long time user of Y’z Dock, an abandoned implementation of an OS X-like Dock for Windows. Of all the Windows Dock’s out there it came closest in terms of imitating the original behaviour. I guess that’s also the reason why Apple pulled it via DMCA/C’n'D. ;)
Anyway, since Y’z Dock is no longer maintained and there are still some bugs in that software, I was looking for alternatives. Here is what I found: MobyDock, ObjectDock, RK Launcher and RocketDock. There is also AquaDock, but that’s just a repack of Y’z Dock.

RK Launcher has some potential to it, but also way too many bugs. I wasn’t able to access the website, so perhaps the program is pulled, too.

I’ve tried both MobyDock and ObjectDock several times in the past and didn’t like them at that time. This hasn’t changed and I won’t go into detail as to why. It’s really way too subjetive and I don’t want to start a flame war. ;)

So, finally, I’ve settled with RocketDock. It’s faaast and provides instant access to my program shortcuts even under heavy load. That’s what I missed in Y’z Dock. When Y’z Dock was autohidden, it also reduced the process working set size via a nice trick. This is a good thing in low memory conditions since this tells the virtual memory manager it can swap out most parts of the app. However, it can also impose serious delays in feedback. And instant feedback is what I was looking for.
RocketDock offers this, but at the price of higher memory utilization - ~10 MB in my case. I think this is still acceptable for the performance and my Subjective Productivity Boost TM, therefore.
So, now what was left to do was to migrate the dock items from Y’z Dock to RocketDock. Sadly, there is no way to import the itemlist.ini into RocketDock - at least I didn’t see it. ;)

So, being lazy and not wanting to recreate each and every icon manually on several boxes (repitition is harmful TM), I had to come up with a better solution.

And here it is: YzDock2RocketDock (binary and Delphi sourcecode included)

Simply extract the binary to a new folder and copy your itemlist.ini file from your Y’z Dock program directory into that same folder. Make sure to quit RocketDock and backup the registry key \HKEY_CURRENT_USER\Software\RocketDock-v0.9.4 before.
Now, running the binary should import the contents of itemlist.ini into the registry. It will not overwrite any existing items. Instead it does append the imported ones to the existing items.
Finally, make sure to copy all icons over to your RocketDock program directory. Put them into the subdirectory “Icons”. That’s it. Enjoy! :)

Duplicity

Update 1: I’ve posted updated instructions for version 0.4.2 of duplicity here.

As a follow up to my previous article on rdiff-backup, I’ve patched duplicity to work correctly on Cygwin.
To install it you’ll need the same prerequisites as for rdiff-backup. Additionally you should install the Utils/gnupg package in order to get the encryption working.
Here is how to compile and install duplicity:

Continue reading ‘Duplicity’

“Destroy Erase Improve”

For some strange reason this title of a Meshuggah album seems to perfectly fit as description for the normal life cycle of a Windows installation on my PC.
A month ago a problem started to crop up out of nowhere: The boot process would take 3 minutes on average, instead of the usual ~40 seconds. This weekend I finally couldn’t stand it anymore waiting for that darn machine to boot up. So, I tried to debug the problem with various tools. Microsoft Bootvis couldn’t trace it, so couldn’t the others. After some useless attempts at deinstalling several drivers, I figured out it might be the graphics driver. So, I deinstalled the ATI driver with the Catalyst Uninstaller that ATI provides. I also made sure to clean the registry of any relics. Restarted the system and - tada - no more boot delay, albeit this time with the standard VGASave driver. Finally, I reinstalled an older known-to-work version of the Catalyst drivers. And there it was again, argh…
So, what really strikes me is that although I’m developing for Windows and have been using it for several years, I still have no clue what all the driver fuss in the registry is about. It’s just confusing to debug problems like that. Whereas in OS X or Linux things seem to be so much clearer. No registry magic, clean structured boot-up process. Actually, when my Linux distribution or OS X are booting, I know what they do and I know how to alter that start process. In contrast, I know exactly nothing about the Windows boot process. Well, there are options for logging various things but it all seems so awkward.
So, here I go again - reinstalling the system to get rid of just a single simple annoyance… :(
I guess I’m not the only one with that problem or perhaps I’m already too accustomed to the Unix/BSD/Linux way of doing things… Who knows! :)

rdiff-backup on Windows

rdiff-backup is a very handy utility to effectively create and manage incremental file backups. Most modern GNU/Linux distributions offer rdiff-backup as installable package. Sadly there is no easy to install version available for Windows.
So, here is a short guide:
Continue reading ‘rdiff-backup on Windows’