2

I found most of the below on https://discussions.apple.com/thread/3046230?start=0&tstart=0, but I believe it relates to OSX10.6 (or earlier) given that Mission control seems to have replaced expose and spaces.

I am looking to modify it to turn off all Mission Control functionality, if possible.

I tried to modify it to tell "Mission Control" preferences but couldn't even get that far (One of the errors was "Expected end of line but found application constant or consideration"), so hopefully someone with a better grasp of Applescript / the objects available in OS X 10.7 can help me out.

do shell script "defaults write com.apple.dashboard mcx-disabled -boolean YES"
do shell script "defaults write com.apple.dock workspaces -bool NO"

tell application "System Events"
      tell expose preferences
            tell spaces preferences
                  set spaces enabled to false
                  set spaces enabled to true
                  set spaces enabled to false
            end tell
      end tell
end tell

quit application "dock"
2
  • 1
    The first thing that jumps out at me is that you'll want to add quotation marks to the end the first two lines (do shell script "defaults write... YES", e.g.). See if that helps things a bit. Commented Sep 21, 2012 at 3:47
  • @NathanGreenstein - Hi, thanks, but during debug I had removed these lines and this didn't change the code line it complained about (My changed tell 'tell "Mission Control" preferences, which isn't shown, but was in place of "tell expose...")
    – user66001
    Commented Sep 21, 2012 at 12:04

2 Answers 2

2
+25

This disables the main Mission Control screen (⌃↑), but not spaces or the application windows screen (⌃↓). It also makes switching to a space with windows for an application stop working.

defaults write com.apple.dock mcx-expose-disabled -bool true
killall Dock

You can disable Exposé and Spaces by removing or disabling Dock. But it also disables full screen windows, the Notification Center sidebar, the application switcher, Launchpad, and Dashboard, and makes the desktop backgrounds gray.

2
  • 1
    Basically disabling Dock disables everything good in OS X. LOL
    – Shane Hsu
    Commented Jan 22, 2013 at 17:26
  • Hi Lauri - I was looking for an applescript to do this. Can you advise on this as well?
    – user66001
    Commented Jan 26, 2013 at 19:31
0

Try this:

do shell script "defaults write com.apple.dock mcx-expose-disabled -bool TRUE && killall Dock"
2
  • Welcome to Ask Different. We like answers to be more than just a single line. Ideally, you want to explain why your answer is *right." It also helps to provide links, citations, and/or screen shots. Please review our help section How to Answer on writing good answers to questions
    – Allan
    Commented Jul 22, 2016 at 13:55
  • ...To be deleted when Guest edits his/her answer... I believe Guest is addressing my comment to the other answer, requesting an AppleScript to do what user495470 provided in Console form.
    – user66001
    Commented Jul 22, 2016 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .