Skip to main content
Answer

Desktops are driving me mad.....

  • September 12, 2012
  • 13 replies
  • 44 views

rob_potvin
Forum|alt.badge.img+26

In 10.7 does anyone know where the number of desktops you have is located?

I mean I disabled mission control about a month ago but some students had already 50+ desktops, now it is disabled but they still have every desktop that they created and they can't delete them. I have teachers asking can they be deleted so they have one desktop and fullscreen apps but I can't find that anywhere? I would like to either just delete that preference file or use profiles or MCX to fix that...

Anyone know where that is located? Tried using composer and a few other tricks I know by just adding desktops and such then see what changes and well nothing does or that I can find.

Thanks

Best answer by jarednichols

Try killing ~/Library/Preferences/com.apple.spaces.plist

13 replies

Forum|alt.badge.img+24
  • Valued Contributor
  • Answer
  • September 12, 2012

Try killing ~/Library/Preferences/com.apple.spaces.plist


rob_potvin
Forum|alt.badge.img+26
  • Author
  • Employee
  • September 12, 2012

solved

com.apple.spaces.plist

stupid!!!!


rob_potvin
Forum|alt.badge.img+26
  • Author
  • Employee
  • September 12, 2012

Just found it ! 2 seconds after I posted


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • September 12, 2012

You may want to start by looking at the com.apple.spaces.plist and com.apple.loginwindow.plist files., both in the user home directory to start. I see references to spaces in both of those files, but I'm not sure of the exact method removing spaces from them.

Edit: Ah I see you got it.


Forum|alt.badge.img+18
  • Valued Contributor
  • November 16, 2012

Does anyone have instructions on how to do this? I was attempting to add a policy and on the Advanced tab and utilize either the "Search for file by path" and delete it, or "Search for process" and kill it. No process kicks off that I can tell, and so far I've only been able to delete a specific user's com.apple.spaces.plist file, such as /Users/administrator/Library/Preferences/com.apple.spaces.plist
This area of the JSS doesn't seem to play nice with the ~/Library/Preferences/com.apple.spaces.plist location.
Are you running a script to do this? An MCX?


Forum|alt.badge.img+24
  • Valued Contributor
  • November 16, 2012

If you run it as a login triggered policy, you should be able to do

rm /Users/$3/Preferences/com.apple.spaces.plist

in the advanced tab of your policy with the "run command" field. You may need to kick the Dock as well though so that Dock will re-create the plist after it's been deleted. It would be something like

rm /Users/$3/Preferences/com.apple.spaces.plist && killall Dock

Forum|alt.badge.img+18
  • Valued Contributor
  • November 20, 2012

Thanks Jared - sorry for the delay, got distracted a bit here.

What looks to be working best for me so far is using your provided code but altered back to the generic Library location. The log confused me, but it looks to be working just fine.

Management > Policies > Create policy > Advanced Tab > Run command

rm ~/Library/Preferences/com.apple.spaces.plist && killall Dock

For testing I had it in Self Service and kicked it off whenever I liked to see if it worked on my test machine, and I just moved it out of Self Service and set it to the "any trigger". So far it's working pretty well...it doesn't stop me from going and adding Spaces right now, but they'll be gone soon enough. Ideally I'd like to block the process of creating Spaces, but so far I can't figure out what process is called to restrict that or see any MCX setting to block that.

Thanks for your help!


Forum|alt.badge.img+24
  • Valued Contributor
  • November 20, 2012

That's actually interesting... ~/ should bring you to the currently logged in user's home folder. Since you're running it as the Casper Admin user, it would be like /Users/CasperAdmin instead of /Users/MyDumbUser.

Odd.


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • November 20, 2012

I was just about to post the same as Jared. I don't know how using the ~ shortcut is applying to your logged in user, since the command would be running as your service account or as root, and so should apply only to that account.


Forum|alt.badge.img+18
  • Valued Contributor
  • November 20, 2012

Jared, on your second post on this thread, you mention

Try killing ~/Library/Preferences/com.apple.spaces.plist

. Was that to be implemented differently than how I just did it? I was thinking the method I used would be killing the main Library spaces.plist file (not the specific user spaces.plist file). I found the code to disable Mission Control, so I'll be playing with that now too.


Forum|alt.badge.img+24
  • Valued Contributor
  • November 20, 2012

I had indicated that file path just as a test. If that worked, I expected Rob to take the appropriate measures to account for the difference in the target file's location and the account the command would be run from.


Forum|alt.badge.img+18
  • Valued Contributor
  • November 20, 2012

Oh I know, this is all kind of trial and error for me. I was just wondering if you had intended him to use your suggestion in the Advanced "Run" command area of creating a policy, or as a script...I've been trying all of those options to block Mission Control entirely, but although it works logged in as the user from Terminal, it ain't playin nice via the "Run" command in a policy or as a script...so apparently I'm still on a learning curve. ;)


Forum|alt.badge.img+18
  • Valued Contributor
  • November 20, 2012

Awesome - Mike helped me out restricting Mission Control via a custom MCX on another thread - (https://jamfnation.jamfsoftware.com/discussion.html?id=5889). So I think I'm in good shape. Will do some more testing and make sure it behaves like I want, but I'm about to scratch this off the list!

Thanks for all your help guys, much appreciated! Have a great Turkey Day!