'Singleton' application - or let the user only launch one instance of a program at the time
        Posted  
        
            by 
                Disco
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Disco
        
        
        
        Published on 2011-02-28T22:58:21Z
        Indexed on 
            2011/02/28
            23:26 UTC
        
        
        Read the original article
        Hit count: 286
        
I'm running a few linux desktops; mainly for kids (yeah, trying to teach them the right OS at early stage) (running Ubuntu 10.10, Gnome)
The problem is that they found very funny to make their workstations (actually, old 512 Mb pentium 4) by launching thousands of firefox instances.
I'm looking for a way to restrict them to launch 'N' instances of a particular application. Haven't figured yet how. Thought of a monitoring daemon but I think that would be too ressources hungry.
Any idea of a script/trick to achieve this ?
Note: i might have 1-2 level of users (the kids, and the more grown up kids) so i have also to limit per user; something like user1: 3firefox, user2: 2firefox instances.
© Server Fault or respective owner