[FreeNX-kNX] Resuming suspended sessions : Still not working]
Fabian Franz
FabianFranz at gmx.de
Thu Jan 27 04:47:15 UTC 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Mittwoch, 5. Januar 2005 14:45 schrieb Rob Thomas:
> Hi Rick,
> I've knocked up a workaround script until this suspend\resume bug is
> fixed. You will need to cron to run quite frequently, think we're
> running it every 5 minutes. I'm not a scripting expert btw.
>
> *****************************
> #!/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=/var/lib/nxserver/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.nx $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
> *****************************
Hi,
as you seem to know your bash-programming:
Why don't you implement this code directly in the session_list_user_suspended
function in nxserver. Then you don't need to run a cron job.
If you find out, what I'm doing wrong, I would be much grateful about a patch.
cu
Fabian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFB+HJWI0lSH7CXz7MRAvDOAJ0egMtIiUsd1avbYkWnxu93RSn1OQCePBbF
4rt+XBiMearY1rD9cHSmRtE=
=XBJN
-----END PGP SIGNATURE-----
More information about the FreeNX-kNX
mailing list