Terminal-Server NX 2.0 “Free-Forever” Released

NoMachine has announced the release of version 2.0 of thei terminal-server product NX, codenamed “Free-Forever”.

They have released more of their products under GPL and provide now a restricted version under the codename “NX Desktop Server free-forever”:

NoMachine provides a free-for-download and free-forever NX Desktop Server which allows 2 user sessions providing access to any desktop or any network type.

The 2-user sessions should be quite sufficient for many purposes.

[Source: Golem.de]

WinXP: How to Deactivate the “Windows Genuine Advantage Tool”

To remove Microsoft’s new “Windows Genuine Advantage-Tool”, which in the current version will check the system’s license every day against a Microsoft database, simply remove the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\ CurrentVersion\WinLogon\Notify\WGALogon

Bugzilla: Upgrading MySQL Database from Latin1 to UTF8

IMPORTANT Update 2009-07-09: This information is already several years old! You should not use this information for modern versions of Bugzilla (3.2 and above), which will allow you to convert to UTF-8 using checksetup.pl.

In the present case, we have a Bugzilla database created with a charset of latin1. Unfortunately, now after updating MySQL to 4.1, error occured when trying to assign a new developer to a bug, indicating mismatch of collations (UTF-8 vs. Latin1). This is caused by the fact that there is now latin1-data stored in an UTF-8 table.

The following procedure can be used to upgrade the database to UTF-8, eliminating the problem:

  1. mysqldump -p --default_character-set=latin1 --skip-set-charset bugs > dump.sql
  2. mysql -p --execute="DROP DATABASE bugs; CREATE DATABASE bugs CHARACTER SET utf8 COLLATE utf8_general_ci;"
  3. mysql -p --default-character-set=utf8 bugs < dump.sql
  4. perl -pe 's/latin1_bin/utf8_general_ci/g; s/latin1/utf8/g' dump.sql > dump-utf8.sql
  5. mysql -p --default-character-set=utf8 bugs < dump-utf8.sql

You should of course always check if the Pearl-RegEx only replaced charset declarations and not some matches within the data.

Thanks to TextSnippets for the script.

DWR – Easy AJAX for Java

DWR is a really fantastic library for Java: it allows to write JavaScript applications in web browsers that will directly and almost transparently call Java-methods of objects that live in the Java-Servlet-Container (e.g. Tomcat) as part of the web-application.

Continue reading “DWR – Easy AJAX for Java”

KDE-Style Window-Movement on Windows

One of the minor features I admire most in the common X11-Window-Manager implementations on Linux is the fact that you can move and resize Windows easily without first moving the mouse to a special location of the particular window: Dragging your mouse while holding Alt+(Left-Mouse-Button) will move the window, holding Alt+(Right-Mouse-Button) will resize the window on its nearest edge.

I always missed this little feature when working on Windows. Today I found a script for AutoHotkey, which is a free (GPL) scripting environment for hotkeys. After installing AutoHotkey, simply download and launch the script by double-clicking it and now you’ll have the same behaviour for window movement and resizing as under KDE. Really cool!

AutoHotkey can do a lot more, unfortunately I have not yet had time to try out more.

Scuttle: Your Own Server-Side Bookmarks the del.icio.us’ Way

I have been using del.icio.us since I first heard about it (by reading an announcement of its acquirement by Yahoo!) and I have to confess I was taken by the approach. The only thing I didn’t like was the fact that I didn’t have my bookmarks and the service under control.

Thanks to a note by Erik I found out about Scuttle, an open source clone of del.icio.us which everyone can host on his/her own server. (Please note: scuttle.org only offers their public bookmarking service, the software can only be located at their SourceForge page.) Scuttle is written in PHP and requires MySQL as database backend.

Scuttle offers most of the features of del.icio.us and can even import your bookmarks from there. Some minor usability-issues still arise, but I can live with them. Their API is compatible to del.icio.us so most external del.icio.us applications will work with Scuttle, as long as the tools allow you to specify the URL of the service. Additionally, Scuttle provides three levels of visibility for your bookmarks: public bookmarks, shared with your watchlist (= your friends/colleagues), and private bookmarks.

I installed Scuttle at my company and everyone is busy using it and is happy to now having a central place to store their bookmarks. Del.icio.us was no option for us because all bookmarks are public there.

I can strongly recommend using this software to everyone who wants to have a centralized way for storing their bookmarks without giving away all controls over their bookmarks.

NewsForge has published a nice review of the software.

OpenVPN and Tap-Win32-Adapter Problem

OpenVPN on Microsoft Windows has a problem with the TAP-Win32-Adapter driver used for the tunnel. The device needs to be deactivated/reactivated after a Windows restart before any connection can be established. In this article I present a very simple script and solution for automating this process.

Continue reading “OpenVPN and Tap-Win32-Adapter Problem”

Gentoo: MySQL and PHP Charset Problems

At the moment, Gentoo is experiencing several inconsistency and problems with character sets between MySQL and PHP. This is primarely based on MySQL-4.1 now updating from 4.0 without warning and user interaction which most of the times breaks existing extended characters as MySQL now stores every dump from former databases as UTF-8, which is still badly supported by PHP.

For many PHP web applications which experience problems with extended characters (like umlauts, accents, …), the following hack might help.

  1. Locate the file where the mysql database connection is opened.
  2. Add the following commands after opening the database connection:
    mysql_query('SET character_set_client=latin1');
    mysql_query('SET character_set_results=latin1');
    mysql_query('SET character_set_connection=latin1');

This will resume using latin1 instead of UTF-8 for the connection and the result set. For performance reasons, the data in the database should then be stored as latin1 as well.

According to messages in the Gentoo Forum, the developers have now released an ebuild for PHP (both 5.x and 4.4.2) that will regard character-set settings in my.cnf in a section especially for php (still in unstable). You should use the section [php-cli], [php-cgi] and/or [php-apache2handler]. Unfortunately I have not yet had time to test this out.

Increasing Performance of VMWare Virtual Machines on External Devices

By default, VMware Workstation 5.x use a memory mapped file for backing the RAM of the simulated machines. This eases the pressure on the system’s page file. If you host the virtual machine on an external drive, however, this can become a bottle neck, especially if the external device is slow (e.g. USB 1.1, flash, etc.).

As described in this VMware Knowledge Base Article, you can turn of VMWare’s behaviour to use a memory mapped file and force it to use the system’s paging mechanism instead. To do so, you just have to add

mainMem.useNamedFile=FALSE

to your virtual machine’s configuration file (.vmx).

VisualStudio.NET: Text-Editor Guide at 80

Guiding lines in VS.NET 2005It is still considered good style to keep code-lines within a certain bound (e.g. 80 characters). IDEs like Eclipse offer to display a red guiding line at the chosen offset to help developers keep within this bound.

By modifying the registry a similar guide can be enabled for Visual Studio 2003 / 2005. Add a string value Guides to the key (VS.NET 2005, VS 2003 has version 7.1)

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor.

Set the value to

RGB(128,0,0) 80

To have multiple guides (like in the screenshot), add the additional columns space delimited, e.g.

RGB(128,0,0) 80 100

Ackn.: This information has been provided by Hannes Pavelka in Microsoft’s newsgroup microsoft.public.dotnet.languages.csharp, Message-ID: <e1jag7$qk7$02$1@news.t-online.com> (Article in Google Groups):