[Kde-kiosk] Disallowing Multiple Opening of a Window

Adrian Snyman adrians at supply-chain.co.za
Tue Jul 27 08:13:16 CEST 2004


On Monday 26 July 2004 23:14, Waldo Bastian wrote:
> On Monday 26 July 2004 20:47, steve f wrote:
> > Is there something within KDe that will prevent me from starting more
> > than one instance of an application?
> >
> > I have an XTerm session that begins when you click an icon. Problem is, I
> > can't have multiple windows opening of this application because every one
> > you start takes another tty session on the server.  Is there anything in
> > KDE that will limit to one running session of an application when the
> > icon is clicked?
>
> No, not in general, but you could let the button run a small shell script
> that creates a file on startup, runs the xterm and deletes the file again
> when the xterm exits. At the start of the script you can then check if the
> file exists already and if so return directly without doing anything.
>

Yep .. a basic locking mechanism ..
You can touch a file in /var/lock ...
Only problem is that should the xterm / whatever terminate abnormally, you 
would have to delete the lockfile manually ..


-- 
Regards,
Adrian Snyman
Tel: (083)647-5299

/* Beat Me, Whip Me, Make me use Windows !! */

==================
The views expressed in this email are, unless otherwise stated, those of the author and not those of Supply Chain Services or its management.  The  information in this e-mail is confidential and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data transmitted electronically and to preserve the confidentiality thereof, no liability or responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted or does not reach its intended destination.


More information about the kde-kiosk mailing list