[FreeNX-kNX] running suspended?
Kurt Pfeifle
k1pfeifle at gmx.net
Fri Sep 30 12:42:04 UTC 2005
On Friday 30 September 2005 13:12, Kurt Pfeifle wrote:
> On Wednesday 28 September 2005 08:51, Dirk Mueller wrote:
>
> > I'm wondering if there is a way for an x application (say: kscreensaver) to
> > detect if it is running currently in a suspended (!) NX session.
>
> NoMachine NX servers keep track of the state of sessions in files
>
> /usr/NX/var/db/running/{running,failed,closed}/sessionID{......}
>
> FreeNX (recent versions) does it in
>
> /var/lib/nxserver/db/running/{running,failed,closed}/sessionID{......}
>
> However, these files are only accessible for user "nx" (permissions 0600)
> so I think this is ruled out for your purpose.
>
> Currently, probably the most simple test is to do an "echo $DISPLAY",
> and if it says a figure above 1000 ("unix:1011.0"), it is very likely
> you are in an NX session. However this is no certain thing -- this
> is a configurable option and is only true for default installations.
Stupid /me!
Of course, "unix:1011.0" and the like do not tell about suspended or
attached status of a session.
There is of course another directory, in the user's home that keeps
track of things:
$HOME/.nx/C-<hostname>-<display-no>-<session-id>/
Inside there, there is the "session" log file. It should record
something like
"Info: Session suspended"
as one of its last lines.
Cheers,
Kurt
> We would probably need a mutually agreed standard indicator for such
> a thing.
>
> It would be nice if KDE (or other desktops for that matter) would be
> aware of the fact that they are running inside an NX session, and
> modify some of their behaviour based on that knowledge. One thing that
> comes to mind immediately is a logout option that then includes
> termination or suspension of the NX session.
>
> > I'm kinda
> > annoyed seeing suspended NX sessions eating up CPU time because of a
> > screensaver that keeps nxagent busy.
>
> From what I guess this is less of a problem if you run the NX session
> in windowed mode: here you could switch off the screensaver for the
> NX session completely, and rely on the client's main window screensaver
> to cover the NX window too, right?
>
> For fullscreen mode, this will not work. As a workaround, you could
> try to switch back to windowed with [alt]+ctrl]+[f] whenever you leave
> your desk... but I'm sure you will find that annoying too.
>
> > Please CC, I'm not subscribed.
>
> Done.
>
> Cheers,
> Kurt
>
> _______________________________________________
> 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