Setup Assistant in Lion

andyinindy
Contributor II

Has anyone managed to figure out how to suppress the "Scrolling Direction" Setup Assistant that appears at first login in Lion? More info on the issue here:

http://groups.google.com/group/macenterprise/browse_thread/thread/990fe986a46c3b9f

I tried everything in that thread, including creating a ~/Library/SavedApplicationState/ and copying in a populated com.apple.SetupAssistant.savedState folder. Alas, the stupid scrolling direction window still pops up.

I could see how this may be useful for an end user, but it is nothing but a nuisance in my Casper Imaging netboot image.

Help!

1 ACCEPTED SOLUTION

Mauricio
Contributor III

Hi Andy

The MiniLauncher will be called for the iCloud and Gestures for every new users (once).
So I am testing a different approach. I've moved (renamed) the MiniLauncher from

/System/Library/CoreServices/Setup Assistant.app/Contents/SharedSupport/MiniLauncher
to
/System/Library/CoreServices/Setup Assistant.app/Contents/SharedSupport/MiniLauncher.backup

Now when new accounts are created the MiniLauncher will not be available.
Hope this helps.

View solution in original post

16 REPLIES 16

nessts
Valued Contributor II

defaults write ~/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none i think takes care of it.

Chris
Valued Contributor
defaults write ~/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none

rtrouton
Release Candidate Programs Tester

As it happens, the very thing you're looking for is buried deep in DeployStudio's ds_finalize.sh script. Location is /Applications/Utilities/DeployStudio Admin.app/Contents/Frameworks/DSCore.framework/Versions/A/Resources/Tools/Common/ds_finalize.sh.

Here's the relevant section of code:

#!/bin/sh

# disable iCloud and gestures demos
if [ `sw_vers -productVersion | awk -F. '{ print $2 }'` -ge 7 ]
then
  for USER_TEMPLATE in "/System/Library/User Template"/*
  do
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
    defaults write "${USER_TEMPLATE}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
  done

  for USER_HOME in /Users/*
  do
    USER_UID=`basename "${USER_HOME}"`
    if [ ! "${USER_UID}" = "Shared" ]
    then
      if [ ! -d "${USER_HOME}"/Library/Preferences ]
      then
        mkdir -p "${USER_HOME}"/Library/Preferences
        chown "${USER_UID}" "${USER_HOME}"/Library
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences
      fi
      if [ -d "${USER_HOME}"/Library/Preferences ]
      then
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant DidSeeCloudSetup -bool TRUE
        defaults write "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant GestureMovieSeen none
        chown "${USER_UID}" "${USER_HOME}"/Library/Preferences/com.apple.SetupAssistant.plist
      fi
    fi
  done
fi

andyinindy
Contributor II

Fantastic, thanks everyone!

andyinindy
Contributor II

Well, crap, this isn't working for me.

Granted, I am working with an already-created netboot image, but these values do not seem to be valid for the com.apple.SetupAssistant.

What I mean is, when I boot into the netboot image with the plist set up with the "DidSeeCloudSetup" set to TRUE and the "GestureMovieSeen" set to none, I still get the Setup Assistant. When I scroll down in the Setup Assistant and click the "Start Using Mac OS X Lion" button, the value for "GestureMovieSeen" changes from none to "trackpad" in the com.apple.SetupAssistant plist. Inexplicably, the "DidSeeCloudSetup" value also now changes to FALSE. The iCloud system preference then pops up. Interestingly, the "DidSeeCloudSetup" does not change to TRUE after I dismiss/close the preference pane.

Anyone have any ideas as to why this might not be working?? I am about to start over from scratch if I can't figure this out...

Mauricio
Contributor III

Hi Andy

The MiniLauncher will be called for the iCloud and Gestures for every new users (once).
So I am testing a different approach. I've moved (renamed) the MiniLauncher from

/System/Library/CoreServices/Setup Assistant.app/Contents/SharedSupport/MiniLauncher
to
/System/Library/CoreServices/Setup Assistant.app/Contents/SharedSupport/MiniLauncher.backup

Now when new accounts are created the MiniLauncher will not be available.
Hope this helps.

andyinindy
Contributor II

Mauricio:

YES! That worked! Thanks very much!!

--Andy

tsd25108
New Contributor II

Andy,
Another way to resolve this issue is instead of using JAMF's utility to create the NetBoot image, setup a base image with Casper Imaging, and then setup a login hook to point to /Applications/Casper Imaging/Contents/MacOS/Casper Imaging

thomasC
Contributor

The script rtrouton shared works well too. Covers all languages in User Templates and prevents both Gesture Movie and iCloud Setup from popping up. Nice!

Thanks for sharing.

rmanly
Contributor III

Nice find Rich.

I had to give it some of my lovin though. ;)

#!/bin/bash

# updated from DeployStudio's ds_finalize.sh script by Ryan Manly 02-24-12

# man bash
shopt -s nullglob

# arrays are the safest way to deal with lots of strings in bash so let's make some!
user_templates=("/System/Library/User Template/"*)
user_homes=(/Users/*)

# why match to > 7 if they aren't here yet...?
if [[ $(sw_vers -productVersion | awk -F. '{ print $2 }') -eq 7 ]]; then

    for template in "${user_templates[@]}"; do
        defaults write "${template}/Library/Preferences/com.apple.SetupAssistant" DidSeeCloudSetup -bool TRUE
        defaults write "${template}/Library/Preferences/com.apple.SetupAssistant" GestureMovieSeen none
    done

    # I don't see why you would ever have a user directory for a valid user without having Library/Preferences
    # already in there anyway, so I got rid of the exception for Shared and the mkdir's etc.
    for home in "${user_homes[@]}"; do

        # /Users/Shared shouldn't have a ./Library/Preferences so just work on everything that does 
        if [[ -d "${home}/Library/Preferences" ]]; then

            defaults write "${home}/Library/Preferences/com.apple.SetupAssistant" DidSeeCloudSetup -bool TRUE
            defaults write "${home}/Library/Preferences/com.apple.SetupAssistant" GestureMovieSeen none

            # using bash's built-in parameter expansion features gets to the username MUCH more
            # quickly than the external program basename and we don't have to assign another variable
            chown "${home##*/}" "${home}/Library/Preferences/com.apple.SetupAssistant.plist"

        fi

    done

fi

adthree
New Contributor III

Thanks gentleman, I've been waiting for a use for this script and I just found one with our new loaner pool being upgraded to 10.7!

Edit*

Spoke too soon, script copied, created, made into a launchd item and injected into the User Templates folder, it is disabling the iCloud pane with ease but the Welcome to Lion assistant is still activating. Anyone else played with this recently and had any setup woes? I'm testing with mobile accounts as well as with the Guest account, a test and multiple generic new accounts I've created. I've not edited the script in any form, just created the launchd item and created a policy to get it into the UT.

Ideas?

spotter
New Contributor III

I'm having issues with suppressing the Scrolling and iCloud popups...

Any help would be greatly appreciated...

tkimpton
Valued Contributor II

rmanly your script didnt work for me in Mountain Lion :(

renaming the MiniLauncher works :)

dgreening
Valued Contributor II

Just to let you guys know, updating to 10.8.3 totally broke the MiniLauncher hack (which was applied to a 10.8.2 machine). It actually broke it so badly that when a new user logs in, the Setup Assistant crashes and displays only a gray screen. I had to re-deploy a fresh version of the Setup Assistant to my 10.8.3 clients to give new users back the ability to log in. I have reached out to my Apple engineer to see if there is an OFFICAL way of killing off the Setup Assistant which won't get broken by an OS update.

taugust04
Valued Contributor

@dgreening - which hack are you talking about?

If it's the hack where the minilauncher app is moved or renamed, then yes, this will most likely break with each OS X update. Apple is most likely patching part or all of the Setup Assistant.app when they release an OS X update. I noticed on my system, the file modified date is 3/15/2013, so it has been patched recently. You will probably need to write some type of startup script that always moves or deletes that file if it's present, so you don't have to worry about OS X updates restoring parts or all of this during an update.

I'm currently managing the Setup Assistant using MCX with Casper. Here are my managed settings, straight from the JSS:

com.apple.SetupAssistant
Name | Apply To | Key Name | Type | Value
DidSeeCloudSetup (10.7+) | User Level At Every Login | DidSeeCloudSetup | boolean | true
GestureMovieSeen (10.7+) | User Level At Every Login | GestureMovieSeen | string | none
LastSeenCloudProductVersion (10.8+ | User Level At Every Login | LastSeenCloudProductVersion | string | 10.8.3

As you can see, LastSeenCloudProductVersion needs to be adjusted with each new OS X Update.

Hope this helps.

~Ted

taugust04
Valued Contributor

Alternatively, you could add these entries into ~/Library/Preferences/com.apple.SetupAssistant.plist (or User Template) manually if this computer is out of the reach of Casper MCX management.