prevent users from closing/quitting stickies?

Discussion in 'macOS' started by jakeopolis, Sep 18, 2008.

  1. jakeopolis macrumors member

    Joined:
    Oct 27, 2007
    #1
    hey all,

    is it possible to prevent users without admin privileges from closing/quitting stickies? in that same vein, is it possible to prevent them from creating/modifying/moving stickies?

    thanks!
     
  2. Tallest Skil macrumors P6

    Tallest Skil

    Joined:
    Aug 13, 2006
    Location:
    1 Geostationary Tower Plaza
    #2
    You can't stop someone from quitting an app.

    The only thing you can do is disallow them access to the app with Parental Controls.
     
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    If you've got the Developer Tools installed and know what you're doing (if you don't don't even attempt this), then you could probably delete the Quit item from the menu :D
     
  4. jakeopolis thread starter macrumors member

    Joined:
    Oct 27, 2007
    #4
    hm, i figured as much.

    is there a way to create a script so that whenever stickies is quit, it automatically re-opens?
     
  5. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #5
    Something like:
    Code:
    while true; do if [ `ps -A | grep Stickies | grep -v grep | wc -l` != "1" ]; then open /Applications/Stickies.app; fi; sleep 10; done
    
    as a line entered into Terminal or as a shell script:
    Code:
    #!/bin/bash
    
    while true; 
      do 
        if [ `ps -A | grep Stickies | grep -v grep | wc -l` != "1" ]; 
        then 
          open /Applications/Stickies.app; 
        fi; 
        sleep 10; 
      done
    would start it up after at most 10 seconds of being down, for example. Just change the '10' to the max time you want it to be down (make it at least a second). This is a quick and dirty fix. You could run the script (make sure to make it executable with 'chmod +x scriptname') as part of the login sequence.
     
  6. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #6
    OK. Follow these instructions and Stickies.app won't be quitable. You can still use force-quit to kill it.

    1) Download the attached file.
    2) Extract it. You should have a file called MainMenu.nib
    3) Open the /Applications folder
    4) Right-click on Stickies.app and choose "Show Package Contents"
    5) Navigate Contents->Resources->English.lproj in the new window
    6) Create a copy of the MainMenu.nib file in there.
    7) Copy the one you extracted over the MainMenu.nib file.

    Done! This MainMenu.nib file is made from the one on my system (OSX 10.5.5) with the Quit item removed :D
     

    Attached Files:

  7. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #7
    There might be an easier way to achieve the desired result too. If you're just looking to have a message displayed at all times to users, then you can disallow changing of the desktop background and just set it to one which includes the information you want displayed. Probably much easier to implement than prevent Stickies from being quit (though the smart people who've already posted have shown some ways, none of them are foolproof apparently).

    jW
     
  8. jakeopolis thread starter macrumors member

    Joined:
    Oct 27, 2007
    #8
    whoa, thanks! that's exactly what i need. although there are still ways to quit, it disables the obvious (cmd-Q, file-->quit), and that should be enough. i'm not trying to be foolproof here.

    and mal, thanks for your suggestion. that was my plan as a last resort, but i find stickies jump out at the user more.

    thanks again guys.

    jake

     

Share This Page