[FreeNX-kNX] some research on windows-linux session resumption

Sunil funtoos at yahoo.com
Fri Jul 29 18:27:58 UTC 2005


I did some further research on this.

there are two issues which stop windows session from
resuming on linux and vice-versa:

1. the no. of visuals don't match and hence this piece
of code returns FALSE:

./nx-X11/programs/Xserver/hw/nxagent/Display.c.orig:
1580

  if (i == nxagentNumVisuals)
  {             
    nxagentVisuals = newVisuals;
        
    return TRUE;
  }   
      
  free(newVisuals);
      
  return FALSE;

This problem can be solved by always starting the
sessions from windows and then resuming it from linux
or winows because in that case the #visuals will be
the lesser of the two (usually 4).

2. #bits in color spec don't match for any visual.
There are 8 significant bits in color spec on linux
xfree while only 6 for nxwin. The cygwin xfree has 8,
I don't know why nxwin reports only 6, whether its not
updated or whether its an inherant property of
windows, I don't know. So, the matching algorithm in
./nx-X11/lib/X11/VisUtil.c: 125 returns no matching
visual:

              if ((visual_info_mask &
VisualBitsPerRGBMask) &&
                (vp->bits_per_rgb !=
visual_info_template->bits_per_rgb)) continue;
    
              /* YEA!!! WE FOUND A GOOD ONE */

This problem can't be solved without either changing
nxwin or masking out the bits_per_rgb test by using
this diff:

$ diff Display.c.orig Display.c
1538c1538
<   unsigned long mask = VisualAllMask &
~VisualIDMask;
---
>   unsigned long mask = VisualAllMask & ~VisualIDMask
& ~VisualBitsPerRGBMask;

Is there anyone here who knows anything about nxwin
and the magic number '6' bits?

I will try the above and post back.

Thanks,
-Sunil


--- Sunil <funtoos at yahoo.com> wrote:

> Date: Thu, 28 Jul 2005 14:27:51 -0700 (PDT)
> From: Sunil <funtoos at yahoo.com>
> To: User Support for FreeNX Server and kNX Client
> <freenx-knx at kde.org>
> Subject: Re: [FreeNX-kNX] no connection with latest
> windows client
> 
> So, I took the bait and upgraded to 0.4.3. Things
> are
> much better. I can create sessions from windows as
> well as linux. Resume works most(failed one out of 5
> times) of the time from windows if the session was
> created from windows. Resume also works from linux
> if
> the session was created from linux. My requirement
> that I be able to resume sessions freely across
> windows and linux doesn't work.
> 
> The error message is: "Failed to restore all the
> required visuals. Can't resume the NX session on the
> display." This is the same message whether I try to
> resume windows created session on linux or linux
> created session on windows. Additional pain on
> windows
> is that nxwin just hangs after this message.
> 
> I did a quick check on the xdpyinfo of both the
> displays and found that session started from windows
> had 4 visuals and each had 6 significant color bits,
> while linux created sessions had 8 visuals and 8
> significant color bits.
> 
> I am attaching the diff of the two if somebody wants
> to analyze why it couldn't restore all the visuals.
> 
> I am back to square one with this.
> 
> Thanks,
> -Sunil
> 
> --- Fabian Franz <FabianFranz at gmx.de> wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Am Mittwoch, 27. Juli 2005 20:59 schrieb Sunil:
> > > Hi,
> > >
> > > I don't seem to be able to make a connection
> from
> > the
> > > windows client. I downloaded the latest client
> > from
> > > nomachine for Windows. I upgraded the OSS
> > components
> > > on the server to latest stable release and
> > upgraded
> > > the freenx to 0.4.2. When I try to connect it
> goes
> > to
> > > 'negotiating link parameters' and then it dies
> > with
> > > these details:
> > 
> > If you want to use 1.5.0 as backend use
> > freenx-0.4.3.tar.gz from 
> > http://debian.tu-bs.de/knoppix/nx/.
> > 
> > cu
> > 
> > Fabian
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.4 (GNU/Linux)
> > 
> >
>
iD8DBQFC6LrLI0lSH7CXz7MRArrcAJ4+poZ35AY7Mr9UXV7VGo6ClZ55aQCeOAut
> > 0K9J01lwMYEf3uI/OB94PQQ=
> > =6SbJ
> > -----END PGP SIGNATURE-----
> > 
> > _______________________________________________
> > FreeNX-kNX mailing list
> > FreeNX-kNX at kde.org
> > https://mail.kde.org/mailman/listinfo/freenx-knx
> > 
> 
> 
> 		
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  > _______________________________________________
> FreeNX-kNX mailing list
> FreeNX-kNX at kde.org
> https://mail.kde.org/mailman/listinfo/freenx-knx
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nx-visuals.diff
Type: application/octet-stream
Size: 3708 bytes
Desc: pat1218113271
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20050729/aa1b502f/attachment.obj>
-------------- next part --------------
_______________________________________________
FreeNX-kNX mailing list
FreeNX-kNX at kde.org
https://mail.kde.org/mailman/listinfo/freenx-knx


More information about the FreeNX-kNX mailing list