开发者

how to edit .globalpreferences.plist without logout and login?

I want to make a kiosk application on my Mac. I want to disable certain hotkeys which can be done by editing the .globalpr开发者_运维技巧efernces.plist file but it requires a re-login to the system which I do not want, similar to the System preferences application.

Thanks in advance,

Amit


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜