views:

19

answers:

1

I want to make a kiosk application in mac. So, I want to disable certain hotkeys which can be done by editing .globalprefernces.plist file but it is requiring a relogin to system and I want to do it without relogin. Similarly as System preferences application do but programatically without pooping the system preferneces applicaiton.

Thanks in Advance Amit

A: 

You don't need to edit that file (and should not) to make a kiosk application.

See -[NSApplication setPresentationOptions]. This includes the following options:

   NSApplicationPresentationDefault                    = 0,
   NSApplicationPresentationAutoHideDock               = (1 <<  0),
   NSApplicationPresentationHideDock                   = (1 <<  1),
   NSApplicationPresentationAutoHideMenuBar            = (1 <<  2),
   NSApplicationPresentationHideMenuBar                = (1 <<  3),
   NSApplicationPresentationDisableAppleMenu           = (1 <<  4),
   NSApplicationPresentationDisableProcessSwitching    = (1 <<  5),
   NSApplicationPresentationDisableForceQuit           = (1 <<  6),
   NSApplicationPresentationDisableSessionTermination  = (1 <<  7),
   NSApplicationPresentationDisableHideApplication     = (1 <<  8),
   NSApplicationPresentationDisableMenuBarTransparency = (1 <<  9)

See also Guide to Creating Kiosks on Mac OS X. That discusses the Carbon API for kiosks (which may or may not be available in 64 bit, I didn't check), but there's a clear mapping onto the Cocoa API above.

Ken