Posted on 09-12-2012 08:21 AM
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
Solved! Go to Solution.
Posted on 09-12-2012 08:24 AM
Try killing ~/Library/Preferences/com.apple.spaces.plist
Posted on 09-12-2012 08:24 AM
Try killing ~/Library/Preferences/com.apple.spaces.plist
Posted on 09-12-2012 08:25 AM
solved
com.apple.spaces.plist
stupid!!!!
Posted on 09-12-2012 08:27 AM
Just found it ! 2 seconds after I posted
Posted on 09-12-2012 08:27 AM
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.
Posted on 11-16-2012 05:50 AM
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?
Posted on 11-16-2012 06:19 AM
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
Posted on 11-20-2012 06:55 AM
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!
Posted on 11-20-2012 07:24 AM
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.
Posted on 11-20-2012 07:26 AM
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.
Posted on 11-20-2012 07:40 AM
Jared, on your second post on this thread, you mention
Try killing ~/Library/Preferences/com.apple.spaces.plist
Posted on 11-20-2012 08:14 AM
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.
Posted on 11-20-2012 09:31 AM
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. ;)
Posted on 11-20-2012 11:49 AM
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!