[FreeNX-kNX] Obtaining the X Windows ID of the NX window

Seb James seb at esfnet.co.uk
Wed Sep 26 08:29:30 UTC 2007


On Wed, 2007-09-26 at 09:27 +0200, Fabian Franz wrote:
> > Hi List,
> > 
> > An NX Client program is likely to want to manipulate the window which
> > appears on the screen. It might want to do this to dock the new window
> > in a tab of a tabbed window, for example.
> > 
> > This is quite easy to do, so long as you know the X window ID of the
> > window that you want to dock.
> > 
> > Unfortunately, I don't think the NX protocol returns this datum at
> > present.
> 
> No, it doesn't.
> 
> > As far as I can see from a quick look through the NX sources, it looks
> > like nxagent needs to report the X window ID back to nxserver, which can
> > then pass that information back down the nxssh channel in a message,
> > which could look something like:
> 
> You can also use the XPlugger and krdc approach and suck in the new window with the "NXAgent" / rdesktop title reference, which works to almost 100%. And works even more as you set the title with --title.

Crucially, this fails when you start a single application, rather than a
Gnome or KDE desktop, because in that case, the application sets the
title of the window, even if you specify a title.

> > NX> 999 X Window ID:2341
> 
> Don't like it.

> Better use a NX 728> X Window ID:2341, but I don't know if its already available at that moment.

Fine - I actually put 999 in there to say "some number which would make
sense within the NX numbering scheme".

> Another possibility was to pass a wid parameter to NXAgent to embed itself automatically ...

That's a good idea, too. This would be smoother and quicker, I expect.

> I would ask a feature request at NoMachine for such a parameter or at least discuss it with them. Perhaps they have already thought of a good way?

I don't they they are worried about managing the window created by the
NX session - it just appears and they allow the window manager to do its
best with the new window.

I opened a dialogue with them, we'll see what they come back with.

cheers,

Seb




More information about the FreeNX-kNX mailing list