[Kde-kiosk] Autologout feature
l.lunak at suse.cz
Mon Aug 15 16:58:20 BST 2005
On Saturday 13 of August 2005 17:55, Martijn Klingens wrote:
> On Saturday 13 August 2005 15:21, Friedrich W. H. Kossebau wrote:
> > Am Samstag, 13. August 2005 11:12, schrieb Martijn Klingens:
> > > On Saturday 13 August 2005 00:39, Jonathan Chen (jonachen) wrote:
> > > > > Since KDE 3.4 it is possible to automatically logout users that
> > > > > have been idle for a certain period of time.
> > > > >
> > > > > WARNING: Be careful with this option, logging out a user may
> > > > > result in dataloss!
> > > >
> > > > How does it cause dataloss? I assume it can be caused if someone
> > > > did save their work and you logged them off?
> > >
> > > I assume you mean "did *NOT* save their work", and if so: yes, that
> > > will be the cause of dataloss.
> > There used to be support for automatically saving unsaved stuff within
> > the session management. Can anybody tell why this was removed? Because
> > the user could start another dm-type session (say, windowmaker) or non-X
> > logins and have the synchronisation broken this way?
> I didn't even know we have ever had this feature... But I guess the answer
> lies on core-devel or a similar list and not on the Kiosk list, so
> cross-posting there. :)
XSMP, the protocol for session management, has 2 types of asking the
application to save its data, global and local (3 actually, also these two
together). If you look at the description of the SaveYourself request
(http://netmirror.org/mirror/xfree86.org/4.1.0/doc/xsmp.TXT, grepping for
'processor' will go right to an example), global means saving the data, more
or less like when quiting the application, while local means saving all the
application's state temporarily, somewhere, without affecting the actual
QApplication::commitData() corresponds to global saving,
QApplication::saveState() to local saving. However Qt's docs on this are
rather vague and I bet nobody actually knows this. At least I'd bet I
wouldn't have trouble finding apps that mix this randomly, and I don't think
there's any KDE app that saves its documents to a temporary file for local
saving. It used to work in KDE1 though IIRC.
And for these reasons ksmserver supports only the simplest
save->logout->login->restore way of working, because anything like
checkpoints wouldn't work anyway. Hell, we still have apps that cannot handle
even this properly.
If you wanted to implement this, I think the ksmserver part should be rather
simple, there's already some kind of support for it anyway. And it would let
you close #60894 ;). The harder part would be making this actually useful for
And also there'd be a small nuisance that'd probably need solving somehow
about the fact that ksmserver tells apps to do local save right after they
start, as that as a side-effect also tells ksmserver some info about the
apps. Making all apps save to temporaries right during KDE startup would be
SuSE CR, s.r.o. e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27 tel: +420 2 9654 2373
190 00 Praha 9 fax: +420 2 9654 2374
Czech Republic http://www.suse.cz/
More information about the kde-core-devel