<br><tt><font size=2>Marco Passerini <marco.passerini@csc.fi> wrote
on 13/05/2011 09:32:56:<br>
> Hi,<br>
> <br>
> Look at this:<br>
OK  ;-)</font></tt>
<br><tt><font size=2>> <br>
> ### fresh session ##<br>
> $ echo $XAUTHORITY<br>
> /home/myusername/.xauth6GGIy3<br>
</font></tt>
<br><tt><font size=2>So that's your cookie file for this session . . .</font></tt>
<br>
<br><tt><font size=2>. . . it is named differently from the previous one,
so it is probably</font></tt>
<br><tt><font size=2>a computed "random" filename, but it might
relate to something else.</font></tt>
<br>
<br><tt><font size=2>I don't know why this is being done, or what is doing
it, so you will</font></tt>
<br><tt><font size=2>need to search it out yourself, in lieu of anyone
else helping.</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ ls -a | grep xauth<br>
> .xauth6GGIy3<br>
> <br>
> $ cat .xauth6GGIy3<br>
> myhostname.com/unix:10 MIT-MAGIC-COOKIE-1 **cookie**<br>
> localhost.localdomain:1000 MIT-MAGIC-COOKIE-1 **cookie**<br>
> myhostname.com/unix:1000 MIT-MAGIC-COOKIE-1 **cookie**<br>
</font></tt>
<br><tt><font size=2>Is it a text file or did you filter the output.</font></tt>
<br><tt><font size=2>What does</font></tt>
<br><tt><font size=2>        file /home/myusername/.xauth6GGIy3</font></tt>
<br><tt><font size=2>output ??</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ xauth  -f ~/.xauth6GGIy3 list<br>
> myhostname.com/unix:10 MIT-MAGIC-COOKIE-1 **cookie**<br>
> localhost.localdomain:1000 MIT-MAGIC-COOKIE-1 **cookie**<br>
> myhostname.com/unix:1000 MIT-MAGIC-COOKIE-1 **cookie**<br>
> <br>
> $ ls -a | grep Xauth<br>
> .Xauthority<br>
> <br>
> $ cat .Xauthority<br>
> [empty]<br>
> <br>
> $ xauth  -f ~/.Xauthority list<br>
> [no result]<br>
</font></tt>
<br><tt><font size=2>That isn't your cookie file . . . .</font></tt>
<br>
<br><tt><font size=2>> <br>
> <br>
> ### restored session ###<br>
> <br>
> $ echo $XAUTHORITY<br>
> /home/myusername/.xauth6GGIy3<br>
> <br>
> $ ls -a | grep xauth<br>
> [no result]<br>
</font></tt>
<br><tt><font size=2>It's been cleared . . . </font></tt>
<br>
<br><tt><font size=2>FreeNX runs</font></tt>
<br><tt><font size=2>        xauth remove</font></tt>
<br><tt><font size=2>on its display.</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ ls -a | grep Xauth<br>
> .Xauthority<br>
> <br>
> $ cat .Xauthority<br>
> [empty]<br>
</font></tt>
<br><tt><font size=2>You do have write access to</font></tt>
<br><tt><font size=2>        ~/.Xauthority</font></tt>
<br><tt><font size=2>don't you ??</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ xauth  -f ~/.Xauthority list<br>
> [no result]<br>
</font></tt>
<br><tt><font size=2>This hasn't been written back out !!</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ xauth list<br>
> xauth: creating new authority file /home/myusername/.xauth6GGIy3<br>
</font></tt>
<br><tt><font size=2>It will say this if the file is non existent or empty.</font></tt>
<br>
<br><tt><font size=2>It won't actually create an empty one tho', if there
isn't one.</font></tt>
<br>
<br><tt><font size=2>> <br>
> $ ls -a | grep xauth<br>
> [no result]<br>
> <br>
> <br>
> So... apparently .Xauthority do not have any function, the only cookie
<br>
> file used is .xauth**code**. Once I suspend the session the cookie
is <br>
> removed and it's not generated anymore.<br>
</font></tt>
<br><tt><font size=2>Yup</font></tt>
<br>
<br><tt><font size=2>> <br>
> I made a backup of the cookie before suspending the fresh session,
and I <br>
> restored it once the session has been restored. Once the cookie is
back <br>
> in place, it works! I can open new windows and everything works fine!<br>
</font></tt>
<br><tt><font size=2>Yup</font></tt>
<br><tt><font size=2> <br>
> I see now where the problem is... but, how could I fix it ? Does FreeNX
<br>
> have problems with the fact that the cookie is called .xauth*code*
and <br>
> not .Xauthority? Or is the issue somewhere else?<br>
</font></tt>
<br><tt><font size=2>FreeNX its-self uses the one in</font></tt>
<br><tt><font size=2>         .nx/C-machine-port-session-no/authority</font></tt>
<br><tt><font size=2>but</font></tt>
<br><tt><font size=2>it doesn't set</font></tt>
<br><tt><font size=2>         $XAUTHORITY</font></tt>
<br><tt><font size=2>so</font></tt>
<br><tt><font size=2>your session and apps etc. normally use the default,</font></tt>
<br><tt><font size=2>unless</font></tt>
<br><tt><font size=2>something else sets it.</font></tt>
<br><tt><font size=2>but</font></tt>
<br><tt><font size=2>FreeNX "should" write the contents of its
own cookie file out to</font></tt>
<br><tt><font size=2>        ~/.Xauthority</font></tt>
<br><tt><font size=2>(and then it merges back I think, but I haven't followed
it all through</font></tt>
<br><tt><font size=2>and nothing gets merged on my systems)</font></tt>
<br>
<br>
<br><tt><font size=2>I'm not quite sure what your setup or fluxbox are
doing . . . .</font></tt>
<br>
<br><tt><font size=2>You could try a bodge overwrite of XAUTHORITY in your
fluxbox</font></tt>
<br><tt><font size=2>launcher script </font></tt>
<br><tt><font size=2>but,</font></tt>
<br><tt><font size=2>my advice is (FWIW) is</font></tt>
<br><tt><font size=2>grep to find where your XAUTHORITY is computed and
set</font></tt>
<br><tt><font size=2>and then</font></tt>
<br><tt><font size=2>try hard clearing it,</font></tt>
<br><tt><font size=2>eg</font></tt>
<br><tt><font size=2>        unset XAUTHORITY</font></tt>
<br><tt><font size=2> so the default is used.</font></tt>
<br>
<br><tt><font size=2>Then TEST everything, because there may be other implications</font></tt>
<br>
<br><tt><font size=2>Let us know if you find anything out about it.</font></tt>
<br>
<br><tt><font size=2>cb</font></tt>
<br>