[FreeNX-kNX] Session resume with Windows client still problematic?

Sarah Katherine Hayes aleph.wintermute at ntlworld.com
Sat Feb 12 21:42:45 UTC 2005


Kurt Pfeifle wrote:

>On Saturday 12 February 2005 19:09, Sarah Katherine Hayes wrote:
>  
>
>>Warned ya 
>>    
>>
>
>Hehe... I didnt go hiding, because....
>
>...I must have been missing some mails from the list then, since
>I havent seen a mail from you prior to your last. 
>  
>
I am a lurker, I think I posted maybe twice since I joined when the list 
was announced.

>  
>
>>>>screeninfo=800x600x32+render
>>>>geometry=fullscreen
>>>>
>>>>The problem seems to be that the screeninfo doesn't match the geometry 
>>>>setting. When I change it (or get the little script to do it for me) to 
>>>>800x600 the session will quite happily resume... 
>>>>        
>>>>
>
>So you did attach that scriptlet onto your last mail? It may be of 
>help to more people until the bug is fixed properly.
>
>  
>
Fair point, I keep forgetting that people join/leave so might not have 
seen the original e-mail that had it in, originally posted by Rob Thomas.
I've attached it and also pasted in the contents incase the mailing list 
mungs up the attachements, instructions below in getting a cut n' paste 
job running.


Change the NXSessDir= bit to reflect where your session files are being 
kept. And I've had to insert a line break between "-f2)" and "for user 
$(grep", if you replace the linefeed with a space you should be hot to 
trot.
Mine is kicked off every 5min from cron, seem to work quite nicely.


#!/bin/bash
# Fixes the geometry parameter in the session file so that it can be 
resumed : workaround until session resuming is fixed
nxgeofixver=1.0
#echo nxgeofix v$nxgeofixver : Fixes the geometry parameter in the 
session file so that it can be resumed

NXSessDir=/usr/NX/var/db/running

for sessfile in $(ls $NXSessDir)
do
    [ $(grep -c geometry=fullscreen $NXSessDir/$sessfile) -ne 0 ] && 
line=$(grep screeninfo $NXSessDir/$sessfile|grep -v fullscreen) || line=""
        if [ X$line != X ]
            then
                    grep -v geometry=fullscreen $NXSessDir/$sessfile > 
$NXSessDir/$sessfile.tmp
                    echo geometry=$(echo $line|cut -d"=" -f2|cut -d"x" 
-f1)x$(echo $line|cut -d"=" -f2|cut -d"x" -f2) >> $NXSessDir/$sessfile.tmp
                    chown nx.root $NXSessDir/$sessfile.tmp
                    mv -f $NXSessDir/$sessfile.tmp $NXSessDir/$sessfile
                    echo $(date) $(echo $HOSTNAME|cut -d"." -f1) 
nxgeofix v$nxgeofixver : Fixed session $(grep sessionId= 
$NXSessDir/$sessfile|cut -d"=" -f2)
                    for user $(grep userName= $NXSessDir/$sessfile|cut 
-d"=" -f2) >> /var/log/nxgeofix
        fi
done
exit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nxfixer.gz
Type: application/octet-stream
Size: 442 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20050212/dce1d5a8/attachment.obj>


More information about the FreeNX-kNX mailing list