Posted by George Wright
Sun, 27 Jan 2008 22:36:00 GMT
A picture says a thousand words:

QtNX on Windows
OK, so I cheated a little and this is actually using the Cygwin packaged XWin server, but it’s a significant step. Now I just need to write a few functions to invoke NXWin.exe and setup the relevant Xauthority file, then it should be pretty much finished!
Posted in NX | 5 comments
Posted by George Wright
Sun, 27 Jan 2008 00:08:00 GMT
Edit
These instructions have been confirmed not to work. While they may allow NXWin to compile, the buildsystem fails with lots of linker errors… Still scratching my head about how to fix this, but for now I’ve contacted NoMachine about it.
It turns out NXWin isn’t set to compile by default on Cygwin. Anyway, I finally managed to get it to compile inside the nx-X11 tree with a little patching to the source code, and I figured I’d better blog about it for anyone else who is interested in this, and also so that in the inevitable outcome where I forget how I did it, I can fall back on this blog.
First off, you need to edit config/cf/host.def and set the following:
#define NXWinServer YES
#define XWinServer YES
The XWinServer define is probably not needed, but as this machine’s quite a slow compiler I’m not going to change it and see, as contrary to popular belief I don’t like sitting around watching stuff compile.
However, the real fun starts when trying to compile NXWin itself. Turns out it’s broken - I have no idea why, or even how NoMachine themselves compile it, but I had to patch a few lines in various files before it would compile.
The following are the changes I made in programs/Xserver/hw/nxwin:
NXwindow.c:3537
Line should be:
pWin = SaveSetWindow(client->saveSet[j]);
NXdispatch.c:228-229
Lines should be:
volatile char dispatchException = 0;
volatile char isItTimeToYield;
NXdispatch.c:871
Line should be:
result = AlterSaveSetForChildren(client, pWin, stuff->mode, FALSE, TRUE);
NXevent.c:215
Comment out the struct for HotSpot
winmsg.h:74
Comment out the enum for MessageType
You can then just go ahead and compile with make World.
Most of the inspiration for these little patches were taken from the dix/ server.
This, obviously, isn’t ideal, but there’s a dire lack of any documentation for NX on Windows. I know that NoMachine use Cygwin to compile their stuff, but it all seems very hacky (which, to be honest, is the general impression I get of Cygwin) and unpolished.
If anybody who actually knows how to build the NX packages on Windows is reading this, if they could contact me and let me know what the preferred method of compiling NX’s open source components is I’d be most grateful.
Posted in NX | 1 comment
Posted by George Wright
Mon, 21 Jan 2008 21:22:00 GMT
So in the process of learning about cygwin/mingw/qt in order to port qtnx to Windows, I concluded that the easiest way would be to compile nxcl using cygwin (which, luckily, compiled with no changes at all), and then to compile Qt inside cygwin and then compile qtnx inside cygwin, linking to both Qt and nxcl.
Turns out getting Qt 4 to compile inside cygwin is a non-trivial task. Thankfully, however, the LyX guys have done most of the work. It just needed a minor alteration to the source, though, otherwise a linker error occurred during compilation of Qt/Win 4.3.3.
In src/corelib/codecs/qtextcodec.cpp, there is an #ifdef block starting on line 528. You just need to add
&& !defined(Q_CYGWIN_WIN)
to stop the Asian codecs from being compiled in; there’s probably a better solution to this, but I don’t see this as being particularly problematic. After that you can follow the instructions in the LyX wiki and link to Qt just fine.
From this you can probably tell that I now have QtNX compiling inside cygwin on Windows. Well, yes, it works, but I haven’t yet tested whether it will actually connect to any servers. Theoretically, it should so long as I set the PATH properly to point to the directory where nxssh and nxproxy are, and hopefully all should just work fine! I may need to append “.exe” to the binary names in nxcl though, but all in all I think it should be fairly trivial from now on (so long as nxproxy behaves as expected and doesn’t start making annoying noises about X11 and Win32).

Gratuitous QtNX on Windows screenshot
Posted in Computing, NX | 6 comments
Posted by George Wright
Tue, 08 Jan 2008 07:41:00 GMT
I must say that I’m very impressed with Trolltech’s attention to detail for their cross platform work; qtnx compiled (almost) without a hitch on OS X. After hacking around a few build system problems and linking issues, I managed to get qtnx to compile and link (it took ~5 minutes!), producing this particularly nice result:

QtNX on 10.4.11 (Intel)
I’m having a bit of trouble with working out how to create a sensible buildsystem for the Mac. If anyone’s got any experience with qmake on OS X then please drop me a line; in particular, I’m looking out for ways in which qmake can define what platform I’m on so I can have #ifdef’d sections of code for each platform, as well as using things like pkg-config on platforms where it exists and whatever equivalent there is on OS X. In fact, hooking qmake into Xcode for this could be ideal.
I haven’t tested if this actually connects yet; I haven’t got round to compiling the open source NoMachine dependencies (nxproxy, nxssh, nxcompsh) but it shouldn’t be too hard to get it all working nicely (I hope!).
Posted in NX | 8 comments
Posted by George Wright
Fri, 04 Jan 2008 15:39:00 GMT
Today I start working for DeFuturo Ltd on creating a cross platform NX client (GPL, of course) in Qt for their Desktop on Demand service. I must say I’m really happy to be working again on C++/Qt as GTK was starting to get to my head a bit!
The ultimate goal of this project is to create a cross-platform client which can execute directly after downloading without the need to install it anywhere. However, at the moment I’m simply working on getting an open source client working for Linux, OS X and Windows.
Yesterday I committed a version of QtNX that I’ve been hacking for the past couple of days which has now had its backend code updated to use Seb James’ nxcl client library instead of my ageing nxclientlib. I have confirmed that this works with nxproxy 3.1.0 and nxssh 3.1.0 for connecting to a NX 1.5.0 server, and I assume it works with NX 2.x and 3.x servers as well, but I don’t have access to any for testing at the moment. I will be working over the coming weeks on getting this to work with OS X and cygwin on Windows, as well as hopefully doing some code cleanups at the same time.
All in all, I’m very pleased with this work and this should lead to some very nice and exciting changes in the NX client world!
Posted in KDE, NX | 4 comments
Posted by George Wright
Mon, 17 Dec 2007 17:27:00 GMT
Tickets arrived today for Edinburgh for the KDE GB AGM at Jonathan’s flat over the New Year! Woo!
I’m taking the new National Express service, as they took over the East Coast Main Line from GNER this month; in the little propaganda brochure they sent with the tickets it states that they have now extended the free wireless internet for standard class passengers as well - kudos to National Express for this!
Will be arriving at Edinburgh Haymarket around 1800 on the 31st; if anyone is arriving around the same time, do let me know.
Posted in KDE | no comments
Posted by George Wright
Tue, 11 Dec 2007 19:35:00 GMT
Now that they’ve released the Nokia N810 in the UK, I ordered one yesterday and it arrived this morning; hurrah for prompt delivery!
My initial impressions are mixed.
Good things:
- the screen is fantastic
- it came with maps for the GPS for free
- it has a keyboard
- it’s responsive
- it’s nice and small
Not so good things:
- the battery cover is incredibly hard to take off
- the battery doesn’t clip in - it just sits there and is held in place by the cover
- the GPS takes ages to lock
- the keyboard feels a bit mushy, and the top row is hard to type on
Anyway, I’ve now installed Maemo Mapper which works like a charm (a bit of hackery is needed to get the internal GPS to work with it though), and ssh from xterm is very usable with the new keyboard. Haven’t installed our WebKit stuff on it yet, but the Gecko-based MicroB engine isn’t too bad.
Overall a very nice piece of kit, and I’m very pleased with it.
Posted in Computing, WebKit | 6 comments
Posted by George Wright
Fri, 23 Nov 2007 00:32:00 GMT
Now that I have a KDE 4 environment that I’m willing to use, I thought I’d take a look at Trolltech’s WebKitKDE KPart for embedding WebKitQt into Konqueror (or any other application which supports KParts).
Unfortunately, it seems that the project has been stagnant for a while and had bitrotted to the extent that it no longer compiled. I have now committed a fairly trivial fix that lets it compile and load, but it’s still in a fairly broken position. Hopefully I’ll be able to find some time to look into it more closely and potentially sort a few things out.
Now for the gratuitous screenshot:
Posted in KDE, WebKit | 4 comments
Posted by George Wright
Thu, 22 Nov 2007 21:17:00 GMT
As I’ve heard so many great things about zsh I decided to give it a spin and I must say that I’m quite impressed on the whole. I especially like the less intrusive way it displays possible tab completion values, as well as the vi keybindings that come with it (although I’ve had to bind a few keys which I keep hitting out of habit, such as end/home and delete). The configuration system it brings up on first load is really spiffy as well, and I like the fact that there’s an option to append command history to the log file instead of replacing it - extremely useful given that I tend to have ~10 terminals open at any one time.
I also finally got round to building a more up to date copy of KDE 4 and I’m really impressed with the progress they’re making; it really is astounding how quickly it’s all coming together. I’m currently in the process of installing an SVN build on my X40 so that I can run it full time on there - I think it’s finally hit the stage where I can run it full time.
Posted in KDE, Misc | 3 comments
Posted by George Wright
Tue, 13 Nov 2007 20:19:00 GMT
With the recent announcement of the Google Android mobile phone and the subsequent release of their SDK, I couldn’t resist downloading it and giving it a play.
First thoughts are very positive; the user interface is clean, uncluttered and I think it makes good use of the screen space. One of my favourite gems is the iPhone-like scroll bar mechanism, which only appear when you’re actually scrolling and disappear, thus not wasting a valuable column of pixels on needless information!
As anticipated, there are still a few rough edges, but as it’s still very early on this isn’t surprising. Nonetheless, I’m very impressed with their SDK (which is only a 55MB download!) and I hope to have a look at the actual APIs soon. Hopefully some day I’ll be able to put this on the HTC Universal!
In unrelated news, a Google Summer of Code 2007 shirt arrived for me at home today; thanks Google!
Posted in Computing, Misc | 2 comments